Commit Graph

174 Commits

Author SHA1 Message Date
Owen Anderson
58ec8825d4 Convert DFSPass into a templated friend function, in preparation for making it common to DomTree and PostDomTree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42420 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-27 23:23:00 +00:00
Owen Anderson
68099d58cb Merge significant portions of the DomTree and PostDomTree implementations.
The two remaining unmerged parts are DFSPass, and the Calculate().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42255 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-24 02:29:29 +00:00
Owen Anderson
eefb31094f Move DFSPass back down into DominatorTree. I need to figure out what the difference is between it
and the PostDomTree version first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42250 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-23 22:16:38 +00:00
Owen Anderson
d20c824b20 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42248 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-23 21:31:44 +00:00
Nick Lewycky
ab3c9b1f95 Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41167 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-18 14:46:55 +00:00
Devang Patel
96bf524b53 When one branch of condition is eliminated then head of the other
branch is not necessary immediate dominators of merge blcok in all cases.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41144 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-17 21:59:16 +00:00
Devang Patel
4d29ddfa06 No need to use iterator to erase basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41074 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-14 16:53:24 +00:00
Devang Patel
441c5ee6cf Add methods to erase basic block entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41052 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-13 22:10:29 +00:00
Reid Spencer
276222a5ae 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41033 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-12 08:12:35 +00:00
Chris Lattner
3e089ae0b8 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40920 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 05:51:24 +00:00
Chris Lattner
c385ae6ff5 Various random cleanups, add two accessors to DomTreeNode: getDFSNumIn/getDFSNumOut
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40856 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 06:15:43 +00:00
Chris Lattner
e93e311981 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40827 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-05 00:02:00 +00:00
Chris Lattner
0a5f83c22c 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%.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40826 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-04 23:48:07 +00:00
Devang Patel
bef204db6f Remove unused method - getIDomBlock().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37865 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 01:11:19 +00:00
Devang Patel
dc42bc3baf Fix typo in assertion check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37864 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 01:05:22 +00:00
Devang Patel
ef6ba18a4c Remove unnecessary comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37774 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-28 02:11:54 +00:00
Devang Patel
dc3a207e78 Handle the case when block dominates itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37773 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-28 02:07:08 +00:00
Devang Patel
1ceda1d63e Remove ETForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37765 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-27 20:53:52 +00:00
Devang Patel
0e7f728ad1 Move code to update dominator information after basic block is split
from LoopSimplify.cpp to Dominator.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37689 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 17:23:45 +00:00
Devang Patel
6857e366f5 Protect updateDFSNumbers()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37560 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 17:30:56 +00:00
Devang Patel
9c7ee6b19f Make DFS number manipulation methods private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37553 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 05:49:31 +00:00
Devang Patel
4d42dea253 Break DominatorTree from ETNode.
Remove unused PostETForest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37551 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 00:54:38 +00:00
Devang Patel
3726b82a55 Maintain DFS number in DomTreeNode itself.
This means now ETNodes are not useful anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37546 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-12 00:14:41 +00:00
Devang Patel
fe7d4e50b8 Add and use DominatorTreeBase::findNearestCommonDominator().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37545 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-11 23:31:22 +00:00
Devang Patel
b5ef06c509 Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37522 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 17:59:02 +00:00
Devang Patel
dba2413b2e Update LoopSimplify to require and preserve DominatorTree only.
Now LoopSimplify does not require nor preserve ETForest.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37512 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 01:50:32 +00:00
Devang Patel
0ab301c5fa Add new method - nearestCommonDominator().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-08 00:21:17 +00:00
Devang Patel
e029b2c369 Add instruction level dominates(A,B) interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-07 23:52:40 +00:00
Devang Patel
4b90e3a276 Do not use ETForest as well as DomiantorTree. DominatorTree is sufficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37501 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-07 22:17:16 +00:00
Devang Patel
f11cc5c298 Add basic block level properlyDominates(A,B) interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37497 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-07 21:34:22 +00:00
Devang Patel
259e6cf191 Add BasicBlock level dominates(A,B) interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37493 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-07 18:39:40 +00:00
Devang Patel
9a51157db5 Maintain ETNode as part of DomTreeNode.
This adds redundancy for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37492 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-07 17:47:21 +00:00
Devang Patel
4cd950f61b Break friendship.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37450 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-06 00:59:48 +00:00
Devang Patel
f082a9ae6b Simplify class hierarchy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37447 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-06 00:46:36 +00:00
Devang Patel
170f2b9bef s/ETNode::getChildren/ETNode::getETNodeChildren/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37426 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-04 23:45:02 +00:00
Devang Patel
055756bf52 Add FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37417 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-04 17:38:00 +00:00
Devang Patel
bbf8c8e71f Remove unused method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37416 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-04 16:49:36 +00:00
Devang Patel
83beaee227 s/DominatorTree::createNewNode/DominatorTree::addNewBlock/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37415 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-04 16:43:25 +00:00
Devang Patel
26a6908768 Add basic block level interface to change immediate dominator
and create new node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37414 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-04 16:22:33 +00:00
Devang Patel
26042420d6 s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37407 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-04 00:32:22 +00:00
Devang Patel
bec7647f98 s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37403 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-03 06:26:14 +00:00
Devang Patel
79b48b8bc0 Add dump() routines for debugging assistance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37314 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-23 19:55:36 +00:00
Chris Lattner
d82dc66944 update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37027 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-14 01:54:16 +00:00
Nick Lewycky
ecd94c804a Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36873 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 13:37:16 +00:00
Devang Patel
99c282453a Use iterative while loop instead of recursive function call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36694 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 20:55:18 +00:00
Devang Patel
1997473cf7 Drop 'const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 01:11:54 +00:00
Devang Patel
3e15bf33e0 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-02 21:39:20 +00:00
Devang Patel
794fd75c67 Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 21:15:47 +00:00
Owen Anderson
95b745a52e Fix some null checks to actually test the part that needs checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36298 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 07:04:45 +00:00
Owen Anderson
13e3a292c5 Add null checks and const-ify these accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36270 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-20 05:44:16 +00:00
Owen Anderson
9e7919785e Add accessor to get the blocks immediately dominated by a given block to ETForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36251 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-18 05:25:09 +00:00
Owen Anderson
1c2b862be0 Add an accessor to make ETForest more useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-18 04:38:39 +00:00
Owen Anderson
e934fefd6b Tabs -> Spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36094 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 23:14:18 +00:00
Owen Anderson
3dc6776b33 Remove ImmediateDominator analysis. The same information can be obtained from DomTree. A lot of code for
constructing ImmediateDominator is now folded into DomTree construction.

