Devang Patel
51aec7ffb8
Fix dom tree compare. Don't forget to compare children!
...
llvm-svn: 52984
2008-07-01 21:41:00 +00:00
Devang Patel
0fc2badc38
Fix typos in comments.
...
Thanks for the feedback!
llvm-svn: 52978
2008-07-01 19:50:56 +00:00
Devang Patel
1e1f4a0bdd
Add dom info verifier.
...
llvm-svn: 52967
2008-07-01 17:44:24 +00:00
Owen Anderson
8d6d17cd2c
Add an isReachableFromEntry method.
...
llvm-svn: 52916
2008-06-30 20:28:02 +00:00
Devang Patel
960d6ae6d1
Check empty dominance frontier.
...
llvm-svn: 52437
2008-06-18 02:12:09 +00:00
Evan Cheng
d9353009b7
Fix more -Wshorten-64-to-32 warnings.
...
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Owen Anderson
611b415d12
Fix PR1098 by correcting the postdominators analysis.
...
Patch by Florian Brandner.
llvm-svn: 50628
2008-05-04 21:07:35 +00:00
Owen Anderson
030428b435
Major repairs to the post-dominators implementation. Patch from Florian Brandner!
...
llvm-svn: 49768
2008-04-16 04:21:16 +00:00
Owen Anderson
93ab00f1d9
Make GVN more memory efficient, particularly on code that contains a large number of
...
allocations, which GVN can't optimize anyways.
llvm-svn: 49329
2008-04-07 09:59:07 +00:00
Dan Gohman
2b96ce84aa
Add explicit keywords.
...
llvm-svn: 48801
2008-03-25 22:06:05 +00:00
Dan Gohman
a363ba510c
Don't include <map> in Pass.h, which doesn't need it. This requires
...
adding <map> to many files that actually do need it.
llvm-svn: 48667
2008-03-21 23:51:57 +00:00
Devang Patel
5e8cbbea65
PassInfo keep tracks whether a pass is an analysis pass or not.
...
llvm-svn: 48554
2008-03-19 21:56:59 +00:00
Devang Patel
38f181fa8c
Do not use virtual function to identify an analysis pass.
...
llvm-svn: 48520
2008-03-19 00:48:41 +00:00
Devang Patel
811ca3ddba
Identify Analysis pass.
...
Do not run analysis pass again if analysis info is still available.
This fixes PR1441.
llvm-svn: 48476
2008-03-18 00:39:19 +00:00
Dan Gohman
0cfccf801d
Add -analyze support to postdomtree.
...
llvm-svn: 47680
2008-02-27 18:38:29 +00:00
Chris Lattner
e0b1ee937a
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Owen Anderson
67929e6873
Add accessor for getting the underlying templated type. This is necessary for templated LoopInfo.
...
llvm-svn: 44347
2007-11-27 03:33:40 +00:00
Dan Gohman
27ac53cc23
Remove meaningless qualifiers from return types, avoiding compiler warnings.
...
llvm-svn: 44240
2007-11-19 20:46:23 +00:00
Owen Anderson
4314cf9d58
Some fixes to get MachineDomTree working better.
...
llvm-svn: 43541
2007-10-31 03:30:14 +00:00
Owen Anderson
229333c94b
Add a first attempt at dominator information for MBB's. Use with caution: this has been tested to compile. It has not yet been confirmed to generate correct analysis.
...
llvm-svn: 43438
2007-10-29 04:50:50 +00:00
Owen Anderson
dc3329dbf7
Make it possible for DomTreeBase to be constructed from MachineFunction's as well as just Function's.
...
llvm-svn: 43321
2007-10-25 00:16:57 +00:00
Owen Anderson
52b33065a4
Make DomTreeBase not a FunctionPass.
...
llvm-svn: 43263
2007-10-23 21:42:49 +00:00
Owen Anderson
962303b4ef
Unbreak the build. Forgot to commit this file.
...
llvm-svn: 43260
2007-10-23 21:04:37 +00:00
Owen Anderson
4b407757d0
Move Split<...>() into DomTreeBase. This should make the #include's of DominatorInternals.h
...
in CodeExtractor and LoopSimplify unnecessary.
Hartmut, could you confirm that this fixes the issues you were seeing?
llvm-svn: 43115
2007-10-18 05:13:52 +00:00
Hartmut Kaiser
ed12f66488
Updated VC++ build system.
...
Silenced some VC warnings.
I'm getting linker errors, though: unresolved externals:
llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
and
llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
Where are these defined?
llvm-svn: 43073
2007-10-17 14:56:40 +00:00
Owen Anderson
1235d1218b
Move splitBlock into DomTreeBase from DomTree.
...
llvm-svn: 43059
2007-10-17 02:03:17 +00:00
Owen Anderson
315471786b
Fix some formatting.
...
llvm-svn: 43049
2007-10-16 22:59:15 +00:00
Owen Anderson
43fefb53a6
Template DominatorTreeBase by node type. This is the next major step towards
...
having dominator information on MBB's.
llvm-svn: 43036
2007-10-16 19:59:25 +00:00
Owen Anderson
ffcd82d1ed
Begin the process of allowing DomTree on MBB's. Step One: template DomTreeNode by making it a typedef of a templated DomTreeNodeBase.
...
llvm-svn: 42743
2007-10-08 07:44:39 +00:00
Owen Anderson
cb51170957
Completely merge the implementation details of DomTree and PostDomTree.
...
Also, add a FIXME for a bug in PostDomTree calculation I noticed while writing this,
llvm-svn: 42593
2007-10-03 21:25:45 +00:00
Owen Anderson
09ba812a80
Template-ize more of the DomTree internal implementation details. Only the calculate() methods for DomTree and PostDomTree remain to be merged/template-ized.
...
llvm-svn: 42476
2007-09-30 04:17:16 +00:00
Owen Anderson
a533c458f5
Have PostDomTree use the newly templated DFSPass.
...
llvm-svn: 42427
2007-09-28 01:23:47 +00:00
Owen Anderson
e529f66979
Convert DFSPass into a templated friend function, in preparation for making it common to DomTree and PostDomTree.
...
llvm-svn: 42420
2007-09-27 23:23:00 +00:00
Owen Anderson
a0a11ee8b9
Merge significant portions of the DomTree and PostDomTree implementations.
...
The two remaining unmerged parts are DFSPass, and the Calculate().
llvm-svn: 42255
2007-09-24 02:29:29 +00:00
Owen Anderson
677db80624
Move DFSPass back down into DominatorTree. I need to figure out what the difference is between it
...
and the PostDomTree version first.
llvm-svn: 42250
2007-09-23 22:16:38 +00:00
Owen Anderson
de1937fcee
Factor the dominator tree calculation details out into DominatorCalculation.h. This
...
change is not useful in and of itself, but it lays the groundwork for combining
the dominator and postdominator implementations.
Also, factor a few methods that are common to DominatorTree and PostDominatorTree
into DominatorTreeBase. Again, this will make merging the two calculation methods
simpler in the future.
llvm-svn: 42248
2007-09-23 21:31:44 +00:00
Nick Lewycky
068c7d20e2
Simplify.
...
llvm-svn: 41167
2007-08-18 14:46:55 +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
35c1c452b0
No need to use iterator to erase basic block.
...
llvm-svn: 41074
2007-08-14 16:53:24 +00:00
Devang Patel
993388b1ee
Add methods to erase basic block entry.
...
llvm-svn: 41052
2007-08-13 22:10:29 +00:00
Reid Spencer
8c5c7c8453
Change casts from old style to new style. This helps document the details
...
better, gives the compiler a chance to validate the cast and reduces warnings
if the user turns on -Wold-style-cast option.
llvm-svn: 41033
2007-08-12 08:12:35 +00:00
Chris Lattner
65d638a918
reimplement dfs number computation to be significantly faster. This speeds up
...
natural loop canonicalization (which does many cfg xforms) by 4.3x, for
example. This also fixes a bug in postdom dfnumber computation.
llvm-svn: 40920
2007-08-08 05:51:24 +00:00
Chris Lattner
99df553268
Various random cleanups, add two accessors to DomTreeNode: getDFSNumIn/getDFSNumOut
...
llvm-svn: 40856
2007-08-06 06:15:43 +00:00
Chris Lattner
a5a692b9bb
Switch the internal "Info" map from an std::map to a DenseMap. This
...
speeds up idom by about 45% and postidom by about 33%.
Some extra precautions must be taken not to invalidate densemap iterators.
llvm-svn: 40827
2007-08-05 00:02:00 +00:00
Chris Lattner
5912537997
switch the DomTreeNodes and IDoms maps in idom/postidom to a
...
DenseMap instead of an std::map. This speeds up postdomtree
by about 25% and domtree by about 23%. It also speeds up clients,
for example, domfrontier by 11%, mem2reg by 4% and ADCE by 6%.
llvm-svn: 40826
2007-08-04 23:48:07 +00:00
Devang Patel
7d791bb10c
Remove unused method - getIDomBlock().
...
llvm-svn: 37865
2007-07-04 01:11:19 +00:00
Devang Patel
6e6a5c1893
Fix typo in assertion check.
...
llvm-svn: 37864
2007-07-04 01:05:22 +00:00
Devang Patel
2f757c3a96
Remove unnecessary comments.
...
llvm-svn: 37774
2007-06-28 02:11:54 +00:00
Devang Patel
ce4ea8a62c
Handle the case when block dominates itself.
...
llvm-svn: 37773
2007-06-28 02:07:08 +00:00
Devang Patel
28d2851f39
Remove ETForest.
...
llvm-svn: 37765
2007-06-27 20:53:52 +00:00