Misha Brukman
8ce9f2956e
Renamed MachineCodeEmitter.cpp -> X86CodeEmitter.cpp as it conflicts with the
...
target-independent lib/CodeGen/MachineCodeEmitter.cpp; preserved CVS history.
llvm-svn: 6528
2003-06-02 03:28:00 +00:00
Misha Brukman
1c70c3f7a3
* Removed SparcEmitter.cpp; rolled into lib/Target/Sparc/SparcV9CodeEmitter.cpp
...
* No more createX86Emitter() vs. createSparcEmitter() -- there can be only one
* As a result, the memory management semantics must be handled according to
platform -- the parameters to mmap() are particularly sensitive to the host
architecture.
llvm-svn: 6527
2003-06-02 03:23:16 +00:00
Chris Lattner
c8c58138b6
Fix bug: CBackend/2003-06-01-NullPointerType.ll
...
llvm-svn: 6526
2003-06-02 03:10:53 +00:00
Brian Gaeke
1547687d07
Deal with %lo/%lm/%hm/%hh flags in getMachineOpValue().
...
llvm-svn: 6522
2003-06-02 02:13:26 +00:00
Brian Gaeke
bbbe5d71d2
The flag modifications weren't picking up the old values of the
...
flags before. Save them in a temporary variable, then restore them from the
temporary after creating the new constant.
llvm-svn: 6520
2003-06-02 02:10:31 +00:00
Chris Lattner
1136441fcf
Remove obsolete code
...
llvm-svn: 6518
2003-06-02 00:09:00 +00:00
Chris Lattner
a87f53efca
Move target specific code to target files. The new MachineCodeEmitter
...
class is actually target independent!
llvm-svn: 6517
2003-06-01 23:24:36 +00:00
Chris Lattner
be569e986d
Move X86 specific code out of the JIT into the X86 backend
...
llvm-svn: 6516
2003-06-01 23:23:50 +00:00
Chris Lattner
3422940bc8
Changes to be compatible with MachineCodeEmitter.h
...
llvm-svn: 6515
2003-06-01 23:22:11 +00:00
Brian Gaeke
495826a0e5
Fix induction variable name clash in for loops, in finishFunction().
...
Modify new MachineOperand so that its flags match the old MachineOperand's
flags, for the flags that matter.
llvm-svn: 6513
2003-06-01 22:08:29 +00:00
Brian Gaeke
b9ab2b7ba2
Make the .inc file depend on $(TBLGEN), so that changes to TableGen followed
...
by a re-link of TableGen will notify Make to rebuild the .inc file.
llvm-svn: 6512
2003-06-01 04:52:51 +00:00
Chris Lattner
a108915211
Don't print out unique identifier for opaque types
...
llvm-svn: 6511
2003-06-01 03:45:51 +00:00
Chris Lattner
bf8929c4bb
* Implement cast (long|ulong) to bool
...
* Fix cast of (short|ushort|int|uint) to bool to work right
llvm-svn: 6510
2003-06-01 03:38:24 +00:00
Chris Lattner
dce4ab92a4
Add RR forms of test instruction
...
llvm-svn: 6509
2003-06-01 03:37:46 +00:00
Chris Lattner
010cda7529
Fix a bug with casts to bool. This fixes testcase UnitTests/2003-05-31-CastToBool.c
...
llvm-svn: 6507
2003-06-01 03:36:51 +00:00
Chris Lattner
eaafbfd2df
Implement xform: (X != 0) -> (bool)X
...
llvm-svn: 6506
2003-06-01 03:35:25 +00:00
Anand Shukla
3f99ba3fc9
Add map info for arguments to call (copies)
...
llvm-svn: 6503
2003-06-01 02:48:23 +00:00
Anand Shukla
6939133e23
Added the #(internal functions) to output
...
llvm-svn: 6502
2003-06-01 02:40:49 +00:00
Chris Lattner
92eb5bbb15
Add support for shl and shr for 64 bit integer types
...
llvm-svn: 6499
2003-06-01 01:56:54 +00:00
Chris Lattner
96f7ec62fe
Add definitions for TEST instructions
...
llvm-svn: 6498
2003-06-01 01:56:39 +00:00
Chris Lattner
f37c407475
Add new cmovne32 instruction
...
llvm-svn: 6496
2003-06-01 00:05:15 +00:00
Chris Lattner
fb76ebe95a
Fix bug: CBackend/2003-05-31-MissingStructName.ll
...
llvm-svn: 6495
2003-05-31 23:30:52 +00:00
Chris Lattner
0897583c5c
Fix bug: FunctionResolve/2003-05-31-AllInternalDecls.ll
...
llvm-svn: 6486
2003-05-31 21:57:06 +00:00
Chris Lattner
00751219b0
Fix bug: FuncResolve/2003-05-31-InternalDecl.ll
...
Count resolutions correctly.
llvm-svn: 6482
2003-05-31 21:08:45 +00:00
Chris Lattner
d825cf5ee3
Simplify funcresolve a bit more
...
llvm-svn: 6480
2003-05-31 20:44:46 +00:00
Chris Lattner
a7b50146af
Fix bug: FunctionResolve/2003-05-31-FuncPointerResolve.ll
...
llvm-svn: 6479
2003-05-31 20:33:31 +00:00
Tanya Lattner
eaa01f0821
Fixed comment width, changed arg to be const, fixed indentation, removed unnecessary includes.
...
llvm-svn: 6476
2003-05-31 20:01:37 +00:00
Vikram S. Adve
540655e2ae
Minor changes.
...
llvm-svn: 6470
2003-05-31 07:41:54 +00:00
Vikram S. Adve
d43c10b583
Added MachineCodeForInstruction object as an argument to
...
TmpInstruction constructors because every TmpInstruction object has
to be registered with a MachineCodeForInstruction to prevent leaks.
This simplifies the user's code.
llvm-svn: 6469
2003-05-31 07:41:24 +00:00
Vikram S. Adve
b2bb0dd8ca
Allow explicit physical registers for implicit operands.
...
llvm-svn: 6468
2003-05-31 07:39:06 +00:00
Vikram S. Adve
2d906f4550
Changes to allow explicit physical register arguments that have been
...
preallocated. While reg-to-reg dependences were already handled, this
change required new code for adding edges to/from call instructions.
This was part of the extensive changes to the way code generation occurs
for function call arguments and return values.
See log for CodeGen/PhyRegAlloc.cpp.
llvm-svn: 6467
2003-05-31 07:37:05 +00:00
Vikram S. Adve
83409b0b78
Several bug fixes: globals in call operands were not being pulled out;
...
globals in some other places may not have been pulled out either;
globals in phi operands were being put just before the phi instead of
in the predecessor basic blocks.
llvm-svn: 6466
2003-05-31 07:34:57 +00:00
Vikram S. Adve
194a5862e0
Extensive changes to the way code generation occurs for function
...
call arguments and return values:
Now all copy operations before and after a call are generated during
selection instead of during register allocation.
The values are copied to virtual registers (or to the stack), but
in the former case these operands are marked with the correct physical
registers according to the calling convention.
Although this complicates scheduling and does not work well with
live range analysis, it simplifies the machine-dependent part of
register allocation.
llvm-svn: 6465
2003-05-31 07:32:01 +00:00
Vikram S. Adve
884f4c7a97
Reverting previous beautification changes.
...
llvm-svn: 6464
2003-05-31 07:27:17 +00:00
Misha Brukman
afa8e60f9f
Fixed rewriting of branches -- they now work forward and backward.
...
llvm-svn: 6463
2003-05-31 06:26:48 +00:00
Misha Brukman
be11d6eed3
Removed useless code -- the byte order of output code is correct as is.
...
llvm-svn: 6462
2003-05-31 06:26:06 +00:00
Misha Brukman
32fae9b78a
The 'rd' register is consistently mentioned last in instruction definitions.
...
Created new classes from which instructions inherit their ordering of fields.
llvm-svn: 6461
2003-05-31 06:25:19 +00:00
Misha Brukman
ee757debd1
* Put back into action SLL/SRL/SRA{r,i}6 instructions
...
* Fixed page numbers referring to the Sparc manual
llvm-svn: 6460
2003-05-31 06:24:29 +00:00
Misha Brukman
3fc07ad7b8
Code beautification, no functional changes.
...
llvm-svn: 6459
2003-05-31 06:22:37 +00:00
Misha Brukman
a49daf449e
Enabling some of these passes causes lli to break
...
llvm-svn: 6457
2003-05-31 04:23:04 +00:00
Misha Brukman
0fae161230
The actual order of parameters in a 2-reg-immediate assembly instructions is
...
"rs1, imm, rd": most importantly, rd goes last.
llvm-svn: 6456
2003-05-31 04:22:26 +00:00
Misha Brukman
a9a5c77dd4
Since malloc is no longer used, no need to free() memory.
...
Fixed BasicBlock patching by supplying correct type for the displacement.
llvm-svn: 6453
2003-05-30 20:39:37 +00:00
Misha Brukman
b1b8a6732e
When converting virtual registers to immediate constants, change the opcode.
...
llvm-svn: 6452
2003-05-30 20:36:27 +00:00
Misha Brukman
c5a1e94883
Added saveBBreferences() for BasicBlock resolution.
...
llvm-svn: 6451
2003-05-30 20:32:45 +00:00
Misha Brukman
d40446e90c
Added:
...
* ability to save BasicBlock references to be resolved later
* register remappings from the enum values to the real hardware numbers
llvm-svn: 6449
2003-05-30 20:17:33 +00:00
Misha Brukman
6b36ebb7a9
Fixed the namespace to match SparcInternals.h; added notes on some missing
...
sections of instructions.
llvm-svn: 6448
2003-05-30 20:15:59 +00:00
Misha Brukman
0edfa6f237
The register types need to be visible outside of the class to be useful.
...
For one, converting register numbers based on class in the code emitter.
llvm-svn: 6447
2003-05-30 20:12:42 +00:00
Misha Brukman
ce67ffb229
Moved and expanded convertOpcodeFromRegToImm() to conver more opcodes.
...
Code beautification for the rest of the code: changed layout to match the rest
of the code base.
llvm-svn: 6446
2003-05-30 20:11:56 +00:00
Misha Brukman
e787ba07ed
Make LLI behave just like LLC with regard to the compile passes it uses.
...
llvm-svn: 6444
2003-05-30 20:00:13 +00:00
Chris Lattner
1c10a30949
Okay totally give up on trying to optimize aggregates that cannot be completely
...
broken up into their elements. Too many programs break because of this.
llvm-svn: 6440
2003-05-30 19:22:14 +00:00