Alberto Barbaro via llvm-dev
2019-Mar-18 18:34 UTC
[llvm-dev] How to get the possible predecessors for a PHINode
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190318/51ad402c/attachment.html>
mayuyu.io via llvm-dev
2019-Mar-18 18:57 UTC
[llvm-dev] How to get the possible predecessors for a PHINode
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>
Alberto Barbaro via llvm-dev
2019-Mar-22 08:04 UTC
[llvm-dev] How to get the possible predecessors for a PHINode
Thanks that solved my problem Alberto Il giorno lun 18 mar 2019 alle ore 18:57 mayuyu.io <admin at mayuyu.io> ha scritto:> 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/20190322/e801a8cb/attachment.html>