Owen Anderson
5da16e856c
A first attempt at updating live intervals, with code lifted from
...
the coalescer. This doesn't really work, but gets us farther than
before.
llvm-svn: 48446
2008-03-17 06:08:26 +00:00
Owen Anderson
df98435a16
We also need to collect the VN IDs for the PHI instructions for later updating.
...
llvm-svn: 48278
2008-03-12 04:22:57 +00:00
Owen Anderson
ecc3b561eb
When we're determining what registers to coallesce, track the VNInfo IDs for the definitions that
...
feed the PHI instructions. We'll need these IDs in order to update LiveIntervals properly.
llvm-svn: 48277
2008-03-12 03:13:29 +00:00
Owen Anderson
6b69a8671e
Move StrongPHIElimination after live interval analysis. This will make things happier down the road.
...
llvm-svn: 48138
2008-03-10 07:22:36 +00:00
Gabor Greif
92e00c1e50
some more spelling changes
...
llvm-svn: 47996
2008-03-06 10:51:21 +00:00
Evan Cheng
18064ddb5b
Refactor code. Remove duplicated functions that basically do the same thing as
...
findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies.
llvm-svn: 47927
2008-03-05 00:59:57 +00:00
Owen Anderson
c354bbc085
Fix an iterator invalidation issue.
...
llvm-svn: 46263
2008-01-22 23:58:54 +00:00
Owen Anderson
cafbec4b09
Clarify a deviation from the original algorithm.
...
llvm-svn: 46218
2008-01-21 22:03:00 +00:00
Owen Anderson
0325a659c1
Improve a few comments.
...
llvm-svn: 46217
2008-01-21 22:01:01 +00:00
Owen Anderson
a8f32828c8
Get rid of all uses of LiveVariables::VarInfo::DefInst in favor of the equivalent API from
...
MachineRegisterInfo. Once all clients are switched over, the former will be going away.
llvm-svn: 45805
2008-01-10 01:36:43 +00:00
Owen Anderson
e2b710013f
Add more comments explaining the basics of how the decision of when to rename and when to insert
...
copies is made.
llvm-svn: 45799
2008-01-10 00:47:01 +00:00
Owen Anderson
a0e5b9a317
Get rid of the isKillInst predicate. LiveVariables already provides this information.
...
llvm-svn: 45797
2008-01-10 00:33:11 +00:00
Owen Anderson
b5be87349c
Copies need to be inserted before the first terminator, not at the end of the block.
...
llvm-svn: 45791
2008-01-10 00:01:41 +00:00
Owen Anderson
62bb891e23
Clean up StrongPHIElimination a bit, and add some more comments to the internal structures. There's
...
still more work to do on this front.
llvm-svn: 45783
2008-01-09 22:40:54 +00:00
Owen Anderson
9555739636
StrongPHIElim: Now with even fewer trivial bugs!
...
llvm-svn: 45775
2008-01-09 10:41:39 +00:00
Owen Anderson
c937ae34a5
Fix an infinite recursion bug in InsertCopies.
...
llvm-svn: 45774
2008-01-09 10:32:30 +00:00
Owen Anderson
01e1f23391
Fix some simple bugs. StrongPHIElimination now does not crash on 164.gzip.
...
llvm-svn: 45773
2008-01-09 06:19:05 +00:00
Owen Anderson
3d5485728a
Rename registers that do not need copies.
...
llvm-svn: 45759
2008-01-08 21:54:52 +00:00
Owen Anderson
23abe71f4d
Actually insert copies now!
...
llvm-svn: 45738
2008-01-08 05:16:15 +00:00
Owen Anderson
6f06a8e8d2
Oops, missed one.
...
llvm-svn: 45719
2008-01-07 21:32:09 +00:00
Owen Anderson
692d2acef8
Make some predicates static.
...
llvm-svn: 45718
2008-01-07 21:30:40 +00:00
Chris Lattner
96167aa93c
Rename SSARegMap -> MachineRegisterInfo in keeping with the idea
...
that "machine" classes are used to represent the current state of
the code being compiled. Given this expanded name, we can start
moving other stuff into it. For now, move the UsedPhysRegs and
LiveIn/LoveOuts vectors from MachineFunction into it.
Update all the clients to match.
This also reduces some needless #includes, such as MachineModuleInfo
from MachineFunction.
llvm-svn: 45467
2007-12-31 04:13:23 +00:00
Chris Lattner
9e5cc35593
Add new shorter predicates for testing machine operands for various types:
...
e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on
switching everything over, so new clients should just start using the
shorter names.
Remove old long accessors, switching everything over to use the short
accessor: getMachineBasicBlock() -> getMBB(),
getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc.
llvm-svn: 45464
2007-12-30 23:10:15 +00:00
Chris Lattner
ad9a6ccb83
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Owen Anderson
1064e276a9
Flesh out the Briggs implementation a little bit more, fix a few FIXMEs.
...
llvm-svn: 45347
2007-12-24 22:12:23 +00:00
Owen Anderson
e9538b78ce
Sketch out an implementation of Briggs' copy placement algorithm.
...
llvm-svn: 45334
2007-12-23 15:37:26 +00:00
Owen Anderson
3fc4fdaa1f
Note what still needs doing.
...
llvm-svn: 45310
2007-12-22 04:59:10 +00:00
Owen Anderson
f3765d08f8
Remove critical edge breaking. It won't be necessary as long as we are very careful when inserting copies.
...
llvm-svn: 45309
2007-12-22 04:50:11 +00:00
Owen Anderson
708d9d117b
Break local interferences in StrongPHIElimination. One step closer...
...
llvm-svn: 45070
2007-12-16 05:44:27 +00:00
Owen Anderson
3e37ec0942
A few more comments.
...
llvm-svn: 45069
2007-12-16 04:07:23 +00:00
Owen Anderson
22aee19b7e
Add register pairs to the list to check for local interferences.
...
llvm-svn: 44987
2007-12-13 05:53:03 +00:00
Owen Anderson
78b8141ce7
Remove ugly and horrible code. It's not necessary for correctness, and can be added back later if it causes code quality issues.
...
llvm-svn: 44986
2007-12-13 05:43:37 +00:00
Owen Anderson
70df68f12d
Forgot to remove a register from the PHI-union after I'd determined that it
...
interfered with other registers. Seems like that might be a good thing to do. :-)
llvm-svn: 44902
2007-12-12 01:25:08 +00:00
Owen Anderson
fc359fc18b
More progress on StrongPHIElimination. Now we actually USE the DomForest!
...
llvm-svn: 44877
2007-12-11 20:12:11 +00:00
Owen Anderson
4bd6d18e18
A little more progress on StrongPHIElimination, now that I have a better sense of
...
how the CodeGen machinery works.
llvm-svn: 44786
2007-12-10 08:07:09 +00:00
Owen Anderson
b3d15a65fc
Run computeDomForest() on the set of registers that need to be tested for
...
interference.
llvm-svn: 44064
2007-11-13 20:13:24 +00:00
Owen Anderson
9f15b689b3
Preserve LiveVariables when doing critical edge splitting.
...
llvm-svn: 44063
2007-11-13 20:04:45 +00:00
Owen Anderson
84faaa8d14
Break critical edges coming into blocks with PHI nodes.
...
llvm-svn: 44019
2007-11-12 17:27:27 +00:00
Owen Anderson
40abf86e03
As Chris and Evan pointed out, BreakCriticalMachineEdges doesn't really need
...
to be a pass of its own. Instead, move it out into a helper method.
llvm-svn: 44002
2007-11-12 01:05:09 +00:00
Owen Anderson
b735086b08
Take another stab at getting isLiveIn() and isLiveOut() right.
...
llvm-svn: 43869
2007-11-08 01:32:45 +00:00
Owen Anderson
7021ab1c78
Add some more of StrongPHIElim.
...
llvm-svn: 43805
2007-11-07 05:17:15 +00:00
Owen Anderson
c3baea32f3
Add a few comments.
...
llvm-svn: 43755
2007-11-06 05:26:02 +00:00
Owen Anderson
03decb2fca
DomForest is a forest of registers, not instructions.
...
llvm-svn: 43754
2007-11-06 05:22:43 +00:00
Owen Anderson
d0fb7600f9
StrongPHIElimination requires LiveVariables.
...
llvm-svn: 43751
2007-11-06 04:49:43 +00:00
Owen Anderson
5fff5dcf65
Another step of stronger PHI elimination down.
...
llvm-svn: 43684
2007-11-04 22:33:26 +00:00
Duncan Sands
c945dfa9af
Add a newline at the end of the file.
...
llvm-svn: 43550
2007-10-31 08:49:24 +00:00
Owen Anderson
ae0530aaf4
Add the skeleton of a better PHI elimination pass.
...
llvm-svn: 43542
2007-10-31 03:37:57 +00:00