Owen Anderson
2412158111
In some situations, we need to check for local interferences between the PHI
...
node and its inputs.
llvm-svn: 49070
2008-04-02 03:00:13 +00:00
Owen Anderson
edfc2eb558
Correctly mark a valno that was previous defined by a PHI node as having an
...
unknown defining inst after PHI elimination.
llvm-svn: 49069
2008-04-02 02:12:45 +00:00
Owen Anderson
49dd9f16a9
Don't dereference MBB->end().
...
llvm-svn: 49043
2008-04-01 18:05:08 +00:00
Owen Anderson
f28fc71c93
Fix a major bug in the DFS calculation. Thanks for Christopher Lamb for pointing this out.
...
llvm-svn: 48973
2008-03-31 01:39:20 +00:00
Owen Anderson
8b22873bdd
Remove some unneeded code for LiveInterval joining, and fix a bug in the Phi elimination algorithm where we were accidentally reasoning about
...
the source rather than the destination.
llvm-svn: 48936
2008-03-29 01:58:47 +00:00
Owen Anderson
5d2d1776e0
Dead PHI instructions need to be handled specially.
...
llvm-svn: 48811
2008-03-26 03:03:23 +00:00
Owen Anderson
9f129318dc
Remove some debugging code.
...
llvm-svn: 48803
2008-03-25 22:26:43 +00:00
Owen Anderson
1d46d45e35
StrongPHIElimination doesn't support swapping live intervals like the coalescer does.
...
llvm-svn: 48802
2008-03-25 22:25:27 +00:00
Owen Anderson
e2707768a4
Remove #include<iostream>, which I was using for debugging.
...
llvm-svn: 48739
2008-03-24 20:36:47 +00:00
Owen Anderson
200e57840e
Be sure to remove intervals after we've joined them. Also, remove some duplicated code.
...
With this pass, StrongPHIElim can compile very simple testcases correctly. There's still a ways
to go before it's ready for prime time, though.
llvm-svn: 48719
2008-03-24 04:11:27 +00:00
Owen Anderson
488e645938
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
944b1c76ab
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
70aaab6dc5
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
75d04819a6
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
636ab19205
some more spelling changes
...
llvm-svn: 47996
2008-03-06 10:51:21 +00:00
Evan Cheng
6325446666
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
7fe0bb2b43
Fix an iterator invalidation issue.
...
llvm-svn: 46263
2008-01-22 23:58:54 +00:00
Owen Anderson
7fb6241733
Clarify a deviation from the original algorithm.
...
llvm-svn: 46218
2008-01-21 22:03:00 +00:00
Owen Anderson
d990b4f646
Improve a few comments.
...
llvm-svn: 46217
2008-01-21 22:01:01 +00:00
Owen Anderson
4f45cef2f9
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
51b8e20ccf
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
8958a78576
Get rid of the isKillInst predicate. LiveVariables already provides this information.
...
llvm-svn: 45797
2008-01-10 00:33:11 +00:00
Owen Anderson
1c8152ba03
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
436db42a3c
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
4de0c3978d
StrongPHIElim: Now with even fewer trivial bugs!
...
llvm-svn: 45775
2008-01-09 10:41:39 +00:00
Owen Anderson
77c3fe441b
Fix an infinite recursion bug in InsertCopies.
...
llvm-svn: 45774
2008-01-09 10:32:30 +00:00
Owen Anderson
e0fd9bd35a
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
1b0d5c747e
Rename registers that do not need copies.
...
llvm-svn: 45759
2008-01-08 21:54:52 +00:00
Owen Anderson
812e1ea7cf
Actually insert copies now!
...
llvm-svn: 45738
2008-01-08 05:16:15 +00:00
Owen Anderson
47299489ec
Oops, missed one.
...
llvm-svn: 45719
2008-01-07 21:32:09 +00:00
Owen Anderson
bbc6352d1f
Make some predicates static.
...
llvm-svn: 45718
2008-01-07 21:30:40 +00:00
Chris Lattner
a10fff51d9
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
a5bb370aa4
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
f3ebc3f3d2
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Owen Anderson
bccb8c432d
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
e110199916
Sketch out an implementation of Briggs' copy placement algorithm.
...
llvm-svn: 45334
2007-12-23 15:37:26 +00:00
Owen Anderson
5a4c05d047
Note what still needs doing.
...
llvm-svn: 45310
2007-12-22 04:59:10 +00:00
Owen Anderson
4534100765
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
7b8a741189
Break local interferences in StrongPHIElimination. One step closer...
...
llvm-svn: 45070
2007-12-16 05:44:27 +00:00
Owen Anderson
ccb3981256
A few more comments.
...
llvm-svn: 45069
2007-12-16 04:07:23 +00:00
Owen Anderson
53b677e4e8
Add register pairs to the list to check for local interferences.
...
llvm-svn: 44987
2007-12-13 05:53:03 +00:00
Owen Anderson
1f93edd08a
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
499e5bffcf
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
f24dd1c1eb
More progress on StrongPHIElimination. Now we actually USE the DomForest!
...
llvm-svn: 44877
2007-12-11 20:12:11 +00:00
Owen Anderson
ba61806ef1
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
d8167ab332
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
569ef71e44
Preserve LiveVariables when doing critical edge splitting.
...
llvm-svn: 44063
2007-11-13 20:04:45 +00:00
Owen Anderson
c520c4b325
Break critical edges coming into blocks with PHI nodes.
...
llvm-svn: 44019
2007-11-12 17:27:27 +00:00
Owen Anderson
a1cd45213d
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
bfbc12973d
Take another stab at getting isLiveIn() and isLiveOut() right.
...
llvm-svn: 43869
2007-11-08 01:32:45 +00:00