Add an accessor to make ETForest more useful.
llvm-svn: 36246
This commit is contained in:
parent
f03c90bee6
commit
fae86bcbaa
|
@ -320,6 +320,13 @@ public:
|
|||
return NULL;
|
||||
return Common->getData<BasicBlock>();
|
||||
}
|
||||
|
||||
/// Return the immediate dominator of A.
|
||||
BasicBlock *getIDom(BasicBlock *A) {
|
||||
ETNode *NodeA = getNode(A);
|
||||
const ETNode *idom = NodeA->getFather();
|
||||
return idom ? idom->getData<BasicBlock>() : 0;
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesAll();
|
||||
|
|
Loading…
Reference in New Issue