Chris Lattner
4576429b7c
Finish implementation of alias list impl
...
llvm-svn: 5083
2002-12-16 19:31:48 +00:00
Chris Lattner
4d0ca4b442
Add mechanism to select register allocator to use
...
llvm-svn: 5079
2002-12-16 16:15:51 +00:00
Chris Lattner
b833239d6b
Try #2 to get alias set stuff to work
...
llvm-svn: 5077
2002-12-16 16:14:51 +00:00
Chris Lattner
eae93bdb93
Add comments
...
llvm-svn: 5076
2002-12-16 15:57:44 +00:00
Chris Lattner
fd065b6b1a
Add info about register aliases, add prototype for createLocalRegisterAllocator
...
llvm-svn: 5075
2002-12-16 15:55:51 +00:00
Chris Lattner
b413ce63d5
Add info about register file aliasing
...
llvm-svn: 5074
2002-12-16 15:55:25 +00:00
Chris Lattner
e6ad4941fc
Add information about register file aliasing
...
llvm-svn: 5073
2002-12-16 15:54:59 +00:00
Chris Lattner
68af8985f4
Add call clobber info
...
llvm-svn: 5072
2002-12-16 15:54:42 +00:00
Chris Lattner
566fb4c7b7
Rename createSimpleX86RegisterAllocator to createSimpleRegisterAllocator
...
llvm-svn: 5071
2002-12-16 14:38:13 +00:00
Brian Gaeke
e4da1d5de6
brg
...
Fix some bugs in use of MBB vs. BB and iterators that are invalidated before
we use them.
Reference targetClass by enum name, not by number.
llvm-svn: 5069
2002-12-16 04:23:29 +00:00
Chris Lattner
4964e751cd
Correct the setting of Def flags on registers that are modified!
...
llvm-svn: 5065
2002-12-15 22:38:47 +00:00
Chris Lattner
ea2d8ad746
Give passes nice names!
...
llvm-svn: 5059
2002-12-15 21:13:40 +00:00
Chris Lattner
4214ac384a
Simplify interfaces used by regalloc to insert code
...
llvm-svn: 5052
2002-12-15 20:06:35 +00:00
Chris Lattner
ce23fdeee2
Changes to make new TargetRegisterClass interface.
...
llvm-svn: 5050
2002-12-15 19:29:34 +00:00
Chris Lattner
caa325a559
* Simplify TargetRegisterClass implementations
...
* Change regclass iterators to use an extra level of pointers
llvm-svn: 5047
2002-12-15 18:40:36 +00:00
Chris Lattner
50d99540cf
Add support to cast from a bool type
...
Add support for boolean constants
add getClassB method
llvm-svn: 5034
2002-12-15 08:02:15 +00:00
Chris Lattner
534876a78c
Use MachineOperand::isFoo methods instead of our own global functions
...
llvm-svn: 5033
2002-12-15 08:01:39 +00:00
Chris Lattner
bd4d66147f
Implement indirect function calls
...
llvm-svn: 5024
2002-12-13 14:13:27 +00:00
Misha Brukman
3587ffc7b1
Make function code generation printing debug-only.
...
llvm-svn: 5023
2002-12-13 13:16:14 +00:00
Chris Lattner
c7db3e855f
Fix bork in doMultiply
...
llvm-svn: 5021
2002-12-13 13:07:42 +00:00
Chris Lattner
7d5d4f7ab4
Add sanity checks
...
llvm-svn: 5020
2002-12-13 13:04:04 +00:00
Misha Brukman
2f2cf00a9f
Cleaned up the code: factored out switch/case into a separate function, put
...
constants in an array for quick lookup. Stole the idea from elsewhere in
Jello.
llvm-svn: 5017
2002-12-13 12:00:06 +00:00
Chris Lattner
de2f97c5e6
Insert phi code at top of block
...
llvm-svn: 5015
2002-12-13 11:52:34 +00:00
Brian Gaeke
460fe53768
lib/Target/X86/InstSelectSimple.cpp:
...
The MachineBasicBlock variable name patrol hereby fines Chris Lattner
one bag of nachos, for shadowing global names while his license to do so
was under suspension.
llvm-svn: 5014
2002-12-13 11:39:18 +00:00
Chris Lattner
2c2a5f128e
Implement cast bool to X
...
llvm-svn: 5012
2002-12-13 11:31:59 +00:00
Brian Gaeke
b101130d19
Rename all BMI MachineBasicBlock operands to MBB.
...
Try to mess around with emitGEPOperation's elementSizeReg to make it work,
again.
llvm-svn: 5011
2002-12-13 11:22:48 +00:00
Chris Lattner
cad7e99ea1
Finish up iterator stuph
...
llvm-svn: 5009
2002-12-13 10:50:40 +00:00
Misha Brukman
b6fb990276
Treat longs as ints => pretend they're all 32-bit values and squeeze them into
...
32-bit registers.
llvm-svn: 5008
2002-12-13 10:43:09 +00:00
Chris Lattner
416a9ca8f1
Code gen phi's correctly
...
llvm-svn: 5004
2002-12-13 10:09:43 +00:00
Chris Lattner
505ace489e
Print X86 PHI nodes in a sane manner
...
llvm-svn: 5003
2002-12-13 09:59:26 +00:00
Misha Brukman
fb02408496
Added moveReg2Reg() and moveImm2Reg() to accomodate moving data around due to
...
PHI nodes.
llvm-svn: 5001
2002-12-13 09:54:12 +00:00
Brian Gaeke
34ad176df5
lib/Target/X86/InstSelectSimple.cpp: Start counting arguments with 2,
...
because arguments start two stack slots off of EBP. Break out of the
for loop once the argument is found. Increment the counter at the end
of the loop instead of the beginning. Use addRegOffset and compute
the scale * index part at compile time instead of using the fancy
load instruction. Just because an instruction set has wacky addressing
modes doesn't mean we ought to use them (at least, if you believe Dave
Patterson).
lib/Target/X86/X86InstrBuilder.h: Add some comments.
test/Regression/Jello/test-loadstore.ll: Let main return int 0.
llvm-svn: 4999
2002-12-13 09:28:50 +00:00
Brian Gaeke
5da234a1d7
InstSelectSimple.cpp: Give promote32 a comment. Add initial
...
implementation of getReg() for arguments.
MachineCodeEmitter.cpp: Fix using EBP with index, scale and no
displacement (whew!) due to Chris.
Printer.cpp: Fix printing out index and scale in memory references.
llvm-svn: 4998
2002-12-13 07:56:18 +00:00
Chris Lattner
9e7b73b55f
Implement getelementptr constant exprs
...
Implement ConstantPointerRefs
Treat long/ulongs as if they were integers. A hack, but an effective one
llvm-svn: 4995
2002-12-13 06:56:29 +00:00
Brian Gaeke
641c6fa60a
brg
...
InstSelectSimple.cpp: Add stub implementation of visitFreeInst.
Add comments that mention how we are failing to implement malloc/free.
Add initial implementation of visitAllocaInst.
X86TargetMachine.cpp: Include llvm/Transforms/Scalar.h.
Add LowerAllocations pass before instruction selection.
jello/Makefile: Add scalaropts.a.
llvm-svn: 4994
2002-12-13 06:46:31 +00:00
Chris Lattner
62454d83f0
Emit the right form of mod/rm mod field
...
llvm-svn: 4986
2002-12-13 05:05:05 +00:00
Chris Lattner
7ec625a157
Nicify a bit
...
llvm-svn: 4985
2002-12-13 05:04:37 +00:00
Chris Lattner
4cc9894c71
Fix encoding of CBW instruction
...
llvm-svn: 4983
2002-12-13 04:41:31 +00:00
Misha Brukman
20c9c61c6d
Moves now select correct opcode based on the data size.
...
llvm-svn: 4981
2002-12-13 04:24:53 +00:00
Chris Lattner
10f305cec7
Remove extranous #include
...
llvm-svn: 4980
2002-12-13 04:12:24 +00:00
Chris Lattner
723ca2522d
Rename MemArg* to Arg*
...
llvm-svn: 4979
2002-12-13 03:51:55 +00:00
Chris Lattner
b698cd8236
Make mem size an assert
...
Add mem size flags to all instructions using an imm
llvm-svn: 4978
2002-12-13 03:50:13 +00:00
Misha Brukman
6a5788bb6f
This is supposed to provide correct size for datatypes. Supposedly.
...
llvm-svn: 4977
2002-12-13 02:13:15 +00:00
Misha Brukman
bf2857eb5c
Added the flag to mark instructions which are really 2-address instructions in
...
X86, but would be 3-address in any normail architecture.
llvm-svn: 4974
2002-12-12 23:19:11 +00:00
Brian Gaeke
9b38597288
This checkin is brought to you by the brian gaeke allnighter fund.
...
(lib/Target/X86) InstSelectSimple.cpp:
Include llvm/DerivedTypes.h and iostream.
Refactor visitMul out into a wrapper around doMultiply(), so that we
can do multiplications on temporary values when we are doing
getelementptrs.
Refactor part of getReg out into makeAnotherReg, so that we can create
registers willy-nilly to hold temporary values, when we are doing
getelementptrs.
Add stub implementations of visitMallocInst and visitAllocaInst.
Add initial implementation of visitGetElementPtrInst.
In copyConstantToRegister:
We throw a *lot* of our asserts here. So, when we want to throw an
assert, print out to stderr whatever expr or whatever constant made
us barf.
Support copying ConstantPointerNull to register, using a move immediate
of zero.
Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings
of the numbers in the other instruction names. All uses modified.
Teach visitCallInst to extract byte- and short-class return values
from subregs of EAX. Add a FIXME note about how we would do it for
float-class return values.
Add a FIXME note about how we would cast float to int and back.
X86InstrInfo.def:
Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings
of the numbers in the other instruction names. All uses modified.
(tools/jello) GlobalVars.cpp:
Include iostream.
If we have to emit a floating-point constant to memory, gamble and use
the same method as for ints.
If we have to emit a ConstantPointerNull to memory, try using a "void *"
and "NULL".
Otherwise, if we are going to throw an assert, print out whatever constant
made us barf, first.
llvm-svn: 4973
2002-12-12 15:33:40 +00:00
Brian Gaeke
250d5a3e95
Implement a lot of cast functionality (no FP or 64)
...
llvm-svn: 4944
2002-12-06 10:49:33 +00:00
Brian Gaeke
dbc34a2a95
Target/X86/Printer.cpp: Add sizePtr function, and use it instead of
...
" <SIZE> PTR " string when emitting assembly.
Target/X86/X86InstrInfo.def: Tidy up a bit:
Squashed everything down to 118 chars wide, wrapping lines so that
comment is at the same point on each line. Rename "NoImpRegs" as
"NoIR". (most instructions have NoImpRegs twice on a line, so this
saves 10 columns).
Also, annotate various instructions with flags for size of memory operand.
(MemArg16, MemArg32, MemArg64, etc.)
Target/X86/X86InstrInfo.h: Define flags for size of memory operand.
(MemArg16, MemArg32, MemArg64, etc.)
llvm-svn: 4932
2002-12-05 08:30:40 +00:00
Misha Brukman
7dc6877ce2
Implemented functions for emitting prologues and epilogues;
...
removed EBP from the list of callee-saved registers (it isn't one).
llvm-svn: 4929
2002-12-04 23:57:03 +00:00
Misha Brukman
e93c7f9d32
Added push and pop instructions.
...
llvm-svn: 4928
2002-12-04 23:56:26 +00:00
Chris Lattner
70aa4e41ce
Fix handling of function calls that return void
...
llvm-svn: 4925
2002-12-04 23:50:28 +00:00
Chris Lattner
b71d7b4dab
Implement initial support for return values from call instructions
...
llvm-svn: 4924
2002-12-04 23:45:28 +00:00
Misha Brukman
f8634130dc
Adjust the stack pointer after a function call, proportional to the number of
...
arguments pushed onto the stack.
llvm-svn: 4922
2002-12-04 19:22:53 +00:00
Misha Brukman
cf80ad35f3
Added instructions to add/subtract imm32 to/from a reg32.
...
llvm-svn: 4921
2002-12-04 19:15:22 +00:00
Chris Lattner
96edaabdb2
Fix bogus assertion failures
...
llvm-svn: 4919
2002-12-04 17:32:52 +00:00
Chris Lattner
b538ae0dba
Avoid bad assertion
...
llvm-svn: 4918
2002-12-04 17:28:40 +00:00
Chris Lattner
feeb16616e
Remove think-o assertion
...
llvm-svn: 4917
2002-12-04 17:18:30 +00:00
Chris Lattner
e21cfc9b6c
Avoid crashing on Arguments, just silently miscompile
...
llvm-svn: 4916
2002-12-04 17:15:34 +00:00
Misha Brukman
101076f586
storeReg2RegOffset() and loadRegOffset2Reg() now take the iterator by value
...
instead of by reference, since they return the modified iterator.
llvm-svn: 4914
2002-12-04 17:14:13 +00:00
Misha Brukman
6e1c4851ea
Moved buildReg2RegClassMap() into from X86RegisterInfo to MRegisterInfo, since
...
it is target-independent.
llvm-svn: 4911
2002-12-04 16:47:04 +00:00
Chris Lattner
29f4c79239
Add a "Lazy Function Resolution in Jello" section
...
Remove some todo's
llvm-svn: 4910
2002-12-04 16:12:54 +00:00
Chris Lattner
6c1a85e870
Fix a bug I introduced in a previous change
...
llvm-svn: 4909
2002-12-04 06:56:56 +00:00
Chris Lattner
73ac28801e
Add support for referencing global variables/functions
...
llvm-svn: 4907
2002-12-04 06:45:19 +00:00
Misha Brukman
5639a6279e
Added support for callee- and caller-save registers.
...
llvm-svn: 4897
2002-12-03 23:11:21 +00:00
Chris Lattner
8cadeb99ab
Fix broken ret opcode, grr...
...
llvm-svn: 4895
2002-12-03 22:50:02 +00:00
Chris Lattner
a31be4e958
Fix instsel for calls
...
llvm-svn: 4891
2002-12-03 20:30:12 +00:00
Chris Lattner
5629544811
Fix the build
...
llvm-svn: 4884
2002-12-03 18:15:59 +00:00
Brian Gaeke
c850694f49
brg
...
Add support for cast ... to bool in visitCastInst (it's a start, anyways...)
llvm-svn: 4883
2002-12-03 07:36:03 +00:00
Chris Lattner
5f0614914e
Split the machine code emitter completely out of the printer
...
llvm-svn: 4882
2002-12-03 06:34:06 +00:00
Chris Lattner
99e7784512
* Move information about Implicit Defs/Uses into X86InstrInfo.def.
...
* Expose information about implicit defs/uses of register through the
MachineInstrInfo.h file.
llvm-svn: 4877
2002-12-03 05:42:53 +00:00
Chris Lattner
56c48a37a8
Initialize implicit uses/defs fields for sparc backend to empty list
...
llvm-svn: 4876
2002-12-03 05:41:54 +00:00
Brian Gaeke
48759a6af9
brg
...
X86Implicit.cpp, X86Implicit.h: New files.
InstSelectSimple.cpp: Add some clarifications in visitCallInst comments.
llvm-svn: 4874
2002-12-03 00:51:09 +00:00
Chris Lattner
e66d3e90ce
More support for machine code emission: raw instructions
...
llvm-svn: 4872
2002-12-02 21:56:18 +00:00
Chris Lattner
c1d0d21002
Expose explicit type
...
llvm-svn: 4871
2002-12-02 21:50:41 +00:00
Chris Lattner
f48a330fd8
Start implementing MachineCodeEmitter
...
llvm-svn: 4870
2002-12-02 21:44:34 +00:00
Chris Lattner
cd65711437
Eliminate OtherFrm
...
llvm-svn: 4868
2002-12-02 21:40:58 +00:00
Chris Lattner
e8640c05cc
Remove comment
...
Remove handling of OtherFrm
llvm-svn: 4867
2002-12-02 21:40:46 +00:00
Chris Lattner
8227eea4fe
Initial support for machine code emission
...
llvm-svn: 4866
2002-12-02 21:24:12 +00:00
Misha Brukman
0b310e3359
Fix order of operands on a store from reg to [reg+offset].
...
llvm-svn: 4857
2002-12-02 21:10:35 +00:00
Chris Lattner
89de3f1fc5
Add rawfrm flags
...
llvm-svn: 4841
2002-12-01 23:25:59 +00:00
Chris Lattner
d7ae75d381
Don't add implicit regs
...
llvm-svn: 4840
2002-12-01 23:24:58 +00:00
Brian Gaeke
1700fefdeb
brg
...
InstSelectSimple.cpp: Refactor out conversion of byte, short -> int
from visitReturnInst() to new method, promote32().
Use it in both visitReturnInst() and visitCallInst().
llvm-svn: 4839
2002-11-30 11:57:28 +00:00
Brian Gaeke
b6fc905124
brg
...
InstSelectSimple.cpp: First draft of visitCallInst method, handling
int/float args.
X86InstrInfo.def: Add entries for CALL with 32-bit pc relative arg, and
PUSH with 32-bit reg arg.
llvm-svn: 4838
2002-11-29 12:01:58 +00:00
Brian Gaeke
d944e15946
brg
...
InstSelectSimple.cpp: Add some comments that say what I'm going to do for
calls and casts.
llvm-svn: 4832
2002-11-26 10:43:30 +00:00
Misha Brukman
3ba057b8c4
Oops. Got the MOVrm and MOVmr mixed up. Fixed. We can now print out
...
instructions correctly.
llvm-svn: 4830
2002-11-22 23:15:27 +00:00
Misha Brukman
a301022017
Enable the register allocator pass.
...
llvm-svn: 4829
2002-11-22 22:45:07 +00:00
Misha Brukman
02c0acabb9
Added methods to read/write values to stack in .h, fixed implementation in
...
.cpp to return the iterator correctly.
llvm-svn: 4827
2002-11-22 22:43:47 +00:00
Misha Brukman
23d923ff18
Added -*- C++ -*- mode to the comments.
...
llvm-svn: 4826
2002-11-22 22:42:50 +00:00
Misha Brukman
e43fe85591
Add a simple way to add memory locations of format [reg+offset]
...
llvm-svn: 4825
2002-11-22 22:42:12 +00:00
Brian Gaeke
2d771c7b5f
lib/Target/X86/InstSelectSimple.cpp: Add visitCallInst, visitCastInst.
...
llvm-svn: 4821
2002-11-22 11:07:01 +00:00
Chris Lattner
fe85dd13d2
Handle cmp Reg, 0 correctly
...
llvm-svn: 4819
2002-11-21 23:30:00 +00:00
Chris Lattner
6021c0d120
Printing support for more stuff
...
llvm-svn: 4818
2002-11-21 22:49:46 +00:00
Chris Lattner
a147d38780
Don't add implicit operands
...
llvm-svn: 4817
2002-11-21 22:49:20 +00:00
Chris Lattner
de36dd3a36
Fix off by one bug
...
llvm-svn: 4816
2002-11-21 22:48:15 +00:00
Chris Lattner
de6d53e549
Add fixme
...
llvm-svn: 4815
2002-11-21 22:48:01 +00:00
Chris Lattner
93c5c3ff44
Minor code cleanups
...
llvm-svn: 4814
2002-11-21 21:04:50 +00:00
Chris Lattner
af8c29b47d
Implement printing of store instructions
...
llvm-svn: 4813
2002-11-21 21:03:39 +00:00
Chris Lattner
918179475a
The big change here is to handle printing/emission of X86II::MRMSrcMem
...
instructions. Right now the only users are load instructions, and Misha's
spill code
llvm-svn: 4812
2002-11-21 20:44:15 +00:00
Chris Lattner
2112a6d7b8
Remove implicit information from instruction selector
...
llvm-svn: 4811
2002-11-21 18:54:29 +00:00
Chris Lattner
c9e824d750
Add printing information for MUL and DIV
...
llvm-svn: 4810
2002-11-21 18:54:14 +00:00
Chris Lattner
d2207d5464
Fix a bug that prevented compilation of multiple functions
...
llvm-svn: 4809
2002-11-21 17:26:58 +00:00
Chris Lattner
fab5468d86
Remove opcode information for instructions that are completely defined now
...
llvm-svn: 4805
2002-11-21 17:12:55 +00:00
Chris Lattner
d432d2f75e
Add printing support for sahf & setcc
...
llvm-svn: 4804
2002-11-21 17:10:57 +00:00
Chris Lattner
766d0da035
Add printing support for /0 /1 type instructions
...
llvm-svn: 4803
2002-11-21 17:09:01 +00:00
Chris Lattner
9f9d6aef08
Add support for /0 /1, etc type instructions
...
llvm-svn: 4802
2002-11-21 17:08:49 +00:00
Chris Lattner
b1b5855551
Rename the SetCC X86 instructions to reflect the fact that they are the
...
register versions
llvm-svn: 4800
2002-11-21 16:19:42 +00:00
Chris Lattner
d6236d8100
Simplify setcc code a bit
...
llvm-svn: 4799
2002-11-21 15:52:38 +00:00
Chris Lattner
2f9488d131
Support Registers of the form (B8+ rd) for example
...
llvm-svn: 4798
2002-11-21 02:00:20 +00:00
Chris Lattner
32bfb6a115
Dont' set flags
...
llvm-svn: 4797
2002-11-21 01:59:50 +00:00
Chris Lattner
aa8aa73902
Implement printing more, implement opcode output more
...
llvm-svn: 4796
2002-11-21 01:33:44 +00:00
Chris Lattner
53a9c9aac6
Huge diff do to reindeinting comments.
...
Basically just adds OpSize flags for instructions that need them.
llvm-svn: 4795
2002-11-21 01:33:28 +00:00
Chris Lattner
92a3c2c77d
Add new prefix flag
...
llvm-svn: 4794
2002-11-21 01:32:55 +00:00
Chris Lattner
228180c2ae
Print another class of instructions correctly, giving us: xorl EDX, EDX
...
for example.
llvm-svn: 4793
2002-11-21 00:30:01 +00:00
Misha Brukman
5d89dbcf41
Booleans are types too. And they get stored in bytes. And InstructionSelection
...
doesn't assert fail. And everyone's happy. Yay!
llvm-svn: 4792
2002-11-21 00:25:56 +00:00
Chris Lattner
26052792dd
X86 target builds fine now
...
llvm-svn: 4786
2002-11-20 20:17:03 +00:00
Misha Brukman
96283090dc
Add definitions for function headers from MRegisterInfo.h:
...
Some functions are in X86RegisterInfo.cpp, others, because of the data they
need, are in X86RegisterClasses.cpp, which also defines some register classes:
byte, short, and int.
llvm-svn: 4784
2002-11-20 18:59:43 +00:00
Misha Brukman
42f51b24e1
Check not only for MO_VirtualRegister, but MO_MachineRegister as well when
...
printing out assembly. After all, we want the real thing too.
llvm-svn: 4783
2002-11-20 18:56:41 +00:00
Chris Lattner
2f7f21cd13
Don't build X86 target yet
...
llvm-svn: 4780
2002-11-20 18:37:37 +00:00
Misha Brukman
505ca2e419
Add mapping in MachineFunction from SSA regs to Register Classes. Also,
...
uncovered a bug where registers were not being put in a map if they were not
found...
llvm-svn: 4776
2002-11-20 00:58:23 +00:00
Misha Brukman
8d3bef2e1b
Sigh. Fixed some speling.
...
llvm-svn: 4775
2002-11-20 00:56:42 +00:00
Misha Brukman
00d8343760
Thanks to the R8, R16, and R32 macros, I can now deal with registers that
...
belong to different register classes easier.
llvm-svn: 4773
2002-11-20 00:47:40 +00:00
Brian Gaeke
49acd3c0ba
Brian Gaeke says:
...
lib/Target/X86/InstSelectSimple.cpp: Add a little something to
visitBranchInst which supports conditional branches.
lib/Target/X86/X86InstrInfo.def: Add defs of JNE, JE, CMPri8
llvm-svn: 4755
2002-11-19 09:08:47 +00:00
Chris Lattner
cd1f56fc36
Start trying to print instructions more correctly. For now we also print out the opcode for each instruction as well.
...
llvm-svn: 4743
2002-11-18 06:56:51 +00:00
Chris Lattner
8301d751ee
Expose base opcode
...
llvm-svn: 4742
2002-11-18 06:56:24 +00:00
Chris Lattner
54bb9d64a3
Start to add more information to instr.def
...
llvm-svn: 4741
2002-11-18 05:37:11 +00:00
Chris Lattner
e921369cf7
Add instruction annotation about whether it has a 0x0F opcode prefix
...
llvm-svn: 4740
2002-11-18 01:59:28 +00:00
Chris Lattner
acf38562df
Add more void flags
...
llvm-svn: 4739
2002-11-18 01:37:48 +00:00
Chris Lattner
7a67557e29
Set the void flag on instructions that should get it
...
llvm-svn: 4738
2002-11-18 01:34:36 +00:00
Chris Lattner
f0a1010d2c
Pass on a targetmachine
...
llvm-svn: 4736
2002-11-17 23:22:03 +00:00
Chris Lattner
a7d7b16161
Arrange to have a TargetMachine available in X86InstrInfo::print
...
llvm-svn: 4734
2002-11-17 23:20:37 +00:00
Chris Lattner
700e8f6a01
Wow, I'm incapable of the simplest things today...
...
llvm-svn: 4732
2002-11-17 23:05:21 +00:00
Chris Lattner
1cd77c9933
Rename registers to follow the intel style of all caps
...
llvm-svn: 4731
2002-11-17 23:03:46 +00:00
Chris Lattner
0bf125c617
Fix misleading indentation
...
llvm-svn: 4730
2002-11-17 22:57:23 +00:00
Chris Lattner
5374a3be97
Reorganize printing interface a bit
...
llvm-svn: 4728
2002-11-17 22:53:13 +00:00
Chris Lattner
a55e8dba9b
Add default implementation of printing interface
...
llvm-svn: 4727
2002-11-17 22:53:03 +00:00
Chris Lattner
970ae6d569
Fix minor detail
...
llvm-svn: 4725
2002-11-17 22:33:26 +00:00
Chris Lattner
72e99c8344
Fix Mul/Div clobbers
...
llvm-svn: 4718
2002-11-17 21:56:38 +00:00
Chris Lattner
dcb6f1dbf9
Fix a few typos, implement load/store
...
llvm-svn: 4716
2002-11-17 21:11:55 +00:00
Chris Lattner
06066e17c3
Add functions to buld X86 specific constructs
...
llvm-svn: 4714
2002-11-17 21:03:35 +00:00
Chris Lattner
5e21732045
Add information about memory index representation
...
llvm-svn: 4712
2002-11-17 20:33:26 +00:00
Chris Lattner
99b5e2f073
Add load/store instructions
...
llvm-svn: 4711
2002-11-17 20:33:12 +00:00
Chris Lattner
fb67938381
Switch visitRet to use getClass()
...
llvm-svn: 4710
2002-11-17 20:07:45 +00:00
Brian Gaeke
492e05ba01
include/llvm/CodeGen/MachineInstrBuilder.h: Add addClobber() inline
...
convenience method. Fix typo in comment.
lib/Target/X86/InstSelectSimple.cpp: Explicitly specify some implicit uses.
Use MOVZX/MOVSX instead of MOV instructions with sign extend instructions.
Take out LEAVE instructions.
32-bit IDIV and DIV use CDQ, not CWQ (CWQ is a typo).
Fix typo in comment and remove some FIXME comments.
lib/Target/X86/Printer.cpp: Include X86InstrInfo.h and llvm/Function.h.
Add some simple code to Printer::runOnFunction to iterate over
MachineBasicBlocks and call X86InstrInfo::print().
lib/Target/X86/X86InstrInfo.def: Make some more instructions with
implicit defs "Void". Add more sign/zero extending "move" insns
(movsx, movzx).
lib/Target/X86/X86RegisterInfo.def: Add EFLAGS as a register.
llvm-svn: 4707
2002-11-14 22:32:30 +00:00
Brian Gaeke
8cfe5d95f1
InstSelectSimple.cpp: (visitReturnInst) Add return instructions with return
...
values.
X86InstrInfo.def: add LEAVE instruction.
llvm-svn: 4691
2002-11-11 19:37:09 +00:00
Brian Gaeke
100510d2a8
Add instruction selection code and tests for setcc instructions
...
llvm-svn: 4603
2002-11-07 17:59:21 +00:00
Vikram S. Adve
51aa205bd1
Remove a nasty little semi-colon someone introduced which
...
prevented any machine instrs from being printed!
llvm-svn: 4557
2002-11-06 00:34:26 +00:00
Chris Lattner
79296d7609
Implement signed and unsigned division and remainder
...
llvm-svn: 4508
2002-11-02 20:54:46 +00:00
Chris Lattner
234cc2848a
Implement multiply operator
...
llvm-svn: 4506
2002-11-02 20:28:58 +00:00
Chris Lattner
efa2b8226f
* Implement subtract
...
* Merge add code into logical code
llvm-svn: 4503
2002-11-02 20:13:22 +00:00
Chris Lattner
5d1648c792
shuffle code around a bit, implement and, or, xor
...
llvm-svn: 4502
2002-11-02 20:04:26 +00:00
Chris Lattner
45000f0eb7
Add PHI node support, add comment for branch function
...
llvm-svn: 4500
2002-11-02 19:45:49 +00:00
Chris Lattner
d4010481a7
Implement unconditional branching support
...
llvm-svn: 4498
2002-11-02 19:27:56 +00:00
Chris Lattner
2634141328
* Fix nonconstant shift case
...
* Turn table into 2d table
llvm-svn: 4496
2002-11-02 01:41:55 +00:00
Chris Lattner
14ce86f5b0
Use a more table driven approach to handling types. Seems to simplify the
...
code a bit
llvm-svn: 4493
2002-11-02 01:15:18 +00:00
Chris Lattner
ef1d6548bb
Make switch statements denser, but only because of the follow-on patch
...
llvm-svn: 4492
2002-11-02 00:49:56 +00:00
Chris Lattner
b3e08ace0c
* Remove dead variable
...
* Shift amount is always guaranteed to be 8 bits
llvm-svn: 4491
2002-11-02 00:44:25 +00:00
Brian Gaeke
2ad8a9cf8b
InstSelectSimple.cpp: Include llvm/iOther.h for ShiftInst.
...
Add ISel::visitShiftInst() to instruction select shift instructions.
Add a comment in visitAdd about how to do 64 bit adds.
X86InstrInfo.def: Add register-to-register move opcodes and shift opcodes.
llvm-svn: 4477
2002-10-31 23:03:59 +00:00
Chris Lattner
dbf49d6266
Reassociate pass now works
...
llvm-svn: 4473
2002-10-31 17:16:18 +00:00
Vikram S. Adve
913883dd6e
In getID(), don't call getValidSymbolName to mangle external names!
...
llvm-svn: 4451
2002-10-30 20:16:38 +00:00
Chris Lattner
47bbeeac43
Add lots more info
...
llvm-svn: 4450
2002-10-30 06:04:46 +00:00
Chris Lattner
cbbc96bd8d
Make sure to set the destination register correctly
...
llvm-svn: 4444
2002-10-30 01:49:01 +00:00
Chris Lattner
d18210e53f
Set the destination register field based on the target specific flags
...
llvm-svn: 4442
2002-10-30 01:15:31 +00:00
Chris Lattner
80f1f696e8
Add flag to specify when no value is produced by an instruction
...
llvm-svn: 4441
2002-10-30 01:09:34 +00:00
Chris Lattner
9e8fab4aa1
Sparc backend doesn't use target specific flags yet
...
llvm-svn: 4440
2002-10-30 01:07:12 +00:00
Chris Lattner
a8069b87b3
Implement the new optional getRegisterInfo
...
llvm-svn: 4437
2002-10-30 00:56:18 +00:00
Chris Lattner
faa5c82486
Print machine code after instruction selection
...
llvm-svn: 4434
2002-10-30 00:47:49 +00:00
Chris Lattner
40d5ff97c1
Make sure to pass the LLVM basic block in
...
llvm-svn: 4433
2002-10-30 00:47:40 +00:00
Chris Lattner
4352ba0640
Construct annotation, to make sure it's attached to function
...
llvm-svn: 4429
2002-10-29 23:40:58 +00:00
Chris Lattner
d3b57a0084
Convert backend to use passes, implement X86TargetMachine
...
llvm-svn: 4421
2002-10-29 22:37:54 +00:00
Chris Lattner
5e881d4c19
These are no longer virtual methods
...
llvm-svn: 4420
2002-10-29 22:01:44 +00:00
Chris Lattner
5d798b7887
* Privatize the TargetName
...
* Move optSizeForSubWordData to TargetData
* Remove unused fields
llvm-svn: 4417
2002-10-29 21:48:17 +00:00
Chris Lattner
94fb0d4b03
Implement findOptimalStorageSize a bit more generally
...
llvm-svn: 4416
2002-10-29 21:47:50 +00:00
Chris Lattner
eec571dce8
Allow TargetMachine to refuse static code gen
...
llvm-svn: 4415
2002-10-29 21:12:46 +00:00
Chris Lattner
82479f668c
Rename X86InstructionInfo to X86InstrInfo
...
llvm-svn: 4413
2002-10-29 21:05:24 +00:00
Chris Lattner
0518ad4aea
Minor renaming
...
llvm-svn: 4410
2002-10-29 20:48:56 +00:00
Chris Lattner
bc44fbfd6d
Remove unneccesary #includes
...
llvm-svn: 4408
2002-10-29 20:47:46 +00:00
Chris Lattner
d589e36f4e
Rename Sparc.h to TargetMachineImpls.h
...
llvm-svn: 4407
2002-10-29 20:47:26 +00:00
Chris Lattner
a1ab3b1636
Reenable X86 backend, even though it doesn't do much, at least it compiles
...
llvm-svn: 4404
2002-10-29 20:29:34 +00:00
Vikram S. Adve
fa70a60209
Bug fix: align size for dynamic allocas according to stack pointer
...
alignment restrictions. This is incomplete for one case.
llvm-svn: 4397
2002-10-29 19:37:31 +00:00
Chris Lattner
af52d6564a
Switch to generating machineinstr's instead of MInstructions
...
llvm-svn: 4396
2002-10-29 17:43:55 +00:00
Chris Lattner
483afe2221
Be compatible with sparc backend
...
llvm-svn: 4395
2002-10-29 17:43:38 +00:00
Chris Lattner
9e3867d6d3
Implement MachineInstrInfo interface
...
llvm-svn: 4394
2002-10-29 17:43:19 +00:00
Chris Lattner
f963781fcb
Switch to different flag set
...
llvm-svn: 4393
2002-10-29 17:42:40 +00:00
Chris Lattner
79caf1109b
Move TargetInstrDescriptors to MachineInstrInfo.cpp
...
llvm-svn: 4391
2002-10-29 17:37:48 +00:00
Chris Lattner
1a53fc24c7
*** empty log message ***
...
llvm-svn: 4390
2002-10-29 17:35:41 +00:00
Chris Lattner
e185af9a93
MachineInstrInfo doesn't need a TargetMachine
...
llvm-svn: 4372
2002-10-29 15:45:20 +00:00
Chris Lattner
dfc584443d
Don't build X86 target until it builds properly again
...
llvm-svn: 4369
2002-10-28 23:56:41 +00:00
Chris Lattner
75d561d6f9
Seperate code out of TargetMachine into MachineInstrInfo
...
llvm-svn: 4368
2002-10-28 23:55:33 +00:00
Chris Lattner
152b53fc64
Initial stab at MachineInstr'ication
...
llvm-svn: 4367
2002-10-28 23:55:19 +00:00
Chris Lattner
f262fc83e2
Use BuildMI instead of explicit code.
...
llvm-svn: 4362
2002-10-28 21:43:57 +00:00
Chris Lattner
566b2147f9
Remove all traces of the "Opcode Mask" field in the MachineInstr class
...
llvm-svn: 4359
2002-10-28 21:17:20 +00:00
Chris Lattner
51efa81c85
Fix minor bug
...
llvm-svn: 4355
2002-10-28 20:11:17 +00:00
Chris Lattner
02d7156e35
Don't pass default args
...
llvm-svn: 4354
2002-10-28 20:10:56 +00:00
Misha Brukman
c4be791be2
Fixed spelling and grammar.
...
llvm-svn: 4353
2002-10-28 20:01:52 +00:00
Misha Brukman
6f3b1a31a1
Rewrote uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
...
llvm-svn: 4352
2002-10-28 20:01:13 +00:00
Misha Brukman
f9d06cfc80
Replaced uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
...
llvm-svn: 4351
2002-10-28 20:00:31 +00:00
Chris Lattner
8ce9d60bc0
Don't bother passing in default value
...
llvm-svn: 4347
2002-10-28 19:46:25 +00:00
Chris Lattner
9a346a4ded
Fixes to work with updated RegAlloc
...
llvm-svn: 4345
2002-10-28 19:32:07 +00:00
Chris Lattner
dce9493440
Make sched class unsigned
...
llvm-svn: 4336
2002-10-28 04:59:43 +00:00
Chris Lattner
e309cdbc95
Rename the redundant MachineOperand::getOperandType() to MachineOperand::getType()
...
llvm-svn: 4331
2002-10-28 04:45:29 +00:00
Chris Lattner
df1d87f5f3
*** empty log message ***
...
llvm-svn: 4323
2002-10-28 02:01:37 +00:00
Chris Lattner
b8c6acfbc0
Rename MachineCodeForBasicBlock to MachineBasicBlock
...
llvm-svn: 4318
2002-10-28 01:41:47 +00:00
Chris Lattner
33b00d8186
Move machine code generation/destruction passes out of Sparc.cpp because
...
they are generic
llvm-svn: 4310
2002-10-28 01:12:41 +00:00
Chris Lattner
e15e3807a1
Move addPassesToEmitAssembly from TargetMachine to UltraSparc because it
...
really is sparc specific.
llvm-svn: 4308
2002-10-28 01:03:43 +00:00
Misha Brukman
142795fd17
Changed MachineCodeForMethod' to
MachineFunction'.
...
llvm-svn: 4301
2002-10-28 00:28:31 +00:00
Chris Lattner
28d6f5bc40
Remove dead fixme
...
llvm-svn: 4300
2002-10-27 21:23:43 +00:00
Chris Lattner
e4e731b30c
Instruction select constant arguments correctly
...
llvm-svn: 4297
2002-10-27 21:16:59 +00:00
Chris Lattner
046cb65220
Add instruction definitions for mov r, imm instructions
...
llvm-svn: 4296
2002-10-27 21:16:44 +00:00
Chris Lattner
cf9b4b2971
change ++ to +1 when using random access iterators
...
llvm-svn: 4292
2002-10-27 19:09:51 +00:00
Chris Lattner
d25a097994
Initial checkin of X86 backend.
...
We can instruction select exactly one instruction 'ret void'. Wow.
llvm-svn: 4284
2002-10-25 22:55:53 +00:00
Chris Lattner
cfa05a3de9
Build the X86 target as well
...
llvm-svn: 4283
2002-10-25 22:55:05 +00:00
Chris Lattner
25173c1b4d
Prune #includes
...
llvm-svn: 4277
2002-10-25 02:01:33 +00:00
Chris Lattner
877a38f48e
Fix misspelling
...
llvm-svn: 4276
2002-10-25 01:43:26 +00:00
Chris Lattner
b43b03614e
Minor cleanups
...
Make sure to have a pass name
llvm-svn: 4268
2002-10-23 01:12:01 +00:00
Chris Lattner
dfc8fbf16b
- Two minor improvements to the MachineInstr class to reduce footprint and
...
overhead: Merge 3 parallel vectors into 1, change regsUsed hash_set to be a
bitvector. Sped up LLC a little less than 10% in a debug build!
llvm-svn: 4261
2002-10-22 23:16:21 +00:00
Chris Lattner
6515ec02aa
Make sure to escape \'s when they are output
...
llvm-svn: 4179
2002-10-15 19:56:24 +00:00
Chris Lattner
294eae6735
- Add an endianness field to the TargetData datastructure
...
llvm-svn: 4174
2002-10-14 22:41:13 +00:00
Vikram S. Adve
e4413c5804
Print "circular" warning message only in debug mode.
...
llvm-svn: 4170
2002-10-14 16:32:49 +00:00
Vikram S. Adve
3cb2d3379d
Removed misleading const keyword.
...
llvm-svn: 4169
2002-10-14 16:32:24 +00:00
Chris Lattner
b16f596ab4
Allow emission of names that start with an underscore. This is needed to
...
interface with code that uses symbols in the ansi-c protected namespace. In
most cases this comes from system header files, such as stdio.h. In particular,
without this change, a reference to the __iob symbol is mangled into ll_iob,
which is not resolved by libc.
llvm-svn: 4165
2002-10-14 06:14:18 +00:00
Vikram S. Adve
c6fe6822ca
Don't try to compute the size of an "array" element if the index is 0:
...
the size may be unknown, and is not needed.
llvm-svn: 4153
2002-10-13 21:47:44 +00:00
Chris Lattner
fdf2ca9468
- Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
...
reflect the fact that it's a range being defined.
llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Vikram S. Adve
7387d96d6a
Use vectors instead of hash_maps for issueGaps and conflictLists.
...
These hash lookups were a major sink of time because they happen so often!
llvm-svn: 4136
2002-10-13 00:37:46 +00:00
Vikram S. Adve
7b920c5768
Run LICM before GCSE!
...
llvm-svn: 4135
2002-10-13 00:34:10 +00:00
Vikram S. Adve
7436df838d
Several major fixes, particularly in emitting constant aggregates:
...
(1) Padding bytes between structure fields (for alignment) were never
being emitted into the constant pool so the layout did not match!
(2) In printing constants, structures containing structures or arrays
were never handled.
(3) Support new model for external/uninitialized/initialized globals.
Uninitialized globals are no longer emitted since they are external.
Initialized globals may go either in .bss or in .data.
llvm-svn: 4134
2002-10-13 00:32:18 +00:00
Vikram S. Adve
032dee9564
Don't use %l0 for large operands to a SAVE since it is needed *before* SAVE!
...
We now use %g1 instead since that is shared and volatile.
llvm-svn: 4133
2002-10-13 00:24:06 +00:00
Vikram S. Adve
84fa49d0e5
Don't mark JMPLCALL and JMPLRET as branches.
...
llvm-svn: 4132
2002-10-13 00:22:32 +00:00
Vikram S. Adve
c78e160ede
(1) Try to evaluate constant when multiplying 2 constants.
...
(2) Use intelligent multiply selection code for array allocas.
(3) Don't use cache padding for alloca'd stack slots!
(4) Bug fix in handling call arguments: was not copying sixth FP arg
to int reg. when calling a function with no prototype.
llvm-svn: 4130
2002-10-13 00:18:57 +00:00
Vikram S. Adve
df4ed78bc9
Eliminate duplicate target pointer in SparcRegInfo.
...
llvm-svn: 4129
2002-10-13 00:06:04 +00:00
Vikram S. Adve
6b459791f7
Eliminate duplicate target pointer. Also add a few assertions.
...
llvm-svn: 4128
2002-10-13 00:05:30 +00:00
Vikram S. Adve
dc9d94262d
Make sure to handle small negative values hiding as large unsigned longs --
...
this is a common case created by the front-end.
llvm-svn: 4127
2002-10-13 00:04:26 +00:00
Vikram S. Adve
29dd99d98b
Major fix: extract ConstantExpr nodes and decompose them into symbolic
...
instructions so that (a) constant folding is done automatically before
code generation, and (b) selection does not have to deal with them.
Also, check for ConstantPointerRefs in additional to GlobalValues
when creating a GEP to load a global address.
llvm-svn: 4126
2002-10-13 00:01:57 +00:00
Vikram S. Adve
eb6d37c32b
Return address register should be marked as "result" for the JMPL instruction
...
since it is defined by the instruction.
llvm-svn: 3966
2002-09-28 17:00:15 +00:00
Vikram S. Adve
06742cc0e0
Live ranges for Return value and return address of a Call are no longer
...
created here. Instead they are created in LiveRangeInfo.cpp. This
simplifies the code here quite a bit.
llvm-svn: 3965
2002-09-28 16:59:05 +00:00
Vikram S. Adve
1aed35b2e5
Simplified code that handles call args and rets, so it no longer
...
needs the RegClass list to be passed in.
llvm-svn: 3964
2002-09-28 16:56:59 +00:00
Vikram S. Adve
33b21ec523
Simplify Call translation slightly.
...
llvm-svn: 3963
2002-09-28 16:55:41 +00:00
Vikram S. Adve
940f3fa91b
Overhaul integer conversions to match C++ ISO standard.
...
Don't allow direct FP-to-uint conversion (must be eliminated by preselection).
Address arithmetic for arrays is now entirely 64-bit so no sign-ext needed.
llvm-svn: 3961
2002-09-27 14:33:08 +00:00
Vikram S. Adve
ae0af2a164
Modify operand order for Create{Sign,Zero}ExtensionInstructions.
...
llvm-svn: 3960
2002-09-27 14:29:45 +00:00
Vikram S. Adve
2a87b4496f
Bug fix: some redundant copies were not being deleted after detection :-|.
...
llvm-svn: 3959
2002-09-27 14:27:37 +00:00
Vikram S. Adve
6cff79b3e1
Decompose FP-to-UInt casts into FP-to-ULong-toUInt.
...
llvm-svn: 3957
2002-09-27 14:24:45 +00:00
Chris Lattner
0f9d9214ab
Convert TargetData to be an ImmutablePass
...
llvm-svn: 3927
2002-09-25 23:46:55 +00:00
Vikram S. Adve
a7e73bb0a0
Put intermediate source files in a subdirectory here instead of with
...
object files. Also,
llvm-svn: 3884
2002-09-23 13:12:28 +00:00
Vikram S. Adve
20fc3f0ffd
Disable reassociation pass in LLC until it is fixed.
...
llvm-svn: 3883
2002-09-23 12:55:50 +00:00
Anand Shukla
a34898d9ac
Changed codegen to add 2 empty slots at the top of stack using StackSlots pass
...
llvm-svn: 3873
2002-09-21 05:01:21 +00:00
Anand Shukla
508121e5d9
Initial version: it adds 2 empty slots at the top of stack
...
llvm-svn: 3872
2002-09-21 04:58:26 +00:00
Vikram S. Adve
bcab1ae6c9
Add peephole optimization pass at the end of code generation.
...
llvm-svn: 3846
2002-09-20 00:52:43 +00:00
Vikram S. Adve
ed466a713a
Added class MachineOptInfo as interface to target-specific
...
routines supporting machine code optimization.
Also added method MachineInstrInfo::getNOPOpCode().
llvm-svn: 3845
2002-09-20 00:52:09 +00:00
Vikram S. Adve
82b15d7253
Peephole optimization pass on final machine code.
...
llvm-svn: 3840
2002-09-20 00:42:11 +00:00
Vikram S. Adve
6f0ad9998b
Moving these files from Code/PreSelection to here.
...
Original logs for PreSelection.cpp:
revision 1.2
date: 2002/09/17 23:50:32; author: lattner; state: Exp; lines: +1 -3
Don't put default parameter values into .cpp files, it breaks 3.x compilers
revision 1.1
date: 2002/09/16 15:31:13; author: vadve; state: Exp;
New preselection pass that specializes LLVM code for a target machine,
while remaining in legal portable LLVM form and preserving type
information and type safety.
llvm-svn: 3838
2002-09-20 00:29:28 +00:00
Anand Shukla
4a62f43843
Removed debug info printing
...
llvm-svn: 3778
2002-09-17 20:24:46 +00:00
Vikram S. Adve
d43591bbc5
Use ulong instead of uint for size expressions.
...
llvm-svn: 3744
2002-09-16 15:56:45 +00:00
Vikram S. Adve
59b3b6c07b
Add methods to query about the representation of LLVM quantities (e.g.,
...
constants). Useful for target-dependent LLVM transformations like
Preselection.
llvm-svn: 3743
2002-09-16 15:56:01 +00:00
Vikram S. Adve
571ad069cc
Don't print out global names unnecesssarily. Also, expose pass
...
constructors so passes can be inserted by TargetMachine.cpp.
llvm-svn: 3742
2002-09-16 15:54:02 +00:00
Vikram S. Adve
58678cc06e
Move all the code that creates code generation passes from Sparc.cpp to
...
TargetMachine.cpp, since it is entirely machine-independent.
Also, add options to disable optional back-end passes (preselection and
instr. scheduling).
llvm-svn: 3740
2002-09-16 15:39:26 +00:00
Misha Brukman
9e054e1d17
Again, including Module makes Function unnecessary.
...
llvm-svn: 3714
2002-09-14 02:07:43 +00:00
Chris Lattner
cb973bf5ee
- Change getelementptr instruction to use long indexes instead of uint
...
indexes for sequential types.
llvm-svn: 3683
2002-09-11 01:21:35 +00:00
Chris Lattner
fb017cb38c
- Change getelementptr instruction to use long indexes instead of uint
...
indexes for sequential types.
llvm-svn: 3682
2002-09-11 01:21:33 +00:00
Vikram S. Adve
1b1f2b2f5e
Silly bug fix: Machine code vector could be empty for a no-op cast instruction,
...
e.g., cast double to double.
llvm-svn: 3633
2002-09-09 14:54:21 +00:00
Vikram S. Adve
58e8292647
Add new function UltraSparcInstrInfo::CreateZeroExtensionInstructions.
...
llvm-svn: 3581
2002-09-05 18:34:31 +00:00
Vikram S. Adve
e9990478f0
Bug fixes in casting between floats and ints smaller than 64 bits.
...
Add UltraSparcInstrInfo::CreateZeroExtensionInstructions to help with that.
llvm-svn: 3580
2002-09-05 18:33:59 +00:00
Vikram S. Adve
94b41af2f3
-- Use size of pointer element type instead of pointer type in array offsets!
...
-- A few bug fixes in casting between floats and ints.
-- Use SRL reg, 0 instead of AND reg, 0xffffffff to clear high 32 bits.
llvm-svn: 3579
2002-09-05 18:32:13 +00:00
Vikram S. Adve
e7aa2bf095
-- Bug fix: use byte offsets not typed offsets in output assembly!
...
-- Add support for ConstantExpr constants (only cast and add operators so far)
-- Avoid generating label Bbss.bss, which sometimes came out twice.
llvm-svn: 3578
2002-09-05 18:28:10 +00:00
Chris Lattner
3ce5b343c5
- Renamed Type::isIntegral() to Type::isInteger()
...
- Added new method Type::isIntegral() that is the same as isInteger, but
also accepts bool.
llvm-svn: 3574
2002-09-03 01:08:28 +00:00
Anand Shukla
9a0d43e242
moved this file from lib/Reoptimizer/Mapping
...
llvm-svn: 3519
2002-08-27 22:47:33 +00:00
Anand Shukla
b18da43529
Added getFunctionInfo and MappingInfoForFunction pass, and fixed the earlier error in compiling
...
llvm-svn: 3513
2002-08-27 16:45:17 +00:00
Vikram S. Adve
87367a8b67
LoadIdx non-terminal no longer needed.
...
llvm-svn: 3499
2002-08-24 20:58:04 +00:00
Vikram S. Adve
96a4efb0a6
Sign-extend values used to index arrays (and Simplify
...
SetOperandsForMemInstr significantly). Load and Store
no longer have any indices. Eliminate spurious sign-extension
on a cast to float/double.
llvm-svn: 3498
2002-08-24 20:56:53 +00:00
Vikram S. Adve
ec7858cc82
Fix sign-extension: it needs to happen *after* multiplying by type size.
...
llvm-svn: 3497
2002-08-24 14:44:58 +00:00
Vikram S. Adve
da747e6066
Simplify previous hack slightly.
...
llvm-svn: 3490
2002-08-23 03:21:01 +00:00
Vikram S. Adve
ced94f5f61
Force sign-extension for uint array indexes from 32-bit to 64-bits
...
since uint is not normally sign-extended when casting to uint64_t.
llvm-svn: 3489
2002-08-23 02:55:51 +00:00
Chris Lattner
9f18db8156
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3488
2002-08-22 23:37:24 +00:00
Chris Lattner
821de50a04
Change code to not use the copyOperands method added to User. It's now
...
more efficient to boot.
llvm-svn: 3453
2002-08-22 15:57:58 +00:00
Vikram S. Adve
e6c5ceeede
Fix two resource names.
...
llvm-svn: 3443
2002-08-22 02:58:57 +00:00
Vikram S. Adve
098c5d67ba
Add AsmPrinter::ConstantExprToString, which writes out a ConstantExpr
...
as an expression.
llvm-svn: 3442
2002-08-22 02:58:36 +00:00
Vikram S. Adve
39210a39ad
Eliminate bool, boolreg and boolconst nonterminals, and just use
...
reg and Constant instead.
llvm-svn: 3441
2002-08-22 02:56:10 +00:00
Vikram S. Adve
dae1fe230e
Change rules for Not, since it is now implemented as Xor(reg,11..1).
...
Eliminate bool, boolreg and boolconst nonterminals, and just use
reg and Constant instead.
llvm-svn: 3440
2002-08-22 02:55:21 +00:00
Chris Lattner
a477df934f
This case JUST handles constantpointer nulls, not all pointers.
...
llvm-svn: 3402
2002-08-20 17:02:48 +00:00
Vikram S. Adve
5e22d4f669
Revise code generation for unary Not (boolean and bitwise), which is
...
no longer a separate instruction but is instead implemented with XOR.
llvm-svn: 3342
2002-08-15 14:17:37 +00:00
Vikram S. Adve
19b35e6904
Bug fix in TargetData::getIndexedOffset: We were using the pointer
...
type instead of the element type for the element size for arrays.
llvm-svn: 3302
2002-08-13 18:17:56 +00:00
Vikram S. Adve
74af31c71e
Several bug fixes in casting to signed int values.
...
llvm-svn: 3301
2002-08-13 18:04:08 +00:00
Vikram S. Adve
5f028d4787
Handle small unsigned results correctly by clearing high bits.
...
Bug fixes in casting to signed int values.
llvm-svn: 3297
2002-08-13 17:40:54 +00:00
Brian Ensink
8395e5b203
Build correctly in the face of /shared.
...
-Chris
llvm-svn: 3296
2002-08-12 22:09:44 +00:00
Chris Lattner
4c524344b9
- Clean up interface to Sparc register handling a bit:
...
- Eliminate Sparc*Order classes, moving contents to Sparc*Class classes
- get register name methods now return const char * const pointers instead
of std::string's.
- Added file header comments to SparcRegClassInfo.(cpp|h)
- Moved BIG constant arrays out of SparcRegClassInfo.h, into
SparcRegInfo.cpp. This should allow a LOT of std::string constructors to
not have to be called.
llvm-svn: 3295
2002-08-12 21:25:05 +00:00
Chris Lattner
8a4787495a
* Removed extraneous #includes
...
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3278
2002-08-09 20:08:06 +00:00
Chris Lattner
4d9fadc44a
* Removed extraneous #includes
...
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3277
2002-08-09 20:08:03 +00:00
Chris Lattner
811987ce5c
Merge three loops into one.
...
llvm-svn: 3259
2002-08-07 21:39:48 +00:00
Chris Lattner
73ed86900d
Fix breakage in the build
...
llvm-svn: 3258
2002-08-07 21:39:39 +00:00
Mehwish Nagda
0517186a70
added Mapping and Function Pass
...
llvm-svn: 3251
2002-08-05 23:23:19 +00:00
Vikram S. Adve
5d16e242e1
Bug fix in CreateCodeToLoadConst(): use sign of dest, not operand,
...
in choosing how to create int-set instructions.
llvm-svn: 3248
2002-08-04 20:55:37 +00:00
Vikram S. Adve
9dd19151b8
Bug fix in TargetData::getIndexedOffset(): handle struct offset
...
after array offset correctly. The type was not being updated for
array offsets!
llvm-svn: 3246
2002-08-04 20:52:39 +00:00
Vikram S. Adve
03a5ca5dcc
Bug fix in SetOperandsForMemInstr: handle leading zeros correctly
...
when folding or not folding GEPs.
llvm-svn: 3245
2002-08-04 20:51:05 +00:00
Chris Lattner
6f818d501c
Fix compilation problem. IsIndexZero doesn't exist, use IsZero instead.
...
llvm-svn: 3243
2002-08-03 20:57:38 +00:00
Vikram S. Adve
6316385f3e
Simplified handling of array indexes in SetMemOperands_Internal.
...
llvm-svn: 3236
2002-08-03 13:48:21 +00:00
Vikram S. Adve
02b632401c
Bug fix: incorrect SAVE instruction when using register for stack size.
...
llvm-svn: 3198
2002-08-01 14:26:11 +00:00
Vikram S. Adve
836a811861
Just improved comments and assertions.
...
llvm-svn: 3191
2002-07-31 21:13:31 +00:00
Vikram S. Adve
d5185db5e8
Add a missing case: converting float/double to unsigned integer types.
...
llvm-svn: 3188
2002-07-31 21:01:34 +00:00
Chris Lattner
82f80aaa16
* Move InstructionSelection pass to lib/CodeGen/InstrSelection so it is
...
shared by backends.
llvm-svn: 3146
2002-07-30 03:56:16 +00:00
Mehwish Nagda
07aeba2eb9
changed implementation of LLVM BYTECODE Length
...
llvm-svn: 3089
2002-07-25 17:22:48 +00:00
Chris Lattner
05fe67c0d2
*** empty log message ***
...
llvm-svn: 3075
2002-07-25 06:17:51 +00:00
Chris Lattner
49ed01e60d
GCC 3.1 changes, finally the burm file builds the FIRST time a clean directory is built.
...
llvm-svn: 3073
2002-07-25 06:08:32 +00:00
Chris Lattner
9860e64083
*** empty log message ***
...
llvm-svn: 3056
2002-07-24 21:21:32 +00:00