[PATCH] D132450: StructurizeCFG: Set Undef for non-predecessors in setPhiValues()

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 01:46:39 PDT 2022


sameerds added inline comments.


================
Comment at: llvm/test/Transforms/StructurizeCFG/workarounds/needs-fr-ule.ll:59-61
-; CHECK-NEXT:    [[TMP11:%.*]] = phi i1 [ false, [[FLOW10]] ], [ undef, [[FLOW8]] ]
-; CHECK-NEXT:    [[TMP12:%.*]] = phi i1 [ true, [[FLOW10]] ], [ [[TMP7]], [[FLOW8]] ]
-; CHECK-NEXT:    [[TMP13:%.*]] = phi i1 [ false, [[FLOW10]] ], [ [[TMP8]], [[FLOW8]] ]
----------------
When the value reaching along a predecessor is a constant literal, do we still need to create the extra PHI in the earlier Flow blocks? In this case, it seems the true/false values are pushed to the predecessor block Flow10. Can this be bad for performance in some case? We can skip it by checking for constants when we add predecessors to the stack.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132450/new/

https://reviews.llvm.org/D132450



More information about the llvm-commits mailing list