Dan Gohman
2ad7e7341c
Fix whitespace in whitespace-significant pseudocode in a comment.
...
llvm-svn: 51890
2008-06-03 00:57:21 +00:00
Owen Anderson
1f59d9937f
Since LCSSA switched over to DenseMap, we have to be more careful to avoid iterator invalidation. Fixes PR2385.
...
llvm-svn: 51777
2008-05-30 17:31:01 +00:00
Owen Anderson
d3f21d165f
Use a DenseMap instead of an std::map, speeding up the testcase in PR2368 by about a third.
...
llvm-svn: 51565
2008-05-26 10:07:43 +00:00
Dan Gohman
f96e1371e8
Tidy up BasicBlock::getFirstNonPHI, and change a bunch of places to
...
use it instead of duplicating its functionality.
llvm-svn: 51499
2008-05-23 21:05:58 +00:00
Gabor Greif
697e94cc22
Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
...
llvm-svn: 51143
2008-05-15 10:04:30 +00:00
Dan Gohman
0479aa5c0b
Change class' public PassInfo variables to by initialized with the
...
address of the PassInfo directly instead of calling getPassInfo.
This eliminates a bunch of dynamic initializations of static data.
Also, fold RegisterPassBase into PassInfo, make a bunch of its
data members const, and rearrange some code to initialize data
members in constructors instead of using setter member functions.
llvm-svn: 51022
2008-05-13 02:05:11 +00:00
Dan Gohman
d78c400b5b
Clean up the use of static and anonymous namespaces. This turned up
...
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Devang Patel
fa0e3c4a92
Handle multiple return values.
...
llvm-svn: 50604
2008-05-03 01:12:15 +00:00
Gabor Greif
e9ecc68d8f
API changes for class Use size reduction, wave 1.
...
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Anton Korobeynikov
18991d78fa
Fix newly-introduced 4.3 warnings
...
llvm-svn: 47375
2008-02-20 12:07:57 +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
Devang Patel
b5933bbbd5
Use SmallVector instead of std::vector.
...
llvm-svn: 41207
2007-08-21 00:31:24 +00:00
Devang Patel
d1fcfcc76c
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
c5e340eded
LCSSA preserves dom info.
...
llvm-svn: 40604
2007-07-30 20:23:45 +00:00
Devang Patel
de5901523c
Now this temp. fix is not required.
...
llvm-svn: 40034
2007-07-19 02:22:21 +00:00
Reid Spencer
3363f4ad96
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
4cd1413f15
Make LCSSA a loop pass.
...
llvm-svn: 39844
2007-07-13 23:57:11 +00:00
Devang Patel
af41e4a192
Maintain ETNode as part of DomTreeNode.
...
This adds redundancy for now.
llvm-svn: 37492
2007-06-07 17:47:21 +00:00
Devang Patel
bdd1aaef10
s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
...
llvm-svn: 37407
2007-06-04 00:32:22 +00:00
Devang Patel
0e8aa7b69a
s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
...
llvm-svn: 37403
2007-06-03 06:26:14 +00:00
Dan Gohman
b5650ebd6a
Fix typos.
...
llvm-svn: 36994
2007-05-11 21:10:54 +00:00
Nick Lewycky
e7da2d6ac3
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
8c78a0bff0
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
e95c6ad802
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
09f162ca6a
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Evan Cheng
db9b65d67a
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
f38f2f2394
Use ETForest instead of DominatorTree.
...
llvm-svn: 36247
2007-04-18 04:39:32 +00:00
Chris Lattner
a6b5660209
avoid copying sets and vectors around.
...
llvm-svn: 36017
2007-04-14 22:10:17 +00:00
Reid Spencer
557ab15e71
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
a1d35926b7
For PR1177:
...
Revert last patch which caused iteration invalidation.
llvm-svn: 33901
2007-02-05 05:23:32 +00:00
Owen Anderson
f6fa108993
Use DenseMap for pointer->pointer maps.
...
llvm-svn: 33897
2007-02-05 02:39:47 +00:00
Chris Lattner
45f966d80f
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
700b873130
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
984d6e1669
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
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