Chris Lattner
b4d58d7f9e
Rename MachineInstrInfo -> TargetInstrInfo
...
llvm-svn: 5272
2003-01-14 22:00:31 +00:00
Chris Lattner
cbedb8b400
* Use the PHI Elimination pass
...
llvm-svn: 5220
2003-01-13 00:26:08 +00:00
Chris Lattner
ca4362fee7
Rename FunctionFrameInfo to MachineFrameInfo
...
llvm-svn: 5200
2002-12-28 21:08:26 +00:00
Chris Lattner
bf9d12ac8b
* Convert to be a MachineFunctionPass instance
...
* Use new FunctionFrameInfo object to manage stack slots instead of doing
it directly
* Adjust to new MRegisterInfo API
* Don't take a TM as a ctor argument
* Don't keep track of which callee saved registers are modified
* Don't emit prolog/epilog code or spill/restore code for callee saved regs
* Use new allocation_order_begin/end iterators to simplify dramatically the
logic for picking registers to allocate
* Machine PHI nodes can no longer contain constant arguments
* Use a bitvector to keep track of registers used instead of a set
* Fix problem where explicitly referenced registers would be added to
regsused set and never removed
llvm-svn: 5196
2002-12-28 20:42:14 +00:00
Chris Lattner
ee73450749
Adjustments to work with the simpler spill interface
...
llvm-svn: 5144
2002-12-25 05:04:20 +00:00
Chris Lattner
095eac8109
Fix compilation on GCC 2.96
...
llvm-svn: 5113
2002-12-23 23:44:04 +00:00
Chris Lattner
dc451c6d27
Implicit defs/uses list may be empty.
...
llvm-svn: 5103
2002-12-18 01:11:14 +00:00
Chris Lattner
ac5f3b3ed3
Use new reginfo interface
...
llvm-svn: 5099
2002-12-17 04:19:40 +00:00
Chris Lattner
1d84f0a461
Keep the stack frame aligned.
...
llvm-svn: 5081
2002-12-16 17:42:40 +00:00
Chris Lattner
c63d63a7c7
Rename createSimpleX86RegisterAllocator to createSimpleRegisterAllocator.
...
Remvoe some dead code
llvm-svn: 5070
2002-12-16 14:37:00 +00:00
Chris Lattner
bc1e6700eb
Some simpliciations to the spill/reload interface
...
llvm-svn: 5067
2002-12-15 23:01:26 +00:00
Chris Lattner
4e560ee65b
Simplify PHI node elimination significantly by doing it as a prepass to
...
register allocation
llvm-svn: 5066
2002-12-15 22:39:53 +00:00
Chris Lattner
292083aaf5
Variety of small or trivial simplifications to the code, completely eliminated
...
the dependence on PhysRegClassMap
llvm-svn: 5064
2002-12-15 22:19:19 +00:00
Chris Lattner
2af545d034
Remove unused savePhysRegToStack method
...
llvm-svn: 5061
2002-12-15 21:33:51 +00:00
Chris Lattner
ed594b6b20
Localize a map, remove another
...
llvm-svn: 5060
2002-12-15 21:24:30 +00:00
Chris Lattner
1499e5a92c
Give simple reg allocator a nice Pass Name
...
llvm-svn: 5058
2002-12-15 21:13:12 +00:00
Chris Lattner
2979a85984
Add a big assert making sure 2 address instructions are formed right
...
llvm-svn: 5057
2002-12-15 21:02:20 +00:00
Chris Lattner
02e835bf9a
Fix a problem that occurs when PHI nodes have multiple entries for the same predecessor
...
llvm-svn: 5055
2002-12-15 20:48:03 +00:00
Chris Lattner
dfa238f665
Grab bag of minor cleanups. Export some statistics about the number of
...
spills and reloads emitted
llvm-svn: 5054
2002-12-15 20:36:09 +00:00
Chris Lattner
e2533336f5
Simplify interfaces used by regalloc to insert code
...
llvm-svn: 5052
2002-12-15 20:06:35 +00:00
Chris Lattner
c1c7cc290f
* 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.
llvm-svn: 5051
2002-12-15 19:51:14 +00:00
Chris Lattner
f2acd842b4
* Remove some unneccesary instance variables
...
* Make allocateStackSpaceFor only allocate the right amount of space
llvm-svn: 5048
2002-12-15 19:07:34 +00:00
Chris Lattner
b772cd05c5
pull inverse reg class mapping into a class that is sharable and out of the
...
target register description classes.
llvm-svn: 5045
2002-12-15 18:38:59 +00:00
Chris Lattner
cf1955cb16
Prune #includes
...
llvm-svn: 5044
2002-12-15 18:19:24 +00:00
Chris Lattner
1af3af463a
Remove extraneous #includes, perform FIXME
...
llvm-svn: 5043
2002-12-15 18:15:24 +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
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
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
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
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
Misha Brukman
a739167305
This should handle register allocating PHI nodes.
...
llvm-svn: 5002
2002-12-13 09:54:36 +00:00
Misha Brukman
4ef74c8079
Start allocating stack space at [ebp-4] to not overwrite the return address.
...
Also make all loads & stores 4-byte aligned for performance. ;)
llvm-svn: 4982
2002-12-13 04:34:02 +00:00
Misha Brukman
260dbc79fc
Take advantage of our knowledge of 2-address X86 instructions and
...
register-allocated them appropriately.
llvm-svn: 4976
2002-12-12 23:20:31 +00:00
Misha Brukman
160a3da184
Added code generation for function prologues and epilogues.
...
llvm-svn: 4930
2002-12-04 23:58:08 +00:00
Misha Brukman
dbb7b65bf3
Fun arithmetic with iterators aimed at fixing a bug: inserting instructions
...
after the *current* instruction while keeping the iterator in the same
'logical' place.
llvm-svn: 4923
2002-12-04 19:24:45 +00:00
Misha Brukman
a8ad93221a
This should fix the bug seen with some registers not being allocated
...
correctly: skipping instructions by incorrectly incrementing the pointer.
Also adds support for building a reg-to-regclass map, and splits the function
for saving register to stack into two, one suitable for virtual registers
(which also assigns it a physical register) and one for simply storing back
physical registers.
llvm-svn: 4898
2002-12-03 23:15:19 +00:00
Misha Brukman
2e035d64d1
* Abstracted out stack space allocation into its own function
...
* Added saving of register values to the stack
llvm-svn: 4858
2002-12-02 21:11:58 +00:00
Misha Brukman
60286d0916
A simple (spilling) register allocator.
...
llvm-svn: 4828
2002-11-22 22:44:32 +00:00