This is part of the ongoing work for PR217.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36063 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 08:47:27 +00:00
Owen Anderson
690c684fc6 Make ETForest depend on DomTree rather than IDom. This is the first step
in the long process that will be fixing PR 217.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36034 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 23:49:24 +00:00
Owen Anderson
8ea325730c Move isReachableFromEntry out of line to avoid an unnecessary #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35797 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-09 04:07:36 +00:00
Owen Anderson
558fc740da Cleanup some from my DomSet-removal changes. Add a new
isReachableFromEntry
test to ETForest to factor a common test out of code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35786 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-09 00:52:49 +00:00
Owen Anderson
cd4abb7e6d Remove DomSet completely. This concludes work on PR1171.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35775 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 21:30:05 +00:00
Owen Anderson
e9ed4452bc Add DomSet back, and revert the changes to LoopSimplify. Apparently the
ETForest updating mechanisms don't work as I thought they did.  These changes
will be reapplied once the issue is worked out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35741 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 18:23:27 +00:00
Owen Anderson
ba43963e96 Completely purge DomSet. This is the (hopefully) final patch for PR1171.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35731 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 07:17:27 +00:00
Devang Patel
58efcd3bcd LoopSimplify::FindPHIToPartitionLoops()
Use ETForest instead of DominatorSet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35222 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 20:19:48 +00:00
Bill Wendling
5c7e326585 Added an automatic cast to "std::ostream*" etc. from OStream. We then can
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 05:15:13 +00:00
Jeff Cohen
d41b30def3 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-05 19:31:28 +00:00
Chris Lattner
b62ff3f7f1 Move DominatorTree to immediately follow DominatorTreeBase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30693 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 05:24:56 +00:00
Nick Lewycky
f19fb9b4f4 Add ability to remove nodes from DominatorTree, for when a BasicBlock
is being removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30270 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-12 00:18:28 +00:00
Chris Lattner
6aba48338f Add dominates/properlyDominates queries to IDom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29456 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 22:24:47 +00:00
Reid Spencer
4f1bd9e996 For PR780:
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace
2. Replace the previous explicit mechanism in all the .h and .cpp files
   with the macros in IncludeFile.h
