[llvm-dev] How to get the possible predecessors for a PHINode

mayuyu.io via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 18 11:57:06 PDT 2019


Use a for-loop. PHINode->getNumIncomingValues() as the loop condition, inside the loop pass the index to PHINode->getIncomingBlock()

Zhang

> 在 2019年3月18日,18:34,Alberto Barbaro via llvm-dev <llvm-dev at lists.llvm.org> 写道:
> 
> Hi all,
> I have encountered the following instruction:
> 
> %.0.i = phi i8* [ %9, %8 ], [ %11, %10 ]
> 
> How can I get the %8 and %10?
> 
> I'm using http://llvm.org/doxygen/classllvm_1_1PHINode.html as a reference but I cannot understand how to do that.
> 
> Thanks
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190318/94773a45/attachment.html>


More information about the llvm-dev mailing list