1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
Commit Graph

104 Commits

Author SHA1 Message Date
Anton Korobeynikov
c41f5b6af4 Fix newly-introduced 4.3 warnings
llvm-svn: 47375
2008-02-20 12:07:57 +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
Devang Patel
f06e667e9c Use SmallVector instead of std::vector.
llvm-svn: 41207
2007-08-21 00:31:24 +00:00
Devang Patel
fded73828f When one branch of condition is eliminated then head of the other
branch is not necessary immediate dominators of merge blcok in all cases.

llvm-svn: 41144
2007-08-17 21:59:16 +00:00
Devang Patel
1b2732c880 LCSSA preserves dom info.
llvm-svn: 40604
2007-07-30 20:23:45 +00:00
Devang Patel
4020116257 Now this temp. fix is not required.
llvm-svn: 40034
2007-07-19 02:22:21 +00:00
Reid Spencer
9496d63260 Return Undef if the block has no dominator. This was required to allow
llvm-gcc build to succeed. Without this change it fails in libstdc++
compilation. This causes no regressions in dejagnu tests. However, 
someone who knows this code better might want to review it.

llvm-svn: 39924
2007-07-16 21:03:44 +00:00
Devang Patel
9166ad7658 Make LCSSA a loop pass.
llvm-svn: 39844
2007-07-13 23:57:11 +00:00
Devang Patel
babcd06827 Maintain ETNode as part of DomTreeNode.
This adds redundancy for now.

llvm-svn: 37492
2007-06-07 17:47:21 +00:00
Devang Patel
2ef6caf14f s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
llvm-svn: 37407
2007-06-04 00:32:22 +00:00
Devang Patel
d58b82f83a s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
llvm-svn: 37403
2007-06-03 06:26:14 +00:00
Dan Gohman
167379e73a Fix typos.
llvm-svn: 36994
2007-05-11 21:10:54 +00:00
Nick Lewycky
c2306ff5b4 Fix typo in comment.
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
cd45427a87 Drop 'const'
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.

llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel
38a66bc82e Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Evan Cheng
91e0637ed3 Revert Owen's last check-in. This is breaking Mac OS X / PPC llvm-gcc bootstrap.
llvm-svn: 36258
2007-04-18 22:39:00 +00:00
Owen Anderson
909895b564 Use ETForest instead of DominatorTree.
llvm-svn: 36247
2007-04-18 04:39:32 +00:00
Chris Lattner
7928216e38 avoid copying sets and vectors around.
llvm-svn: 36017
2007-04-14 22:10:17 +00:00
Reid Spencer
8749d297f5 Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.

llvm-svn: 33939
2007-02-05 23:32:05 +00:00
Reid Spencer
21f40213a8 For PR1177:
Revert last patch which caused iteration invalidation.

llvm-svn: 33901
2007-02-05 05:23:32 +00:00
Owen Anderson
0fbb2d629f Use DenseMap for pointer->pointer maps.
llvm-svn: 33897
2007-02-05 02:39:47 +00:00
Chris Lattner
4d19c9634d switch more statistics over to STATISTIC, eliminating static ctors. Also,
delete some dead ones.

llvm-svn: 32694
2006-12-19 22:17:40 +00:00
Chris Lattner
a531ce882e Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.

llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Chris Lattner
3b7a9fa472 generalize the fix for PR977 to also fix
Transforms/LCSSA/2006-10-31-UnreachableBlock-2.ll

llvm-svn: 31317
2006-10-31 18:56:48 +00:00
Chris Lattner
79daf6ae80 Fix PR977 and Transforms/LCSSA/2006-10-31-UnreachableBlock.ll
llvm-svn: 31315
2006-10-31 17:52:18 +00:00
Chris Lattner
a39dcb5377 eliminate RegisterOpt. It does the same thing as RegisterPass.
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Chris Lattner
1768e89248 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
a07bbb37e4 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
7c03596d93 Fix typo in the comment.
llvm-svn: 29078
2006-07-09 21:35:40 +00:00
Owen Anderson
5812f5d7a8 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
1b42069db1 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
c50df7da72 Fix another instance where PHI nodes need special treatment.
llvm-svn: 28774
2006-06-13 20:50:09 +00:00
Owen Anderson
f43ab30bc0 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
a947d699dd 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
15b85dbfa5 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
d99c8e2e5f 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
6c2f7512a6 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
0d9583aa41 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
04f6f0775a Fix some formatting, and use inLoop() when appropriate.
llvm-svn: 28694
2006-06-06 04:36:36 +00:00
Owen Anderson
dc8495f4ad Stop a memory leak, and update some comments.
llvm-svn: 28693
2006-06-06 04:28:30 +00:00
Owen Anderson
4343713be4 Some more clean-up, and squash an IDF-Phi related bug.
llvm-svn: 28680
2006-06-04 00:55:19 +00:00
Owen Anderson
1a72d98dd2 Various clean-ups suggested by Chris.
llvm-svn: 28678
2006-06-04 00:02:23 +00:00
Owen Anderson
b83c3beb44 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
1b0cd45469 Remove a FIXME that was fixed with my last patch.
llvm-svn: 28619
2006-06-01 06:07:40 +00:00
Owen Anderson
facd63d07c 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
aae280d83c 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
d46a77c3c8 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
a857559867 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
703f6baab0 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
1843c1ee17 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
d706fc78b2 Fix a copy-and-paste-o that would break some compilers.
llvm-svn: 28507
2006-05-26 21:19:17 +00:00
Owen Anderson
2414055ac6 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
93098cfc4c 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