Chris Lattner
eb68f080ef
Fix PR977 and Transforms/LCSSA/2006-10-31-UnreachableBlock.ll
...
llvm-svn: 31315
2006-10-31 17:52:18 +00:00
Chris Lattner
c2d3d3112e
eliminate RegisterOpt. It does the same thing as RegisterPass.
...
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Chris Lattner
38b6e8382a
Add special check to avoid isLoop call. Simple, but doesn't seem to speed
...
up lcssa much in practice.
llvm-svn: 29465
2006-08-02 00:16:47 +00:00
Chris Lattner
5a2bc786be
Replace the SSA update code in LCSSA with a bottom-up approach instead of a top
...
down approach, inspired by discussions with Tanya.
This approach is significantly faster, because it does not need dominator
frontiers and it does not insert extraneous unused PHI nodes. For example, on
252.eon, in a release-asserts build, this speeds up LCSSA (which is the slowest
pass in gccas) from 9.14s to 0.74s on my G5. This code is also slightly smaller
and significantly simpler than the old code.
Amusingly, in a normal Release build (which includes the
"assert(L->isLCSSAForm());" assertion), asserting that the result of LCSSA
is in LCSSA form is actually slower than the LCSSA transformation pass
itself on 252.eon. I will see if Loop::isLCSSAForm can be sped up next.
llvm-svn: 29463
2006-08-02 00:06:09 +00:00
Owen Anderson
fe6e97d275
Fix typo in the comment.
...
llvm-svn: 29078
2006-07-09 21:35:40 +00:00
Owen Anderson
aecaabb6e1
Add a fix for an issue where LCSSA would fail to insert undef's in some corner
...
cases. Ideally, this issue will go away in the future as LCSSA gets smarter
about which Phi nodes it inserts.
llvm-svn: 29076
2006-07-09 08:14:06 +00:00
Chris Lattner
e3abb14503
Use the PotDoms map to memoize 'dominating value' lookup. With this patch,
...
LCSSA is still the slowest pass when gccas'ing 252.eon, but now it only takes
39s instead of 289s. :)
llvm-svn: 28776
2006-06-14 01:13:57 +00:00
Owen Anderson
e714a5c549
Fix another instance where PHI nodes need special treatment.
...
llvm-svn: 28774
2006-06-13 20:50:09 +00:00
Owen Anderson
3f8ff0449a
Fix a bug that was causing major slowdowns in povray. This was due to LCSSA
...
not handling PHI nodes correctly when determining if a value was live-out.
This patch reduces the number of detected live-out variables in the testcase
from 6565 to 485.
llvm-svn: 28771
2006-06-13 19:37:18 +00:00
Owen Anderson
0ac336965e
Fix for 2006-06-26-MultipleExitsSingleBlock.
...
If a single exit block has multiple predecessors within the loop, it will
appear in the exit blocks list more than once. LCSSA needs to take that into
account so that it doesn't double process that exit block.
llvm-svn: 28750
2006-06-12 07:10:16 +00:00
Owen Anderson
b538f14d2a
Re-commit the safe parts of my 6/9 patch. Still working on fixing the unsafe parts.
...
llvm-svn: 28748
2006-06-11 19:22:28 +00:00
Evan Cheng
1b6e310e6f
Back out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others).
...
llvm-svn: 28747
2006-06-11 09:32:57 +00:00
Owen Anderson
505adff3f0
Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert
...
on this.
llvm-svn: 28738
2006-06-09 18:33:30 +00:00
Owen Anderson
5d029264ec
Update some comments, and expose LCSSAID in preparation for having other passes
...
require LCSSA.
llvm-svn: 28734
2006-06-08 20:02:53 +00:00
Owen Anderson
ac601b4c4b
Fix some formatting, and use inLoop() when appropriate.
...
llvm-svn: 28694
2006-06-06 04:36:36 +00:00
Owen Anderson
9e81c1bb03
Stop a memory leak, and update some comments.
...
llvm-svn: 28693
2006-06-06 04:28:30 +00:00
Owen Anderson
766f90b08e
Some more clean-up, and squash an IDF-Phi related bug.
...
llvm-svn: 28680
2006-06-04 00:55:19 +00:00
Owen Anderson
eb33815f1b
Various clean-ups suggested by Chris.
...
llvm-svn: 28678
2006-06-04 00:02:23 +00:00
Owen Anderson
d00eacc4f9
Fix a bug in Phi-noded insertion. Also, update some comments to reflect what's
...
actually going on.
llvm-svn: 28677
2006-06-03 23:22:50 +00:00
Owen Anderson
619e4ba57f
Remove a FIXME that was fixed with my last patch.
...
llvm-svn: 28619
2006-06-01 06:07:40 +00:00
Owen Anderson
cd76fa04a1
More cleanups. Also, add a special case for updating PHI nodes, and
...
reimplement getValueDominatingFunction to walk the DominanceTree rather than
just searching blindly.
llvm-svn: 28618
2006-06-01 06:05:47 +00:00
Owen Anderson
dad8c57340
Extract a huge loop into a helper method. Fix a few iterator-invalidation bugs.
...
llvm-svn: 28599
2006-05-31 20:55:06 +00:00
Owen Anderson
8a8f278f15
Add Use replacement. Assuming there is nothing horribly wrong with this, LCSSA
...
is now theoretically feature-complete. It has not, however, been thoroughly
test, and is still considered experimental.
llvm-svn: 28529
2006-05-29 01:00:00 +00:00
Owen Anderson
152d063ccb
Major think-o. Iterate over all live out-of-loop values, and perform the
...
other calculations on each individually, rather than trying to delay it and do
them all at the end.
llvm-svn: 28527
2006-05-28 19:33:28 +00:00
Owen Anderson
1310e42803
Make LCSSA insert proper Phi nodes throughout the rest of the CFG by computing
...
the iterated Dominance Frontier of the loop-closure Phi's. This is the
second phase of the LCSSA pass. The third phase (coming soon) will be to
update all uses of loop variables to use the loop-closure Phi's instead.
llvm-svn: 28524
2006-05-27 18:47:11 +00:00
Owen Anderson
b4e16996f1
A few small clean-ups, and the addition of an LCSSA statistic.
...
llvm-svn: 28512
2006-05-27 00:31:37 +00:00
Owen Anderson
6e047ab8fc
Fix a copy-and-paste-o that would break some compilers.
...
llvm-svn: 28507
2006-05-26 21:19:17 +00:00
Owen Anderson
f3dd3e2bfd
Clean up and refactor LCSSA a bunch. It should also run faster now, though
...
there's still a lot of work to be done on it.
llvm-svn: 28506
2006-05-26 21:11:53 +00:00
Owen Anderson
8eca8910b6
Skeletal LCSSA pass. This is currently non-functional. Expect functionality
...
and documentation updates soo.
llvm-svn: 28495
2006-05-26 13:58:26 +00:00