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
@ -321,6 +321,13 @@ public:
|
||||
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();
|
||||
AU.addRequired<DominatorTree>();
|
||||
|
Loading…
Reference in New Issue
Block a user