Commit Graph

68 Commits

Author SHA1 Message Date
Chris Lattner c020bcf850 Change ET-Forest to automatically recalculate its DFSnum's if too many slow
queries are made.

Patch by Daniel Berlin!

llvm-svn: 25323
2006-01-14 20:55:09 +00:00
Chris Lattner dfa65542a1 Bugfix for etforest updating. Contributed by Daniel Berlin.
llvm-svn: 25152
2006-01-09 07:58:01 +00:00
Chris Lattner 6c9cbdba1a Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!

llvm-svn: 25144
2006-01-08 08:22:18 +00:00
Duraid Madina c00eab5b03 more HP-UX cleanliness
llvm-svn: 25015
2005-12-26 08:35:06 +00:00
Chris Lattner f519d1c6ef This requires proper dominance
llvm-svn: 24408
2005-11-18 07:27:53 +00:00
Chris Lattner e093c6f565 Make dominates(A,B) work with post dominators. Patch contributed by
Naveen Neelakantam, thanks!

llvm-svn: 21543
2005-04-25 20:50:33 +00:00
Jeff Cohen 82639853c0 Eliminate tabs and trailing spaces
llvm-svn: 21480
2005-04-23 21:38:35 +00:00
Misha Brukman b1c9317bb4 Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Reid Spencer 9083936835 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual

llvm-svn: 18589
2004-12-07 04:03:45 +00:00
Chris Lattner eb6b8e5772 Make sure any client of Dominators.h links in Dominators.cpp
Patch by Morten Ofstad

llvm-svn: 16987
2004-10-14 15:47:16 +00:00
Reid Spencer 7c16caa336 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/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner 39396e2df9 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

llvm-svn: 14253
2004-06-19 20:13:48 +00:00
Chris Lattner 89f803bb32 Print out immediate dominators in program order, not in random order based on the address
of BasicBlock objects

llvm-svn: 14252
2004-06-19 20:04:47 +00:00
Chris Lattner c5e0be647c Add missing #include
llvm-svn: 14037
2004-06-05 00:24:59 +00:00
Chris Lattner d1ea9cd345 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.

llvm-svn: 10302
2003-12-07 00:55:32 +00:00
Chris Lattner 00f5167693 Completely rewrite domset, idom, and domtree implementation. Now it is based
on the algorithm for directly computing immediate dominators presented in this
paper:

  A Fast Algorithm for Finding Dominators in a Flowgraph
  T. Lengauer & R. Tarjan, ACM TOPLAS July 1979, pgs 121-141.

This _substantially_ speeds up construction of all dominator related information.
Post-dominators to follow.

llvm-svn: 10301
2003-12-07 00:38:08 +00:00
Chris Lattner 189d19fb04 Finegrainify namespacification
llvm-svn: 10131
2003-11-21 20:23:48 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell 482202a601 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner 5dac64f629 Rename Function::getEntryNode -> getEntryBlock
llvm-svn: 8625
2003-09-20 14:39:18 +00:00
Chris Lattner bb9d03b9c0 Renamed DominatorTree::Node::getNode() -> getBlock()
llvm-svn: 8469
2003-09-11 16:26:13 +00:00
Chris Lattner 630d2954be Rework dominator interfaces to handle changes in the post-dominance
construction.  Now there may be multiple root blocks, and null is a
special node used to mark the "virtual" exit node of a CFG.

llvm-svn: 8461
2003-09-10 20:37:51 +00:00
Chris Lattner f8a77578a2 Do not even attempt to compute dominator information for unreachable blocks
llvm-svn: 7963
2003-08-18 22:11:16 +00:00
Misha Brukman 7eb05a170a Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner f31a257bfb Remove using declarations and extraneous #includes
llvm-svn: 6303
2003-05-22 21:47:17 +00:00
Chris Lattner 4dc3fcaff3 Fix bug: Dominators/2003-05-12-UnreachableCode.ll
llvm-svn: 6158
2003-05-12 22:35:13 +00:00
Chris Lattner acb038e5c7 Expose new "recalculate" method from dominatorset
llvm-svn: 4074
2002-10-08 19:12:08 +00:00
Chris Lattner 2cedf1ce82 Fix a nasty problem with dominance calculation for unreachable blocks.
If we had a CFG that look like Entry -> B, Unreachable -> B, then we would
not correctly determine that Entry dominated B, because Entry did not
apparently dominate "unreachable".  This patch fixes this by making the entry
node dominate all blocks, including unreachable ones.

