LLVM API Documentation
#include <Dominators.h>
Inheritance diagram for llvm::DominatorSetBase:
Public Types | |
typedef std::set< BasicBlock * > | DomSetType |
typedef std::map< BasicBlock *, DomSetType > | DomSetMapType |
typedef DomSetMapType::const_iterator | const_iterator |
typedef DomSetMapType::iterator | iterator |
Public Member Functions | |
DominatorSetBase (bool isPostDom) | |
virtual void | releaseMemory () |
const_iterator | begin () const |
iterator | begin () |
const_iterator | end () const |
iterator | end () |
const_iterator | find (BasicBlock *B) const |
iterator | find (BasicBlock *B) |
const DomSetType & | getDominators (BasicBlock *BB) const |
bool | isReachable (BasicBlock *BB) const |
bool | dominates (BasicBlock *A, BasicBlock *B) const |
bool | properlyDominates (BasicBlock *A, BasicBlock *B) const |
virtual void | print (std::ostream &OS, const Module *=0) const |
bool | dominates (Instruction *A, Instruction *B) const |
void | addBasicBlock (BasicBlock *BB, const DomSetType &Dominators) |
void | addDominator (BasicBlock *BB, BasicBlock *NewDominator) |
Protected Attributes | |
DomSetMapType | Doms |
Definition at line 173 of file Dominators.h.
typedef std::set<BasicBlock*> llvm::DominatorSetBase::DomSetType |
Definition at line 175 of file Dominators.h.
typedef std::map<BasicBlock*, DomSetType> llvm::DominatorSetBase::DomSetMapType |
Definition at line 177 of file Dominators.h.
typedef DomSetMapType::const_iterator llvm::DominatorSetBase::const_iterator |
Definition at line 186 of file Dominators.h.
typedef DomSetMapType::iterator llvm::DominatorSetBase::iterator |
Definition at line 187 of file Dominators.h.
llvm::DominatorSetBase::DominatorSetBase | ( | bool | isPostDom | ) | [inline] |
Definition at line 181 of file Dominators.h.
virtual void llvm::DominatorSetBase::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 183 of file Dominators.h.
References Doms.
const_iterator llvm::DominatorSetBase::begin | ( | ) | const [inline] |
iterator llvm::DominatorSetBase::begin | ( | ) | [inline] |
const_iterator llvm::DominatorSetBase::end | ( | ) | const [inline] |
Definition at line 190 of file Dominators.h.
References Doms.
Referenced by addBasicBlock(), addDominator(), getDominators(), and print().
iterator llvm::DominatorSetBase::end | ( | ) | [inline] |
const_iterator llvm::DominatorSetBase::find | ( | BasicBlock * | B | ) | const [inline] |
Definition at line 192 of file Dominators.h.
Referenced by addBasicBlock(), addDominator(), and getDominators().
iterator llvm::DominatorSetBase::find | ( | BasicBlock * | B | ) | [inline] |
const DomSetType& llvm::DominatorSetBase::getDominators | ( | BasicBlock * | BB | ) | const [inline] |
getDominators - Return the set of basic blocks that dominate the specified block.
Definition at line 199 of file Dominators.h.
References BB, end(), and find().
Referenced by dominates(), isReachable(), and llvm::SplitCriticalEdge().
bool llvm::DominatorSetBase::isReachable | ( | BasicBlock * | BB | ) | const [inline] |
isReachable - Return true if the specified basicblock is reachable. If the block is reachable, we have dominator set information for it.
Definition at line 208 of file Dominators.h.
References BB, and getDominators().
bool llvm::DominatorSetBase::dominates | ( | BasicBlock * | A, | |
BasicBlock * | B | |||
) | const [inline] |
dominates - Return true if A dominates B.
Definition at line 214 of file Dominators.h.
References A, B, and getDominators().
Referenced by dominates(), FindPHIToPartitionLoops(), and properlyDominates().
bool llvm::DominatorSetBase::properlyDominates | ( | BasicBlock * | A, | |
BasicBlock * | B | |||
) | const [inline] |
properlyDominates - Return true if A dominates B and A != B.
Definition at line 220 of file Dominators.h.
References A, B, and dominates().
void DominatorSetBase::print | ( | std::ostream & | OS, | |
const Module * | = 0 | |||
) | const [virtual] |
print - Convert to human readable form
Reimplemented from llvm::Pass.
Definition at line 320 of file Dominators.cpp.
References begin(), E, end(), and llvm::WriteAsOperand().
bool DominatorSetBase::dominates | ( | Instruction * | A, | |
Instruction * | B | |||
) | const |
dominates - Return true if A dominates B. This performs the special checks necessary if A and B are in the same basic block.
Definition at line 241 of file Dominators.cpp.
References A, B, dominates(), and llvm::DominatorBase::IsPostDominators.
void llvm::DominatorSetBase::addBasicBlock | ( | BasicBlock * | BB, | |
const DomSetType & | Dominators | |||
) | [inline] |
addBasicBlock - Call to update the dominator set with information about a new block that was inserted into the function.
Definition at line 240 of file Dominators.h.
References BB, Doms, end(), and find().
Referenced by llvm::SplitCriticalEdge().
void llvm::DominatorSetBase::addDominator | ( | BasicBlock * | BB, | |
BasicBlock * | NewDominator | |||
) | [inline] |
addDominator - If a new block is inserted into the CFG, then method may be called to notify the blocks it dominates that it is in their set.
Definition at line 248 of file Dominators.h.
DomSetMapType llvm::DominatorSetBase::Doms [protected] |
Definition at line 179 of file Dominators.h.
Referenced by addBasicBlock(), begin(), end(), find(), releaseMemory(), llvm::PostDominatorSet::runOnFunction(), and llvm::DominatorSet::runOnFunction().