Commit Graph

104 Commits

Author SHA1 Message Date
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
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
Devang Patel
3831c553e3 Reset vertex.
Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/048092.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36294 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 00:36:45 +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
9a341ff3c1 Fix some unsafe code. Also, tabs -> spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36035 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 23:57:00 +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
Chris Lattner
a9f120bd9f Convert ImmediateDominators::DFSPass from being recursive to being iterative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35815 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-09 06:44:42 +00:00
Chris Lattner
8645fb9524 minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35807 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-09 06:10:06 +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
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
Nick Lewycky
51bc779096 Don't crash when encountering a BasicBlock that hasn't been registered yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35756 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 01:02:12 +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
9dea3a340a It is not possible to determine dominance between two PHI nodes
based on their ordering. This is applicable to ETForest::dominates() also.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 14:57:43 +00:00
Devang Patel
2ad28e6c48 Use SmallPtrSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35388 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-27 20:50:46 +00:00
Devang Patel
40d2cd13a5 Spell check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35374 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-27 00:16:08 +00:00
Devang Patel
b9dbc4decc It is not possible to determie dominance between two PHI nodes
based on their ordering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35369 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-26 23:18:28 +00:00
Devang Patel
9be98dd9c0 Use std::vector<DFCalculateWorkObject> instead of
std::vector<DFCalculateWorkObject *> to reduce malloc/free traffic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35368 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-26 23:17:19 +00:00
Devang Patel
cbdfb8a9d5 DominanceFrontier::calculate().
Avoid recursion, Use iterative algorithm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35225 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 21:25:31 +00:00
Devang Patel
3b57b6f36e LoopSimplify::FindPHIToPartitionLoops()
Use ETForest instead of DominatorSet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35221 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-20 20:18:12 +00:00
Bill Wendling
2e3def1177 Removed iostream #includes. Replaced std::cerr with DOUT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31814 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-17 08:03:48 +00:00
Devang Patel
b71f6728eb remove extra white spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30576 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-22 01:07:57 +00:00
Devang Patel
8d3ab25335 Use iterative algorith to assign DFS number. This reduces
call stack depth.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30575 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-22 01:05:33 +00:00
Devang Patel
697e590580 Undo previous check-in.
Reintroduce recursive assignDFSNumber().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 21:43:24 +00:00
Devang Patel
57d12f962d Avoid recursion in assignDFSNumber(). Move def from ET-Forest.h
to Dominators.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 01:27:42 +00:00
Chris Lattner
5d8925c7c5 Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29921 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:30:17 +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
bb636274d4 Fix an et-forest memory leak. Patch by Daniel Berlin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 19:41:45 +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
6b135b74bd Bugfix for etforest updating. Contributed by Daniel Berlin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25152 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 07:58:01 +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
Duraid Madina
3e317534c7 more HP-UX cleanliness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25015 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 08:35:06 +00:00
Chris Lattner
a1fecc9c26 This requires proper dominance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:27:53 +00:00
Chris Lattner
91bd25d9df Make dominates(A,B) work with post dominators. Patch contributed by
Naveen Neelakantam, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21543 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-25 20:50:33 +00:00
Jeff Cohen
9d80930e95 Eliminate tabs and trailing spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21480 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 21:38:35 +00:00
Misha Brukman
fd93908ae8 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 23:48:37 +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
a06b3af2fe Make sure any client of Dominators.h links in Dominators.cpp
Patch by Morten Ofstad


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16987 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 15:47:16 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Chris Lattner
fab8596459 compute dominator tree children in a deterministic order that does not depend
on the address of BasicBlock objects in memory.  This eliminates stuff like this:

 Inorder Dominator Tree:
   [1]  %entry
     [2]  %loopentry
-      [3]  %loopexit
       [3]  %no_exit
-        [4]  %endif
         [4]  %then
+        [4]  %endif
+      [3]  %loopexit
       [3]  %return


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14253 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-19 20:13:48 +00:00
Chris Lattner
f6437a3023 Print out immediate dominators in program order, not in random order based on the address
of BasicBlock objects


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14252 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-19 20:04:47 +00:00
Chris Lattner
8e72749fc0 Add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14037 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-05 00:24:59 +00:00