LLVM API Documentation
#include <Dominators.h>
Inheritance diagram for llvm::ImmediateDominatorsBase:
Public Types | |
typedef std::map< BasicBlock *, BasicBlock * > | IDomMapType |
typedef IDomMapType::const_iterator | const_iterator |
Public Member Functions | |
ImmediateDominatorsBase (bool isPostDom) | |
virtual void | releaseMemory () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | find (BasicBlock *B) const |
BasicBlock * | operator[] (BasicBlock *BB) const |
BasicBlock * | get (BasicBlock *BB) const |
void | addNewBlock (BasicBlock *BB, BasicBlock *IDom) |
void | setImmediateDominator (BasicBlock *BB, BasicBlock *NewIDom) |
virtual void | print (std::ostream &OS, const Module *=0) const |
Protected Attributes | |
std::map< BasicBlock *, BasicBlock * > | IDoms |
std::vector< BasicBlock * > | Vertex |
std::map< BasicBlock *, InfoRec > | Info |
Classes | |
struct | InfoRec |
Definition at line 67 of file Dominators.h.
typedef IDomMapType::const_iterator llvm::ImmediateDominatorsBase::const_iterator |
Definition at line 93 of file Dominators.h.
typedef std::map<BasicBlock*, BasicBlock*> llvm::ImmediateDominatorsBase::IDomMapType |
Definition at line 92 of file Dominators.h.
llvm::ImmediateDominatorsBase::ImmediateDominatorsBase | ( | bool | isPostDom | ) | [inline] |
Definition at line 87 of file Dominators.h.
void llvm::ImmediateDominatorsBase::addNewBlock | ( | BasicBlock * | BB, | |
BasicBlock * | IDom | |||
) | [inline] |
addNewBlock - Add a new block to the CFG, with the specified immediate dominator.
Definition at line 119 of file Dominators.h.
const_iterator llvm::ImmediateDominatorsBase::begin | ( | ) | const [inline] |
const_iterator llvm::ImmediateDominatorsBase::end | ( | ) | const [inline] |
const_iterator llvm::ImmediateDominatorsBase::find | ( | BasicBlock * | B | ) | const [inline] |
BasicBlock* llvm::ImmediateDominatorsBase::get | ( | BasicBlock * | BB | ) | const [inline] |
get() - Synonym for operator[].
Definition at line 107 of file Dominators.h.
Referenced by addNewBlock(), operator[](), and print().
BasicBlock* llvm::ImmediateDominatorsBase::operator[] | ( | BasicBlock * | BB | ) | const [inline] |
operator[] - Return the idom for the specified basic block. The start node returns null, because it does not have an immediate dominator.
Definition at line 101 of file Dominators.h.
void ImmediateDominatorsBase::print | ( | std::ostream & | OS, | |
const Module * | = 0 | |||
) | const [virtual] |
print - Convert to human readable form
Reimplemented from llvm::Pass.
Definition at line 214 of file Dominators.cpp.
References E, F, get(), llvm::DominatorBase::getRoots(), I, and llvm::WriteAsOperand().
virtual void llvm::ImmediateDominatorsBase::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 89 of file Dominators.h.
References IDoms.
void llvm::ImmediateDominatorsBase::setImmediateDominator | ( | BasicBlock * | BB, | |
BasicBlock * | NewIDom | |||
) | [inline] |
setImmediateDominator - Update the immediate dominator information to change the current immediate dominator for the specified block to another block. This method requires that BB already have an IDom, otherwise just use addNewBlock.
Definition at line 129 of file Dominators.h.
std::map<BasicBlock*, BasicBlock*> llvm::ImmediateDominatorsBase::IDoms [protected] |
Definition at line 79 of file Dominators.h.
Referenced by addNewBlock(), begin(), end(), find(), get(), releaseMemory(), llvm::ImmediatePostDominators::runOnFunction(), llvm::ImmediateDominators::runOnFunction(), and setImmediateDominator().
std::map<BasicBlock*, InfoRec> llvm::ImmediateDominatorsBase::Info [protected] |
Definition at line 85 of file Dominators.h.
Referenced by llvm::ImmediatePostDominators::runOnFunction(), and llvm::ImmediateDominators::runOnFunction().
std::vector<BasicBlock*> llvm::ImmediateDominatorsBase::Vertex [protected] |
Definition at line 82 of file Dominators.h.
Referenced by llvm::ImmediatePostDominators::runOnFunction(), and llvm::ImmediateDominators::runOnFunction().