[llvm-commits] CVS: llvm/include/llvm/Analysis/Dominators.h
Devang Patel
dpatel at apple.com
Thu Apr 19 11:10:18 PDT 2007
On Apr 17, 2007, at 9:38 PM, Owen Anderson wrote:
> Index: llvm/include/llvm/Analysis/Dominators.h
> diff -u llvm/include/llvm/Analysis/Dominators.h:1.72 llvm/include/
> llvm/Analysis/Dominators.h:1.73
> --- llvm/include/llvm/Analysis/Dominators.h:1.72 Sun Apr 15 18:14:18
> 2007
> +++ llvm/include/llvm/Analysis/Dominators.h Tue Apr 17 23:38:39 2007
> @@ -320,6 +320,13 @@
> return NULL;
> return Common->getData<BasicBlock>();
> }
> +
> + /// Return the immediate dominator of A.
> + BasicBlock *getIDom(BasicBlock *A) {
> + ETNode *NodeA = getNode(A);
Please add an assert to check that NodeA is not null. Thanks!
-
Devang
>
> + const ETNode *idom = NodeA->getFather();
> + return idom ? idom->getData<BasicBlock>() : 0;
> + }
>
> virtual void getAnalysisUsage(AnalysisUsage &AU) const {
> AU.setPreservesAll();
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list