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 172 of file Dominators.h.
typedef DomSetMapType::const_iterator llvm::DominatorSetBase::const_iterator |
Definition at line 184 of file Dominators.h.
typedef std::map<BasicBlock*, DomSetType> llvm::DominatorSetBase::DomSetMapType |
Definition at line 175 of file Dominators.h.
typedef std::set<BasicBlock*> llvm::DominatorSetBase::DomSetType |
Definition at line 173 of file Dominators.h.
Definition at line 185 of file Dominators.h.
llvm::DominatorSetBase::DominatorSetBase | ( | bool | isPostDom | ) | [inline] |
Definition at line 179 of file Dominators.h.
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 238 of file Dominators.h.
References BB, Doms, end(), and find().
Referenced by llvm::SplitCriticalEdge().
void llvm::DominatorSetBase::addDominator | ( | BasicBlock * | BB, | |
BasicBlock * | NewDominator | |||
) | [inline] |
iterator llvm::DominatorSetBase::begin | ( | ) | [inline] |
const_iterator llvm::DominatorSetBase::begin | ( | ) | const [inline] |
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(), I, and llvm::DominatorBase::IsPostDominators.
bool llvm::DominatorSetBase::dominates | ( | BasicBlock * | A, | |
BasicBlock * | B | |||
) | const [inline] |
dominates - Return true if A dominates B.
Definition at line 212 of file Dominators.h.
References A, B, and getDominators().
Referenced by dominates(), FindPHIToPartitionLoops(), and properlyDominates().
iterator llvm::DominatorSetBase::end | ( | ) | [inline] |
const_iterator llvm::DominatorSetBase::end | ( | ) | const [inline] |
Definition at line 188 of file Dominators.h.
References Doms.
Referenced by addBasicBlock(), addDominator(), getDominators(), and print().
iterator llvm::DominatorSetBase::find | ( | BasicBlock * | B | ) | [inline] |
const_iterator llvm::DominatorSetBase::find | ( | BasicBlock * | B | ) | const [inline] |
Definition at line 190 of file Dominators.h.
Referenced by addBasicBlock(), addDominator(), and getDominators().
const DomSetType& llvm::DominatorSetBase::getDominators | ( | BasicBlock * | BB | ) | const [inline] |
getDominators - Return the set of basic blocks that dominate the specified block.
Definition at line 197 of file Dominators.h.
References BB, end(), find(), and I.
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 206 of file Dominators.h.
References BB, and getDominators().
void DominatorSetBase::print | ( | std::ostream & | OS, | |
const Module * | = 0 | |||
) | const [virtual] |
print - Convert to human readable form
Reimplemented from llvm::Pass.
Definition at line 322 of file Dominators.cpp.
References begin(), E, end(), I, and llvm::WriteAsOperand().
bool llvm::DominatorSetBase::properlyDominates | ( | BasicBlock * | A, | |
BasicBlock * | B | |||
) | const [inline] |
properlyDominates - Return true if A dominates B and A != B.
Definition at line 218 of file Dominators.h.
References A, B, and dominates().
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 181 of file Dominators.h.
References Doms.
DomSetMapType llvm::DominatorSetBase::Doms [protected] |
Definition at line 177 of file Dominators.h.
Referenced by addBasicBlock(), begin(), end(), find(), releaseMemory(), llvm::PostDominatorSet::runOnFunction(), and llvm::DominatorSet::runOnFunction().