LLVM API Documentation
#include <Dominators.h>
Inheritance diagram for llvm::ETForestBase:
Public Types | |
typedef std::map< BasicBlock *, ETNode * > | ETMapType |
Public Member Functions | |
ETForestBase (bool isPostDom) | |
virtual void | releaseMemory () |
void | updateDFSNumbers () |
bool | dominates (BasicBlock *A, BasicBlock *B) |
bool | properlyDominates (BasicBlock *A, BasicBlock *B) |
BasicBlock * | nearestCommonDominator (BasicBlock *A, BasicBlock *B) const |
Return the nearest common dominator of A and B. | |
virtual void | getAnalysisUsage (AnalysisUsage &AU) const |
void | addNewBlock (BasicBlock *BB, BasicBlock *IDom) |
void | setImmediateDominator (BasicBlock *BB, BasicBlock *NewIDom) |
virtual void | print (std::ostream &OS, const Module *=0) const |
Protected Member Functions | |
ETNode * | getNode (BasicBlock *BB) const |
ETNode * | operator[] (BasicBlock *BB) const |
void | reset () |
Protected Attributes | |
ETMapType | Nodes |
bool | DFSInfoValid |
unsigned int | SlowQueries |
Definition at line 398 of file Dominators.h.
typedef std::map<BasicBlock*, ETNode*> llvm::ETForestBase::ETMapType |
Definition at line 404 of file Dominators.h.
llvm::ETForestBase::ETForestBase | ( | bool | isPostDom | ) | [inline] |
Definition at line 399 of file Dominators.h.
void ETForestBase::addNewBlock | ( | BasicBlock * | BB, | |
BasicBlock * | IDom | |||
) |
addNewBlock - Add a new block to the CFG, with the specified immediate dominator.
Definition at line 888 of file Dominators.cpp.
References BB, DFSInfoValid, getNode(), Nodes, and llvm::ETNode::setFather().
Referenced by llvm::SplitCriticalEdge().
bool llvm::ETForestBase::dominates | ( | BasicBlock * | A, | |
BasicBlock * | B | |||
) | [inline] |
dominates - Return true if A dominates B.
Definition at line 410 of file Dominators.h.
References A, B, DFSInfoValid, llvm::ETNode::DominatedBy(), llvm::ETNode::DominatedBySlow(), getNode(), SlowQueries, and updateDFSNumbers().
Referenced by CalcRegionExitBlocks(), IVUseShouldUsePostIncValue(), and properlyDominates().
virtual void llvm::ETForestBase::getAnalysisUsage | ( | AnalysisUsage & | AU | ) | 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.
Reimplemented in llvm::PostETForest.
Definition at line 448 of file Dominators.h.
References llvm::AnalysisUsage::addRequired(), and llvm::AnalysisUsage::setPreservesAll().
ETNode* llvm::ETForestBase::getNode | ( | BasicBlock * | BB | ) | const [inline, protected] |
getNode - return the (Post)DominatorTree node for the specified basic block. This is the same as using operator[] on this class.
Definition at line 474 of file Dominators.h.
Referenced by addNewBlock(), dominates(), nearestCommonDominator(), operator[](), print(), setImmediateDominator(), and updateDFSNumbers().
BasicBlock* llvm::ETForestBase::nearestCommonDominator | ( | BasicBlock * | A, | |
BasicBlock * | B | |||
) | const [inline] |
Return the nearest common dominator of A and B.
Definition at line 438 of file Dominators.h.
References A, B, llvm::ETNode::getData(), getNode(), and llvm::ETNode::NCA().
ETNode* llvm::ETForestBase::operator[] | ( | BasicBlock * | BB | ) | const [inline, protected] |
void ETForestBase::print | ( | std::ostream & | OS, | |
const Module * | = 0 | |||
) | const [virtual] |
print - Convert to human readable form
Reimplemented from llvm::Pass.
Definition at line 911 of file Dominators.cpp.
References DFSInfoValid, E, F, getNode(), llvm::DominatorBase::getRoots(), and llvm::WriteAsOperand().
bool llvm::ETForestBase::properlyDominates | ( | BasicBlock * | A, | |
BasicBlock * | B | |||
) | [inline] |
properlyDominates - Return true if A dominates B and A != B.
Definition at line 433 of file Dominators.h.
References A, B, and dominates().
virtual void llvm::ETForestBase::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 402 of file Dominators.h.
References reset().
void ETForestBase::reset | ( | ) | [protected] |
Definition at line 810 of file Dominators.cpp.
Referenced by releaseMemory(), llvm::PostETForest::runOnFunction(), and llvm::ETForest::runOnFunction().
void ETForestBase::setImmediateDominator | ( | BasicBlock * | BB, | |
BasicBlock * | NewIDom | |||
) |
setImmediateDominator - Update the immediate dominator information to change the current immediate dominator for the specified block to another block. This method requires that BB for NewIDom already have an ETNode, otherwise just use addNewBlock.
Definition at line 897 of file Dominators.cpp.
References BB, DFSInfoValid, getNode(), and Node.
void ETForestBase::updateDFSNumbers | ( | ) |
Definition at line 816 of file Dominators.cpp.
References BB, llvm::df_begin(), llvm::df_end(), DFSInfoValid, E, getNode(), llvm::DominatorBase::Roots, and SlowQueries.
Referenced by llvm::ETForest::calculate(), and dominates().
bool llvm::ETForestBase::DFSInfoValid [protected] |
Definition at line 485 of file Dominators.h.
Referenced by addNewBlock(), llvm::PostETForest::calculate(), dominates(), print(), setImmediateDominator(), and updateDFSNumbers().
ETMapType llvm::ETForestBase::Nodes [protected] |
Definition at line 484 of file Dominators.h.
Referenced by addNewBlock(), llvm::PostETForest::calculate(), llvm::ETForest::calculate(), getNode(), llvm::PostETForest::getNodeForBlock(), llvm::ETForest::getNodeForBlock(), and reset().
unsigned int llvm::ETForestBase::SlowQueries [protected] |