Commit Graph

2716 Commits

Author SHA1 Message Date
Chris Lattner
439a27ac42 Add mechanism to select register allocator to use
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5079 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 16:15:51 +00:00
Chris Lattner
b74e83c898 Initial checkin of "local" register allocator. Bugs are still present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5078 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 16:15:28 +00:00
Chris Lattner
92aec04cd6 Try #2 to get alias set stuff to work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5077 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 16:14:51 +00:00
Chris Lattner
1894dd6ca9 Add comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5076 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 15:57:44 +00:00
Chris Lattner
c2fc7ea60b Add info about register aliases, add prototype for createLocalRegisterAllocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5075 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 15:55:51 +00:00
Chris Lattner
dfb0a541c7 Add info about register file aliasing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5074 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 15:55:25 +00:00
Chris Lattner
1a49517a2c Add information about register file aliasing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5073 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 15:54:59 +00:00
Chris Lattner
880eaa5985 Add call clobber info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5072 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 15:54:42 +00:00
Chris Lattner
1a45626c4c Rename createSimpleX86RegisterAllocator to createSimpleRegisterAllocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5071 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 14:38:13 +00:00
Chris Lattner
1d62cea90b Rename createSimpleX86RegisterAllocator to createSimpleRegisterAllocator.
Remvoe some dead code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5070 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 14:37:00 +00:00
Brian Gaeke
68b1edca76 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5069 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-16 04:23:29 +00:00
Chris Lattner
b167c04e62 Some simpliciations to the spill/reload interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5067 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 23:01:26 +00:00
Chris Lattner
8ed9eb5ca3 Simplify PHI node elimination significantly by doing it as a prepass to
register allocation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5066 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 22:39:53 +00:00
Chris Lattner
f4b95d94e2 Correct the setting of Def flags on registers that are modified!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5065 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 22:38:47 +00:00
Chris Lattner
9f366d7ab6 Variety of small or trivial simplifications to the code, completely eliminated
the dependence on PhysRegClassMap


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5064 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 22:19:19 +00:00
Chris Lattner
f605055994 Remove unused savePhysRegToStack method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5061 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 21:33:51 +00:00
Chris Lattner
01b08c59b4 Localize a map, remove another
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5060 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 21:24:30 +00:00
Chris Lattner
f0eb7beb66 Give passes nice names!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5059 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 21:13:40 +00:00
Chris Lattner
8233e2fe01 Give simple reg allocator a nice Pass Name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5058 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 21:13:12 +00:00
Chris Lattner
15f96db4d9 Add a big assert making sure 2 address instructions are formed right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5057 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 21:02:20 +00:00
Chris Lattner
3f91ad7ba7 Fix a problem that occurs when PHI nodes have multiple entries for the same predecessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5055 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 20:48:03 +00:00
Chris Lattner
da7e453aac Grab bag of minor cleanups. Export some statistics about the number of
spills and reloads emitted


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5054 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 20:36:09 +00:00
Chris Lattner
2109f502d6 Implement printing of MBB arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5053 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 20:35:25 +00:00
Chris Lattner
198ab640bb Simplify interfaces used by regalloc to insert code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5052 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 20:06:35 +00:00
Chris Lattner
c2db1a95df * Simplify code a bit by breaking the PHI node handling stuff out into a seperate
function from normal regalloc code
* Make the regalloc for a block a function instead of part of runOnMachineBB, which
  makes it easier to see what's going on in runOnMBB.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5051 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 19:51:14 +00:00
Chris Lattner
afe628c1d6 Changes to make new TargetRegisterClass interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5050 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 19:29:34 +00:00
Chris Lattner
9593fb1503 * Remove some unneccesary instance variables
* Make allocateStackSpaceFor only allocate the right amount of space


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5048 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 19:07:34 +00:00
Chris Lattner
439b76730d * Simplify TargetRegisterClass implementations
* Change regclass iterators to use an extra level of pointers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5047 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 18:40:36 +00:00
Chris Lattner
dd444f9242 pull inverse reg class mapping into a class that is sharable and out of the
target register description classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5045 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 18:38:59 +00:00
Chris Lattner
abe8dd592d Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5044 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 18:19:24 +00:00
Chris Lattner
ad44bd99ff Remove extraneous #includes, perform FIXME
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5043 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 18:15:24 +00:00
Chris Lattner
197ff79a8c Fix bug: Assembler/2002-12-15-GlobalResolve.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5039 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 16:41:52 +00:00
Chris Lattner
8e637a9383 planes is not spelled with an O
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5037 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 16:20:23 +00:00
Chris Lattner
71c83728b4 Fix borkness with not using MachineBasicBlocks in PHI nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5035 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 08:02:51 +00:00
Chris Lattner
6b993ccfe5 Add support to cast from a bool type
Add support for boolean constants
add getClassB method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5034 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 08:02:15 +00:00
Chris Lattner
d909683591 Use MachineOperand::isFoo methods instead of our own global functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5033 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 08:01:39 +00:00
Chris Lattner
4d0a82da2d Fix a huge performance problem in reassociate by introducing a
rank map cache for instruction ranks


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5030 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 03:56:00 +00:00
Chris Lattner
680f0c283d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5029 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-15 03:49:50 +00:00
Chris Lattner
6e49a4b814 Implement indirect function calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5024 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 14:13:27 +00:00
Misha Brukman
b8ead9dc22 Make function code generation printing debug-only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5023 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 13:16:14 +00:00
Chris Lattner
202a2d0e17 Fix bork in doMultiply
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5021 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 13:07:42 +00:00
Chris Lattner
d7d3872fb0 Add sanity checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5020 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 13:04:04 +00:00
Misha Brukman
0868667f78 Fixed a bug where moves due to phis were being neglected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5019 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 12:33:31 +00:00
Misha Brukman
87e369d221 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5017 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 12:00:06 +00:00
Misha Brukman
74676da6f1 Need to insert all moves due to PHI nodes before *ALL* jumps in a predecessor
basic block, as there could be multiple.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5016 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 11:55:59 +00:00
Chris Lattner
920536333c Insert phi code at top of block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5015 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 11:52:34 +00:00
Brian Gaeke
992447f91b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5014 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 11:39:18 +00:00
Misha Brukman
972b03fa53 This should be more correct: invalidates physical registers that are used in
an instruction to avoid using them to allocate to other virtual registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5013 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 11:33:22 +00:00
Chris Lattner
7d25589ee1 Implement cast bool to X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5012 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 11:31:59 +00:00
Brian Gaeke
71794c0069 Rename all BMI MachineBasicBlock operands to MBB.
Try to mess around with emitGEPOperation's elementSizeReg to make it work,
again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5011 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-13 11:22:48 +00:00