[PATCH] D132450: StructurizeCFG: Set Undef for non-predecessors in setPhiValues()
Ruiling, Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 22:08:41 PDT 2022
ruiling marked an inline comment as done.
ruiling 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]] ]
----------------
sameerds wrote:
> 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.
I am not sure whether this would regress quality of generated code, but I happened to get an idea to fix the issue. Please check whether this sounds good to you. The backward traversal is done once per basic block. So I have postponed the constant check.
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