Commit Graph

59 Commits

Author SHA1 Message Date
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
Chris Lattner c8e665431b * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well

llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner 62b7fd136e Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.

llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner 83d485b310 * Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
  InstrTypes.h anymore

llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner 60a6591d83 Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h

llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner a2b661f764 Remove generic routines to Support/SetOperations.h
llvm-svn: 1715
2002-02-05 03:35:31 +00:00
Chris Lattner a5e103a2ae Provide the right AnalysisID for postdominators
llvm-svn: 1616
2002-01-31 18:29:24 +00:00
Chris Lattner ccf571a408 Convert analyses to new pass structure
llvm-svn: 1603
2002-01-31 00:42:27 +00:00
Chris Lattner 7f74a56e24 Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner 5de2204fe8 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes

llvm-svn: 1400
2001-11-27 00:03:19 +00:00