[PATCH] D155404: [SimplifyCFG] Adjust sinking strategy for conditional predecessors.
DianQK via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 16 07:15:44 PDT 2023
DianQK created this revision.
Herald added subscribers: khei4, hiraditya.
Herald added a project: All.
DianQK requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155404
Files:
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp
===================================================================
--- llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -2251,7 +2251,7 @@
bool Changed = false;
if (HaveNonUnconditionalPredecessors) {
- if (!followedByDeoptOrUnreachable) {
+ if (!followedByDeoptOrUnreachable && ScanIdx < 2) {
// It is always legal to sink common instructions from unconditional
// predecessors. However, if not all predecessors are unconditional,
// this transformation might be pessimizing. So as a rule of thumb,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155404.540807.patch
Type: text/x-patch
Size: 627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230716/e3d603a7/attachment.bin>
More information about the llvm-commits
mailing list