[llvm-dev] How to the get the PHI Nodes in a basic block?

Alberto Barbaro via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 27 11:07:07 PDT 2019

Hi all,
I have an Instruction object I from where I can correctly obtain the parent
doing I.getParent(). Now I would like to understand how to obtain the PHI
Nodes in that block. Do you suggest to iterate all over the instructions
since the PHI nodes are always at the beginning or should I use another
approach? What the best way to iterate over the instructions in a block?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190627/82c3e9e6/attachment.html>

More information about the llvm-dev mailing list