LLVM API Documentation
#include <DominanceFrontier.h>


Public Types | |
| typedef std::set< BasicBlock * > | DomSetType |
| typedef std::map< BasicBlock *, DomSetType > | DomSetMapType |
| typedef DomSetMapType::iterator | iterator |
| typedef DomSetMapType::const_iterator | const_iterator |
Public Member Functions | |
| DominanceFrontierBase (char &ID, bool isPostDom) | |
| const std::vector< BasicBlock * > & | getRoots () const |
| bool | isPostDominator () const |
| virtual void | releaseMemory () |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| iterator | find (BasicBlock *B) |
| const_iterator | find (BasicBlock *B) const |
| iterator | addBasicBlock (BasicBlock *BB, const DomSetType &frontier) |
| void | removeBlock (BasicBlock *BB) |
| removeBlock - Remove basic block BB's frontier. | |
| void | addToFrontier (iterator I, BasicBlock *Node) |
| void | removeFromFrontier (iterator I, BasicBlock *Node) |
| bool | compareDomSet (DomSetType &DS1, const DomSetType &DS2) const |
| bool | compare (DominanceFrontierBase &Other) const |
| virtual void | print (raw_ostream &OS, const Module *=0) const |
| void | dump () const |
| dump - Dump the dominance frontier to dbgs(). | |
Protected Attributes | |
| DomSetMapType | Frontiers |
| std::vector< BasicBlock * > | Roots |
| const bool | IsPostDominators |
DominanceFrontierBase - Common base class for computing forward and inverse dominance frontiers for a function.
Definition at line 31 of file DominanceFrontier.h.
| typedef DomSetMapType::const_iterator llvm::DominanceFrontierBase::const_iterator |
Definition at line 58 of file DominanceFrontier.h.
| typedef std::map<BasicBlock*, DomSetType> llvm::DominanceFrontierBase::DomSetMapType |
Definition at line 34 of file DominanceFrontier.h.
| typedef std::set<BasicBlock*> llvm::DominanceFrontierBase::DomSetType |
Definition at line 33 of file DominanceFrontier.h.
| typedef DomSetMapType::iterator llvm::DominanceFrontierBase::iterator |
Definition at line 57 of file DominanceFrontier.h.
| llvm::DominanceFrontierBase::DominanceFrontierBase | ( | char & | ID, |
| bool | isPostDom | ||
| ) | [inline] |
Definition at line 41 of file DominanceFrontier.h.
| iterator llvm::DominanceFrontierBase::addBasicBlock | ( | BasicBlock * | BB, |
| const DomSetType & | frontier | ||
| ) | [inline] |
Definition at line 66 of file DominanceFrontier.h.
| void llvm::DominanceFrontierBase::addToFrontier | ( | iterator | I, |
| BasicBlock * | Node | ||
| ) | [inline] |
Definition at line 79 of file DominanceFrontier.h.
References end().
| iterator llvm::DominanceFrontierBase::begin | ( | ) | [inline] |
Definition at line 59 of file DominanceFrontier.h.
References Frontiers.
Referenced by compare(), print(), and removeBlock().
| const_iterator llvm::DominanceFrontierBase::begin | ( | ) | const [inline] |
Definition at line 60 of file DominanceFrontier.h.
References Frontiers.
| bool llvm::DominanceFrontierBase::compare | ( | DominanceFrontierBase & | Other | ) | const [inline] |
compare - Return true if the other dominance frontier base matches this dominance frontier base. Otherwise return false.
Definition at line 117 of file DominanceFrontier.h.
References begin(), compareDomSet(), end(), find(), and I.
| bool llvm::DominanceFrontierBase::compareDomSet | ( | DomSetType & | DS1, |
| const DomSetType & | DS2 | ||
| ) | const [inline] |
compareDomSet - Return false if two domsets match. Otherwise return true;
Definition at line 92 of file DominanceFrontier.h.
References I.
Referenced by compare().
| void DominanceFrontierBase::dump | ( | ) | const |
dump - Dump the dominance frontier to dbgs().
Reimplemented from llvm::Pass.
Definition at line 137 of file DominanceFrontier.cpp.
References llvm::dbgs(), and print().
| iterator llvm::DominanceFrontierBase::end | ( | ) | [inline] |
Definition at line 61 of file DominanceFrontier.h.
References Frontiers.
Referenced by addBasicBlock(), addToFrontier(), compare(), print(), removeBlock(), and removeFromFrontier().
| const_iterator llvm::DominanceFrontierBase::end | ( | ) | const [inline] |
Definition at line 62 of file DominanceFrontier.h.
References Frontiers.
| iterator llvm::DominanceFrontierBase::find | ( | BasicBlock * | B | ) | [inline] |
Definition at line 63 of file DominanceFrontier.h.
References Frontiers.
Referenced by addBasicBlock(), compare(), and removeBlock().
| const_iterator llvm::DominanceFrontierBase::find | ( | BasicBlock * | B | ) | const [inline] |
Definition at line 64 of file DominanceFrontier.h.
References Frontiers.
| const std::vector<BasicBlock*>& llvm::DominanceFrontierBase::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 48 of file DominanceFrontier.h.
References Roots.
| bool llvm::DominanceFrontierBase::isPostDominator | ( | ) | const [inline] |
isPostDominator - Returns true if analysis based of postdoms
Definition at line 52 of file DominanceFrontier.h.
References IsPostDominators.
| void DominanceFrontierBase::print | ( | raw_ostream & | OS, |
| const Module * | = 0 |
||
| ) | const [virtual] |
print - Convert to human readable form
Reimplemented from llvm::Pass.
Definition at line 113 of file DominanceFrontier.cpp.
References begin(), end(), I, and llvm::WriteAsOperand().
Referenced by dump().
| virtual void llvm::DominanceFrontierBase::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 54 of file DominanceFrontier.h.
References Frontiers.
| void llvm::DominanceFrontierBase::removeBlock | ( | BasicBlock * | BB | ) | [inline] |
| void llvm::DominanceFrontierBase::removeFromFrontier | ( | iterator | I, |
| BasicBlock * | Node | ||
| ) | [inline] |
Definition at line 84 of file DominanceFrontier.h.
References end().
DomSetMapType llvm::DominanceFrontierBase::Frontiers [protected] |
Definition at line 36 of file DominanceFrontier.h.
Referenced by addBasicBlock(), begin(), llvm::DominanceFrontier::calculate(), end(), find(), releaseMemory(), removeBlock(), and llvm::DominanceFrontier::runOnFunction().
const bool llvm::DominanceFrontierBase::IsPostDominators [protected] |
Definition at line 38 of file DominanceFrontier.h.
Referenced by isPostDominator().
std::vector<BasicBlock*> llvm::DominanceFrontierBase::Roots [protected] |
Definition at line 37 of file DominanceFrontier.h.
Referenced by llvm::DominanceFrontier::getRoot(), getRoots(), and llvm::DominanceFrontier::runOnFunction().