Commit Graph

51 Commits

Author SHA1 Message Date
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
Chris Lattner a88403bf31 Fix a bad assertion to be correct . The root basic block can be used by PHI nodes.
llvm-svn: 1370
2001-11-26 18:52:02 +00:00
Chris Lattner ba1c1f2fb6 Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
the BasicBlock class where they should be.  pred_begin/pred_end become methods on BasicBlock,
and the cfg namespace isn't used anymore.

llvm-svn: 691
2001-10-01 13:19:53 +00:00
Chris Lattner bb09a10929 Pull iterators out of CFG.h and CFGdecls and put them in Support directory
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Chris Lattner 439465583a Make sure noone branches to the entry node of the method
llvm-svn: 369
2001-08-24 14:56:34 +00:00
Chris Lattner a0484c8eeb Handle case where there is no exit node from a flowgraph
llvm-svn: 365
2001-08-23 17:07:19 +00:00
Chris Lattner e2472bbf6c Moved inline/llvm/Tools/* to include/llvm/Support/*
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner 1547114cbf Fixed post dominator frontiers! Yaay!
llvm-svn: 157
2001-07-08 05:54:09 +00:00
Chris Lattner c385bebc89 Implement support for postdominators, except in dom frontiers
llvm-svn: 142
2001-07-06 16:58:22 +00:00