mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Add an accessor to make ETForest more useful.
llvm-svn: 36246
This commit is contained in:
parent
ea3c945817
commit
7553394275
@ -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
Block a user