Commit Graph

4833 Commits

Author SHA1 Message Date
Chris Lattner 6b61f97a8f Allow folding together two globals through type resolution
llvm-svn: 5038
2002-12-15 16:32:21 +00:00
Chris Lattner d53daec3e1 planes is not spelled with an O
llvm-svn: 5037
2002-12-15 16:20:23 +00:00
Chris Lattner 443d236464 Testcase identified by Brian Gaeke that breaks the C frontend...
llvm-svn: 5036
2002-12-15 15:52:03 +00:00
Chris Lattner 477af9d0fa Fix borkness with not using MachineBasicBlocks in PHI nodes
llvm-svn: 5035
2002-12-15 08:02:51 +00:00
Chris Lattner 3263e5787f 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 ce35108606 Use MachineOperand::isFoo methods instead of our own global functions
llvm-svn: 5033
2002-12-15 08:01:39 +00:00
Chris Lattner 0345ea6908 Add capability to have a MachineBasicBlock as an operand to a MachineInstr
Add a bunch of methods to MachineOperand is* to reduce usage of MO_foo

llvm-svn: 5032
2002-12-15 08:01:02 +00:00
Chris Lattner 97c6c7461b New testcase for bool support
llvm-svn: 5031
2002-12-15 07:55:43 +00:00
Chris Lattner 3aa7767352 Fix a huge performance problem in reassociate by introducing a
rank map cache for instruction ranks

llvm-svn: 5030
2002-12-15 03:56:00 +00:00
Chris Lattner f96c8befe0 Minor changes:
* Reword comment to make more clear
  * Don't print out BB's after modification made
  * Don't delete and new an instruction when we need to move something, just move it.

llvm-svn: 5029
2002-12-15 03:49:50 +00:00
Chris Lattner c451fb4efd Make stuff compiled with gccld not dump into the debugger if there's a problem
llvm-svn: 5028
2002-12-14 21:28:32 +00:00
Chris Lattner 7857616402 Pass command line arguments to main
llvm-svn: 5027
2002-12-13 16:48:57 +00:00
Chris Lattner bf6ad7d307 Add statistic
llvm-svn: 5026
2002-12-13 15:28:42 +00:00
Chris Lattner db133dbbd3 Test indirect call
llvm-svn: 5025
2002-12-13 14:15:20 +00:00
Chris Lattner c4eb1ed23c Implement indirect function calls
llvm-svn: 5024
2002-12-13 14:13:27 +00:00
Misha Brukman ca8eb8af18 Make function code generation printing debug-only.
llvm-svn: 5023
2002-12-13 13:16:14 +00:00
Misha Brukman a9b58a6e0f Made status output debug-only (for testing diffs against lli).
llvm-svn: 5022
2002-12-13 13:15:36 +00:00
Chris Lattner a1cf9a7c0a Fix bork in doMultiply
llvm-svn: 5021
2002-12-13 13:07:42 +00:00
Chris Lattner f1874b0677 Add sanity checks
llvm-svn: 5020
2002-12-13 13:04:04 +00:00
Misha Brukman a1aa29b125 Fixed a bug where moves due to phis were being neglected.
llvm-svn: 5019
2002-12-13 12:33:31 +00:00
Chris Lattner 371a878863 New testcase
llvm-svn: 5018
2002-12-13 12:10:16 +00:00
Misha Brukman 3374ec7c1b 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
Misha Brukman 86ca8840a1 Need to insert all moves due to PHI nodes before *ALL* jumps in a predecessor
basic block, as there could be multiple.

llvm-svn: 5016
2002-12-13 11:55:59 +00:00
Chris Lattner d4c5013c04 Insert phi code at top of block
llvm-svn: 5015
2002-12-13 11:52:34 +00:00
Brian Gaeke 61edd534b4 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
Misha Brukman 35a358d981 This should be more correct: invalidates physical registers that are used in
an instruction to avoid using them to allocate to other virtual registers.

llvm-svn: 5013
2002-12-13 11:33:22 +00:00
Chris Lattner 0a37046358 Implement cast bool to X
llvm-svn: 5012
2002-12-13 11:31:59 +00:00
Brian Gaeke 85b78b7372 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 825be9ad5d Finish up iterator stuph
llvm-svn: 5009
2002-12-13 10:50:40 +00:00
Misha Brukman 121ae7d3a7 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
Misha Brukman 89ff3fbcd6 Fixed bug with running out of registers. Also, reinstated namespace which
disappeared during the last checkin.

llvm-svn: 5007
2002-12-13 10:42:31 +00:00
Chris Lattner eda9c79bbf Return success on success
llvm-svn: 5006
2002-12-13 10:13:45 +00:00
Chris Lattner 62ccf91463 Test more phi stuff
llvm-svn: 5005
2002-12-13 10:12:50 +00:00
Chris Lattner e189edf272 Code gen phi's correctly
llvm-svn: 5004
2002-12-13 10:09:43 +00:00
Chris Lattner 2889d2e50c Print X86 PHI nodes in a sane manner
llvm-svn: 5003
2002-12-13 09:59:26 +00:00
Misha Brukman a739167305 This should handle register allocating PHI nodes.
llvm-svn: 5002
2002-12-13 09:54:36 +00:00
Misha Brukman 78401cbb3c Added moveReg2Reg() and moveImm2Reg() to accomodate moving data around due to
PHI nodes.

llvm-svn: 5001
2002-12-13 09:54:12 +00:00
Chris Lattner 34cd32d42a Final version of BuildMI for symmetry and because I want to use it
llvm-svn: 5000
2002-12-13 09:33:06 +00:00
Brian Gaeke eaeacc5872 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 44876fdee4 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 a8d8e0d9dd Get rid of deprecated function
llvm-svn: 4997
2002-12-13 07:30:45 +00:00
Chris Lattner c93799b779 return 0 on success
llvm-svn: 4996
2002-12-13 06:57:24 +00:00
Chris Lattner 179519bf77 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 4e2c30d894 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 588806f5af getelementptr uses long instead of uint indexes
llvm-svn: 4993
2002-12-13 06:01:21 +00:00
Chris Lattner 295a415a31 Stop sucking
llvm-svn: 4992
2002-12-13 05:51:32 +00:00
Misha Brukman 999f5d6fb8 Making main() return 0 so that we know it ran successfully when it exits.
llvm-svn: 4991
2002-12-13 05:44:21 +00:00
Misha Brukman 3bbfca1401 Making main() return 0 to exit without error when no error actually occurs.
llvm-svn: 4990
2002-12-13 05:43:36 +00:00
Chris Lattner f243ce960a Fix testcase
llvm-svn: 4989
2002-12-13 05:42:57 +00:00
Chris Lattner 7ccef07786 Implement branches
llvm-svn: 4988
2002-12-13 05:40:28 +00:00