This gets us a consistent mechanism throughout LLVM for ensuring linkage.
Next step is to make sure its used in enough places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28715 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:00:26 +00:00
Reid Spencer
192913e281 Change from using a stub function to a stub variable for passing to the
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:02:51 +00:00
Chris Lattner
c83769ae33 Fix pastos in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28522 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 06:57:55 +00:00
Chris Lattner
6fe8ff48bd Use class tags instead of struct tags. The coding standards specify this
for public classes for improved win32 compatibility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28391 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 17:17:12 +00:00
Nate Begeman
26d5d16a2c Move some common data structures between dom and pdom into the base class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26905 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-20 19:32:48 +00:00
Chris Lattner
25abb1dc09 Change ET-Forest to automatically recalculate its DFSnum's if too many slow
queries are made.

Patch by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25323 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 20:55:09 +00:00
Chris Lattner
ccacd3ccc2 Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 08:22:18 +00:00
Chris Lattner
d87ef134d7 Fix PR670 and test/Regression/Transforms/Mem2Reg/2005-11-28-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24508 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 01:07:12 +00:00
Chris Lattner
a35bef9db2 Fix the dominates method to return true if the two nodes are the same. Add
a new properlyDominates method to do what the old one did.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24407 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:27:33 +00:00
Misha Brukman
9769ab2226 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:19:05 +00:00
Reid Spencer
ce9653ce44 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 04:03:45 +00:00
Chris Lattner
1fca5ff62b Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17281 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 16:14:51 +00:00
Chris Lattner
5fb00c5893 Make sure any client of Dominators.h links in Dominators.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 15:46:59 +00:00
Chris Lattner
d49b120414 It's not clear to me whether the old version was correct C++ code, but in
any case it's not portable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13621 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-21 18:38:16 +00:00
Misha Brukman
dd298c8c6e Doxygenified and cleand up comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12294 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-11 23:08:20 +00:00
Chris Lattner
eae45cf44b The recalclulate method was a nasty hack that was once used by the -cee pass,
which never worked itself.  The cee pass still doesn't work, but it doesn't use
this method anymore anyway, so eliminate the method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10302 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 00:55:32 +00:00
Chris Lattner
31b935357d Rewrite dominators implementation. Now domset is constructed from immdom,
instead of the other way around.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10300 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 00:36:16 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Chris Lattner
317a61b2db Get rid of the whole "Node2" business, rename getNode() ->getBlock() to
be more descriptive


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8468 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 16:25:06 +00:00
Chris Lattner
420a8bf2b2 Rework dominator and post dominator information so that we do not have to
unify all exit nodes of a function to compute post-dominance information.
This does not work with functions that have both unwind and return nodes,
because we cannot unify these blocks.  The new implementation is better
anyway. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8459 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 20:36:51 +00:00
Chris Lattner
fd4d8975cf Add new methods, update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7962 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 22:10:57 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
John Criswell
7a73b80b90 Merged in autoconf branch. This provides configuration via the autoconf
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 21:59:07 +00:00
Chris Lattner
3889a2cb05 Remove a ton of extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:08:05 +00:00
John Criswell
be583b914d Included assert.h so that the code compiles under newer versions of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 14:01:36 +00:00
Chris Lattner
e33b796851 Add more graph traits specializations for dominator tree nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5751 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-20 21:21:05 +00:00
Chris Lattner
ef05100950 Make the interface to update a little more efficient
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5651 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 20:24:17 +00:00
Chris Lattner
a24e09df76 Add interface to update domfrontier info, thanks to Casey Carter for impl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4456 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 02:39:48 +00:00
Chris Lattner
375b8e5128 Use the forward declaration for GraphTraits instead of #including
the header


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4210 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 01:36:08 +00:00
Joel Stanley
61315bc367 Added partial specialization of GraphTraits for the DominatorTree class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4205 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 23:26:00 +00:00
Chris Lattner
7ca266fe1f Expose new "recalculate" method from dominatorset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4074 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-08 19:12:08 +00:00
Chris Lattner
934487a9cc Simplify code a bit, add an assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3974 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-29 21:37:08 +00:00
Chris Lattner
3a294d6085 - Add methods to ImmediateDominators & DominatorTree to allow updates
- Make DominatorTree::Node not inherit from std::vector


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3938 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-26 16:14:37 +00:00