[clang] [llvm] Revert "[LTO] Enable `PrepareForLTO` for loop unrolling in pre-link pipelines" (PR #220057)
Justin Fargnoli via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 1 14:54:06 PDT 2026
https://github.com/justinfargnoli updated https://github.com/llvm/llvm-project/pull/220057
>From 3ff7b3121aff4f85ae541ea28e109165df8c2173 Mon Sep 17 00:00:00 2001
From: Justin Fargnoli <jfargnoli at nvidia.com>
Date: Mon, 31 Aug 2026 11:58:44 -0700
Subject: [PATCH] =?UTF-8?q?Revert=20"[LTO]=20Enable=20`PrepareForLTO`=20fo?=
=?UTF-8?q?r=20loop=20unrolling=20in=20pre-link=20pipelines=E2=80=A6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit c47197af53270a4795040756c27802f218ba38ca.
---
clang/test/CodeGen/fat-lto-objects-cfi.cpp | 2 +-
llvm/lib/Passes/PassBuilderPipelines.cpp | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/clang/test/CodeGen/fat-lto-objects-cfi.cpp b/clang/test/CodeGen/fat-lto-objects-cfi.cpp
index f68d8243be76d..a41412e0d5148 100644
--- a/clang/test/CodeGen/fat-lto-objects-cfi.cpp
+++ b/clang/test/CodeGen/fat-lto-objects-cfi.cpp
@@ -17,7 +17,7 @@
// TYPE_TEST-NEXT: %cmp14.not = icmp eq i64 %len, 0
// TYPE_TEST-NEXT: br i1 %cmp14.not, label %for.end7, label %for.cond1.preheader.preheader
// TYPE_TEST-LABEL: for.cond1.preheader.preheader: ; preds = %entry
-// TYPE_TEST-NEXT: %arrayidx.c = getelementptr inbounds nuw i8, ptr %ptr, i64 4
+// TYPE_TEST-NEXT: %arrayidx.1 = getelementptr inbounds nuw i8, ptr %ptr, i64 4
// TYPE_TEST-NEXT: br label %for.cond1.preheader
// The code below is a reduced case from https://github.com/llvm/llvm-project/issues/112053
diff --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp
index 5a6d210e950d8..46d39098a214e 100644
--- a/llvm/lib/Passes/PassBuilderPipelines.cpp
+++ b/llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -565,8 +565,7 @@ PassBuilder::buildO1FunctionSimplificationPipeline(OptimizationLevel Level,
PGOOpt->Action != PGOOptions::SampleUse)
LPM2.addPass(LoopFullUnrollPass(static_cast<int>(Level),
/* OnlyWhenForced= */ !PTO.LoopUnrolling,
- PTO.ForgetAllSCEVInLoopUnroll,
- /* PrepareForLTO= */ isLTOPreLink(Phase)));
+ PTO.ForgetAllSCEVInLoopUnroll));
invokeLoopOptimizerEndEPCallbacks(LPM2, Level);
@@ -748,8 +747,7 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level,
PGOOpt->Action != PGOOptions::SampleUse)
LPM2.addPass(LoopFullUnrollPass(static_cast<int>(Level),
/* OnlyWhenForced= */ !PTO.LoopUnrolling,
- PTO.ForgetAllSCEVInLoopUnroll,
- /* PrepareForLTO= */ isLTOPreLink(Phase)));
+ PTO.ForgetAllSCEVInLoopUnroll));
invokeLoopOptimizerEndEPCallbacks(LPM2, Level);
More information about the cfe-commits
mailing list