Skip to content

Remove -print-lsr-output in favor of --stop-after=loop-reduce #121305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions llvm/include/llvm/Passes/CodeGenPassBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,6 @@ void CodeGenPassBuilder<Derived, TargetMachineT>::addIRPasses(
if (getOptLevel() != CodeGenOptLevel::None && !Opt.DisableLSR) {
addPass(createFunctionToLoopPassAdaptor(LoopStrengthReducePass(),
/*UseMemorySSA=*/true));
// FIXME: use -stop-after so we could remove PrintLSR
if (Opt.PrintLSR)
addPass(PrintFunctionPass(dbgs(), "\n\n*** Code after LSR ***\n"));
}

if (getOptLevel() != CodeGenOptLevel::None) {
Expand Down
1 change: 0 additions & 1 deletion llvm/include/llvm/Target/CGPassBuilderOption.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ struct CGPassBuilderOption {

bool DisableLSR = false;
bool DisableCGP = false;
bool PrintLSR = false;
bool DisableMergeICmps = false;
bool DisablePartialLibcallInlining = false;
bool DisableConstantHoisting = false;
Expand Down
6 changes: 0 additions & 6 deletions llvm/lib/CodeGen/TargetPassConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ static cl::opt<bool> EnableImplicitNullChecks(
static cl::opt<bool> DisableMergeICmps("disable-mergeicmps",
cl::desc("Disable MergeICmps Pass"),
cl::init(false), cl::Hidden);
static cl::opt<bool> PrintLSR("print-lsr-output", cl::Hidden,
cl::desc("Print LLVM IR produced by the loop-reduce pass"));
static cl::opt<bool>
PrintISelInput("print-isel-input", cl::Hidden,
cl::desc("Print LLVM IR input to isel pass"));
Expand Down Expand Up @@ -503,7 +501,6 @@ CGPassBuilderOption llvm::getCGPassBuilderOption() {
SET_BOOLEAN_OPTION(DisableCGP)
SET_BOOLEAN_OPTION(DisablePartialLibcallInlining)
SET_BOOLEAN_OPTION(DisableSelectOptimize)
SET_BOOLEAN_OPTION(PrintLSR)
SET_BOOLEAN_OPTION(PrintISelInput)
SET_BOOLEAN_OPTION(DebugifyAndStripAll)
SET_BOOLEAN_OPTION(DebugifyCheckAndStripAll)
Expand Down Expand Up @@ -836,9 +833,6 @@ void TargetPassConfig::addIRPasses() {
addPass(createLoopStrengthReducePass());
if (EnableLoopTermFold)
addPass(createLoopTermFoldPass());
if (PrintLSR)
addPass(createPrintFunctionPass(dbgs(),
"\n\n*** Code after LSR ***\n"));
}

// The MergeICmpsPass tries to create memcmp calls by grouping sequences of
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/PowerPC/lsr-postinc-pos.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: llc -verify-machineinstrs < %s -print-lsr-output 2>&1 | FileCheck %s
; RUN: llc -verify-machineinstrs < %s -stop-after=loop-reduce | FileCheck %s

; The icmp is a post-inc use, and the increment is in %bb11, but the
; scevgep needs to be inserted in %bb so that it is dominated by %t.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: llc -mtriple=arm64-unknown-unknown -print-lsr-output < %s 2>&1 | FileCheck %s
; RUN: llc -mtriple=aarch64 -stop-after=loop-reduce < %s | FileCheck %s

declare void @foo(i64)

Expand Down
Loading