LLVM API Documentation
#include <Dominators.h>


DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
Definition at line 726 of file Dominators.h.
| llvm::DominatorTree::DominatorTree | ( | ) | [inline] |
Definition at line 731 of file Dominators.h.
References DT, llvm::PassRegistry::getPassRegistry(), and llvm::initializeDominatorTreePass().
| llvm::DominatorTree::~DominatorTree | ( | ) | [inline] |
Definition at line 736 of file Dominators.h.
References DT.
| DomTreeNode* llvm::DominatorTree::addNewBlock | ( | BasicBlock * | BB, |
| BasicBlock * | DomBB | ||
| ) | [inline] |
addNewBlock - Add a new node to the dominator tree information. This creates a new node as a child of DomBB dominator node,linking it into the children list of the immediate dominator.
Definition at line 831 of file Dominators.h.
References llvm::DominatorTreeBase< NodeT >::addNewBlock(), and DT.
Referenced by llvm::SplitCriticalEdge().
| void llvm::DominatorTree::changeImmediateDominator | ( | BasicBlock * | N, |
| BasicBlock * | NewIDom | ||
| ) | [inline] |
changeImmediateDominator - This method is used to update the dominator tree information when a node's immediate dominator changes.
Definition at line 838 of file Dominators.h.
References llvm::DominatorTreeBase< NodeT >::changeImmediateDominator(), and DT.
Referenced by llvm::MergeBasicBlockIntoOnlyPred(), and llvm::SplitCriticalEdge().
| void llvm::DominatorTree::changeImmediateDominator | ( | DomTreeNode * | N, |
| DomTreeNode * | NewIDom | ||
| ) | [inline] |
Definition at line 842 of file Dominators.h.
References llvm::DominatorTreeBase< NodeT >::changeImmediateDominator(), and DT.
| bool llvm::DominatorTree::compare | ( | DominatorTree & | Other | ) | const [inline] |
compare - Return false if the other dominator tree matches this dominator tree. Otherwise return true.
Definition at line 760 of file Dominators.h.
References llvm::DominatorTreeBase< NodeT >::compare(), DT, getBase(), llvm::DomTreeNodeBase< NodeT >::getBlock(), and getRootNode().
Referenced by verifyAnalysis().
| bool llvm::DominatorTree::dominates | ( | const DomTreeNode * | A, |
| const DomTreeNode * | B | ||
| ) | const [inline] |
Definition at line 781 of file Dominators.h.
References llvm::DominatorTreeBase< NodeT >::dominates(), and DT.
Referenced by BlockDominatesAnExit(), llvm::Region::contains(), dominates(), llvm::ScalarEvolution::getAddRecExpr(), llvm::Region::getExpandedRegion(), getInsertPointForUses(), llvm::SCEVExpander::getIVIncOperand(), llvm::RegionInfo::getMaxRegionExit(), llvm::SCEVExpander::hoistIVInc(), IVUseShouldUsePostIncValue(), llvm::PHITransAddr::PHITranslateValue(), PickMostRelevantLoop(), llvm::SplitCriticalEdge(), and ValueDominatesPHI().
| bool llvm::DominatorTree::dominates | ( | const BasicBlock * | A, |
| const BasicBlock * | B | ||
| ) | const [inline] |
Definition at line 785 of file Dominators.h.
References llvm::DominatorTreeBase< NodeT >::dominates(), and DT.
| bool DominatorTree::dominates | ( | const Instruction * | Def, |
| const Use & | U | ||
| ) | const |
Definition at line 237 of file Dominators.cpp.
References dominates(), llvm::Instruction::getParent(), llvm::Use::getUser(), I, and isReachableFromEntry().
| bool DominatorTree::dominates | ( | const Instruction * | Def, |
| const Instruction * | User | ||
| ) | const |
Definition at line 99 of file Dominators.cpp.
References llvm::BasicBlock::begin(), llvm::tgtok::Def, dominates(), llvm::Instruction::getParent(), I, and isReachableFromEntry().
| bool DominatorTree::dominates | ( | const Instruction * | Def, |
| const BasicBlock * | BB | ||
| ) | const |
Definition at line 136 of file Dominators.cpp.
References llvm::tgtok::Def, dominates(), llvm::dyn_cast(), llvm::InvokeInst::getNormalDest(), llvm::Instruction::getParent(), and isReachableFromEntry().
| bool DominatorTree::dominates | ( | const BasicBlockEdge & | BBE, |
| const Use & | U | ||
| ) | const |
Definition at line 213 of file Dominators.cpp.
References dominates(), llvm::dyn_cast(), llvm::BasicBlockEdge::getEnd(), llvm::BasicBlock::getParent(), llvm::BasicBlockEdge::getStart(), llvm::Use::getUser(), and llvm::BasicBlockEdge::isSingleEdge().
| bool DominatorTree::dominates | ( | const BasicBlockEdge & | BBE, |
| const BasicBlock * | BB | ||
| ) | const |
Definition at line 162 of file Dominators.cpp.
References dominates(), llvm::BasicBlockEdge::getEnd(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlockEdge::getStart(), llvm::BasicBlockEdge::isSingleEdge(), llvm::pred_begin(), and llvm::pred_end().
| void llvm::DominatorTree::eraseNode | ( | BasicBlock * | BB | ) | [inline] |
eraseNode - Removes a node from the dominator tree. Block must not dominate any other blocks. Removes node from its immediate dominator's children list. Deletes dominator node associated with basic block BB.
Definition at line 849 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::eraseNode().
Referenced by llvm::MergeBasicBlockIntoOnlyPred().
| BasicBlock* llvm::DominatorTree::findNearestCommonDominator | ( | BasicBlock * | A, |
| BasicBlock * | B | ||
| ) | [inline] |
findNearestCommonDominator - Find nearest common dominator basic block for basic block A and B. If there is no such block then return NULL.
Definition at line 808 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::findNearestCommonDominator().
Referenced by getInsertPointForUses().
| const BasicBlock* llvm::DominatorTree::findNearestCommonDominator | ( | const BasicBlock * | A, |
| const BasicBlock * | B | ||
| ) | [inline] |
Definition at line 812 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::findNearestCommonDominator().
| virtual void llvm::DominatorTree::getAnalysisUsage | ( | AnalysisUsage & | ) | const [inline, virtual] |
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis<AnalysisType>() function, below.
Reimplemented from llvm::Pass.
Definition at line 777 of file Dominators.h.
References llvm::AnalysisUsage::setPreservesAll().
| DominatorTreeBase<BasicBlock>& llvm::DominatorTree::getBase | ( | ) | [inline] |
Definition at line 740 of file Dominators.h.
References DT.
Referenced by compare(), and verifyAnalysis().
| DomTreeNode* llvm::DominatorTree::getNode | ( | BasicBlock * | BB | ) | const [inline] |
getNode - return the (Post)DominatorTree node for the specified basic block. This is the same as using operator[] on this class.
Definition at line 824 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::getNode().
Referenced by BlockDominatesAnExit(), llvm::Region::contains(), llvm::Region::getEnteringBlock(), isSimplifiedLoopNest(), llvm::MergeBasicBlockIntoOnlyPred(), and llvm::SplitCriticalEdge().
| BasicBlock* llvm::DominatorTree::getRoot | ( | ) | const [inline] |
Definition at line 750 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::getRoot().
Referenced by verifyAnalysis().
| DomTreeNode* llvm::DominatorTree::getRootNode | ( | ) | const [inline] |
Definition at line 754 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::getRootNode().
Referenced by compare(), llvm::GraphTraits< DominatorTree * >::getEntryNode(), and llvm::DOTGraphTraits< DominatorTree * >::getNodeLabel().
| const std::vector<BasicBlock*>& llvm::DominatorTree::getRoots | ( | ) | const [inline] |
getRoots - Return the root blocks of the current CFG. This may include multiple blocks if we are computing post dominators. For forward dominators, this will always be a single block (the entry node).
Definition at line 746 of file Dominators.h.
References DT, and llvm::DominatorBase< NodeT >::getRoots().
Referenced by llvm::DominanceFrontier::runOnFunction().
| bool llvm::DominatorTree::isReachableFromEntry | ( | const BasicBlock * | A | ) | const [inline] |
Definition at line 859 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::isReachableFromEntry().
Referenced by dominates(), FindUnconditionalPreds(), llvm::Loop::isLCSSAForm(), isReachableFromEntry(), and ValueDominatesPHI().
Definition at line 289 of file Dominators.cpp.
References llvm::dyn_cast(), llvm::Instruction::getParent(), llvm::Use::getUser(), I, and isReachableFromEntry().
| DomTreeNode* llvm::DominatorTree::operator[] | ( | BasicBlock * | BB | ) | const [inline] |
Definition at line 817 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::getNode().
| void DominatorTree::print | ( | raw_ostream & | O, |
| const Module * | M = 0 |
||
| ) | const [virtual] |
print - Print out the internal state of the pass. This is called by Analyze to print out the contents of an analysis. Otherwise it is not necessary to implement this method. Beware that the module pointer MAY be null. This automatically forwards to a virtual function that does not provide the Module* in case the analysis doesn't need it it can just be ignored.
Reimplemented from llvm::Pass.
Definition at line 92 of file Dominators.cpp.
References DT, and llvm::DominatorTreeBase< NodeT >::print().
Referenced by verifyAnalysis().
| bool llvm::DominatorTree::properlyDominates | ( | const DomTreeNode * | A, |
| const DomTreeNode * | B | ||
| ) | const [inline] |
Definition at line 798 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::properlyDominates().
Referenced by llvm::DominanceFrontier::calculate(), and isLoopInvariant().
| bool llvm::DominatorTree::properlyDominates | ( | const BasicBlock * | A, |
| const BasicBlock * | B | ||
| ) | const [inline] |
Definition at line 802 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::properlyDominates().
| virtual void llvm::DominatorTree::releaseMemory | ( | ) | [inline, virtual] |
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused.
Optionally implement this function to release pass memory when it is no longer used.
Reimplemented from llvm::Pass.
Definition at line 866 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::releaseMemory().
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass.
Implements llvm::FunctionPass.
| void llvm::DominatorTree::splitBlock | ( | BasicBlock * | NewBB | ) | [inline] |
splitBlock - BB is split and now it has one successor. Update dominator tree to reflect this change.
Definition at line 855 of file Dominators.h.
References DT, and llvm::DominatorTreeBase< NodeT >::splitBlock().
Referenced by UpdateAnalysisInformation().
| void DominatorTree::verifyAnalysis | ( | ) | const [virtual] |
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis information.
Reimplemented from llvm::Pass.
Definition at line 76 of file Dominators.cpp.
References compare(), llvm::errs(), F(), getBase(), llvm::BasicBlock::getParent(), getRoot(), print(), llvm::DominatorTreeBase< NodeT >::recalculate(), and VerifyDomInfo.
Definition at line 729 of file Dominators.h.
Referenced by addNewBlock(), changeImmediateDominator(), compare(), dominates(), DominatorTree(), eraseNode(), findNearestCommonDominator(), getBase(), getNode(), getRoot(), getRootNode(), getRoots(), isReachableFromEntry(), operator[](), print(), properlyDominates(), releaseMemory(), splitBlock(), and ~DominatorTree().
char DominatorTree::ID = 0 [static] |
Definition at line 728 of file Dominators.h.