Jeroen Dobbelaere via llvm-dev
2017-Aug-03 13:02 UTC
[llvm-dev] LLVM-IR: order of a PHI node predecessors ?
Hi all, are there any restrictions on the order of a PHI node predecessors ? Like following example, is this still valid LLVM-IR ? --- for.body: ; preds = %for.body, %entry %lsr.iv43 = phi i32 [ %lsr.iv.next44, %for.body ], [ 0, %entry ] %i.032 = phi i32 [ 0, %entry ], [ %inc, %for.body ] ; %entry and %for.body reversed --- Greetings, Jeroen Dobbelaere
Krzysztof Parzyszek via llvm-dev
2017-Aug-03 13:19 UTC
[llvm-dev] LLVM-IR: order of a PHI node predecessors ?
There are no requirements regarding the ordering of PHI node arguments (i.e. block/value pairs). The code you showed is valid. -Krzysztof On 8/3/2017 8:02 AM, Jeroen Dobbelaere via llvm-dev wrote:> Hi all, > > are there any restrictions on the order of a PHI node predecessors ? > > Like following example, is this still valid LLVM-IR ? > > --- > for.body: ; preds = %for.body, %entry > %lsr.iv43 = phi i32 [ %lsr.iv.next44, %for.body ], [ 0, %entry ] > %i.032 = phi i32 [ 0, %entry ], [ %inc, %for.body ] ; %entry and %for.body reversed > --- > > Greetings, > > Jeroen Dobbelaere > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation