mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Add an accessor to make ETForest more useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
61a4c072b9
commit
1c2b862be0
@ -320,6 +320,13 @@ public:
|
|||||||
return NULL;
|
return NULL;
|
||||||
return Common->getData<BasicBlock>();
|
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 {
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
AU.setPreservesAll();
|
AU.setPreservesAll();
|
||||||
|
Loading…
Reference in New Issue
Block a user