llvm-svn: 4037
2002-10-04 14:45:48 +00:00
Chris Lattner ae3ac7e1c9 Improve printing of dominator sets
llvm-svn: 3976
2002-09-29 21:42:42 +00:00
Chris Lattner 98ae0f1897 - Add methods to ImmediateDominators & DominatorTree to allow updates
- Make DominatorTree::Node not inherit from std::vector

llvm-svn: 3939
2002-09-26 16:14:41 +00:00
Chris Lattner e46f5528a3 Fix bug: test/Regression/Assembler/2002-08-22-DominanceProblem.ll
llvm-svn: 3474
2002-08-22 20:39:29 +00:00
Chris Lattner 1230f23da8 - Do not expose ::ID from any of the analyses anymore.
llvm-svn: 3415
2002-08-21 17:09:15 +00:00
Chris Lattner 8e72d6f6e9 Implement dominator checking in the verifier, so that we check that all
defintiions dominate their uses

llvm-svn: 3214
2002-08-02 17:37:08 +00:00
Chris Lattner 6d149e0215 Fix bug: test/Regression/Other/2002-08-02-DomSetProblem.ll
llvm-svn: 3213
2002-08-02 16:51:27 +00:00
Chris Lattner d43023a85d Split dominance calculation and post dominance calculation stuff
Dominance calculation goes to VMCore library to be used by Verifier.

llvm-svn: 3210
2002-08-02 16:43:03 +00:00
Chris Lattner be4826e627 *** empty log message ***
llvm-svn: 3185
2002-07-31 19:32:01 +00:00
Chris Lattner 31aa7e72f2 Declare that these passes only depend on the CFG of the function
llvm-svn: 3157
2002-07-30 16:27:52 +00:00
Chris Lattner f356bcc824 * Eliminate the Provided set. All Passes now finally just automatically
provide themselves.

llvm-svn: 3124
2002-07-29 21:03:33 +00:00
Chris Lattner 2675007573 * Standardize how analysis results/passes as printed with the print() virtual
methods
* Eliminate AnalysisID:  Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
  the analyses themselves.

llvm-svn: 3116
2002-07-27 01:12:17 +00:00
Chris Lattner a2c0985980 * Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses

llvm-svn: 3112
2002-07-26 21:12:44 +00:00
Chris Lattner 64eea749de *** empty log message ***
llvm-svn: 3105
2002-07-26 18:40:14 +00:00
Chris Lattner 113f4f4609 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner da6743e60c Add method to check to see if two _Instructions_ dominate each other
llvm-svn: 2616
2002-05-13 22:03:16 +00:00
Chris Lattner 15435fd550 Move UnifyFunctionExitNodes to Utils library: final resting place this time
llvm-svn: 2531
2002-05-07 19:18:48 +00:00
Chris Lattner 7608a46cbe Updates to move some header files out of include/llvm/Transforms into
the Scalar and Utils subdirectories

llvm-svn: 2523
2002-05-07 18:36:35 +00:00
Chris Lattner 86ed92af6d Mark analyses that only depend on the CFG of a function
llvm-svn: 2507
2002-05-06 19:32:07 +00:00
Chris Lattner d5a847057b Eliminate duplicate or unneccesary #include's
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner 78dd56fe62 Eliminate the cfg namespace, moving LoopInfo, Dominators, Interval* classes
to the global namespace

llvm-svn: 2370
2002-04-28 16:21:30 +00:00
Chris Lattner 99b6f5cac4 Change the Dominator info and LoopInfo classes to keep track of BasicBlock's, not
const BasicBlocks

llvm-svn: 2337
2002-04-28 00:15:57 +00:00
Chris Lattner f998685cd9 s/Method/Function
llvm-svn: 2336
2002-04-27 07:27:19 +00:00