Skip to content

Commit 9efa7d7

Browse files
authored
Remove -print-lsr-output in favor of --stop-after=loop-reduce
Pull Request: #121305
1 parent 6230f1b commit 9efa7d7

File tree

5 files changed

+2
-12
lines changed

5 files changed

+2
-12
lines changed

llvm/include/llvm/Passes/CodeGenPassBuilder.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,6 @@ void CodeGenPassBuilder<Derived, TargetMachineT>::addIRPasses(
668668
if (getOptLevel() != CodeGenOptLevel::None && !Opt.DisableLSR) {
669669
addPass(createFunctionToLoopPassAdaptor(LoopStrengthReducePass(),
670670
/*UseMemorySSA=*/true));
671-
// FIXME: use -stop-after so we could remove PrintLSR
672-
if (Opt.PrintLSR)
673-
addPass(PrintFunctionPass(dbgs(), "\n\n*** Code after LSR ***\n"));
674671
}
675672

676673
if (getOptLevel() != CodeGenOptLevel::None) {

llvm/include/llvm/Target/CGPassBuilderOption.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ struct CGPassBuilderOption {
3939

4040
bool DisableLSR = false;
4141
bool DisableCGP = false;
42-
bool PrintLSR = false;
4342
bool DisableMergeICmps = false;
4443
bool DisablePartialLibcallInlining = false;
4544
bool DisableConstantHoisting = false;

llvm/lib/CodeGen/TargetPassConfig.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ static cl::opt<bool> EnableImplicitNullChecks(
113113
static cl::opt<bool> DisableMergeICmps("disable-mergeicmps",
114114
cl::desc("Disable MergeICmps Pass"),
115115
cl::init(false), cl::Hidden);
116-
static cl::opt<bool> PrintLSR("print-lsr-output", cl::Hidden,
117-
cl::desc("Print LLVM IR produced by the loop-reduce pass"));
118116
static cl::opt<bool>
119117
PrintISelInput("print-isel-input", cl::Hidden,
120118
cl::desc("Print LLVM IR input to isel pass"));
@@ -503,7 +501,6 @@ CGPassBuilderOption llvm::getCGPassBuilderOption() {
503501
SET_BOOLEAN_OPTION(DisableCGP)
504502
SET_BOOLEAN_OPTION(DisablePartialLibcallInlining)
505503
SET_BOOLEAN_OPTION(DisableSelectOptimize)
506-
SET_BOOLEAN_OPTION(PrintLSR)
507504
SET_BOOLEAN_OPTION(PrintISelInput)
508505
SET_BOOLEAN_OPTION(DebugifyAndStripAll)
509506
SET_BOOLEAN_OPTION(DebugifyCheckAndStripAll)
@@ -836,9 +833,6 @@ void TargetPassConfig::addIRPasses() {
836833
addPass(createLoopStrengthReducePass());
837834
if (EnableLoopTermFold)
838835
addPass(createLoopTermFoldPass());
839-
if (PrintLSR)
840-
addPass(createPrintFunctionPass(dbgs(),
841-
"\n\n*** Code after LSR ***\n"));
842836
}
843837

844838
// The MergeICmpsPass tries to create memcmp calls by grouping sequences of

llvm/test/CodeGen/PowerPC/lsr-postinc-pos.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc -verify-machineinstrs < %s -print-lsr-output 2>&1 | FileCheck %s
1+
; RUN: llc -verify-machineinstrs < %s -stop-after=loop-reduce | FileCheck %s
22

33
; The icmp is a post-inc use, and the increment is in %bb11, but the
44
; scevgep needs to be inserted in %bb so that it is dominated by %t.

llvm/test/Transforms/LoopStrengthReduce/AArch64/lsr-reuse.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc -mtriple=arm64-unknown-unknown -print-lsr-output < %s 2>&1 | FileCheck %s
1+
; RUN: llc -mtriple=aarch64 -stop-after=loop-reduce < %s | FileCheck %s
22

33
declare void @foo(i64)
44

0 commit comments

Comments
 (0)