Hi all, I have a doubt on the usage of phi nodes in LLVM: if I define a value in a bb, are phi nodes needed in the blocks that are dominated by the bb where the value is defined? As an example consider the following trivial example: // BB0 A = 5; if (condition) { // BB1 B = 2; } else { // BB2 B = 1; } // BB3 is a phi node required for A in BB3? b.r., Carlo Alberto Ferraris -------------- next part -------------- A non-text attachment was scrubbed... Name: cafxx.vcf Type: text/x-vcard Size: 233 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110612/abc30f2b/attachment.vcf>
Hi Carlo,> I have a doubt on the usage of phi nodes in LLVM: if I define a value in a bb, > are phi nodes needed in the blocks that are dominated by the bb where the value > is defined? > As an example consider the following trivial example: > // BB0 > A = 5; > if (condition) { // BB1 > B = 2; > } else { // BB2 > B = 1; > } > // BB3 > is a phi node required for A in BB3?no, it is not required AFAIK. Ciao, Duncan.