diff --git a/llvm/include/llvm/Passes/CodeGenPassBuilder.h b/llvm/include/llvm/Passes/CodeGenPassBuilder.h index d2e9e8185a2b9..a84164bed46ce 100644 --- a/llvm/include/llvm/Passes/CodeGenPassBuilder.h +++ b/llvm/include/llvm/Passes/CodeGenPassBuilder.h @@ -668,9 +668,6 @@ void CodeGenPassBuilder::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) { diff --git a/llvm/include/llvm/Target/CGPassBuilderOption.h b/llvm/include/llvm/Target/CGPassBuilderOption.h index 29bdb9c1746d3..d3d19c8a7dc9f 100644 --- a/llvm/include/llvm/Target/CGPassBuilderOption.h +++ b/llvm/include/llvm/Target/CGPassBuilderOption.h @@ -39,7 +39,6 @@ struct CGPassBuilderOption { bool DisableLSR = false; bool DisableCGP = false; - bool PrintLSR = false; bool DisableMergeICmps = false; bool DisablePartialLibcallInlining = false; bool DisableConstantHoisting = false; diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index d407e9f0871d4..5c055896130a1 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -113,8 +113,6 @@ static cl::opt EnableImplicitNullChecks( static cl::opt DisableMergeICmps("disable-mergeicmps", cl::desc("Disable MergeICmps Pass"), cl::init(false), cl::Hidden); -static cl::opt PrintLSR("print-lsr-output", cl::Hidden, - cl::desc("Print LLVM IR produced by the loop-reduce pass")); static cl::opt PrintISelInput("print-isel-input", cl::Hidden, cl::desc("Print LLVM IR input to isel pass")); @@ -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) @@ -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 diff --git a/llvm/test/CodeGen/PowerPC/lsr-postinc-pos.ll b/llvm/test/CodeGen/PowerPC/lsr-postinc-pos.ll index 83763f5ef76aa..2c5ad949dcc5e 100644 --- a/llvm/test/CodeGen/PowerPC/lsr-postinc-pos.ll +++ b/llvm/test/CodeGen/PowerPC/lsr-postinc-pos.ll @@ -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. diff --git a/llvm/test/Transforms/LoopStrengthReduce/AArch64/lsr-reuse.ll b/llvm/test/Transforms/LoopStrengthReduce/AArch64/lsr-reuse.ll index 64e8a6be998ea..7a3817d3a13c7 100644 --- a/llvm/test/Transforms/LoopStrengthReduce/AArch64/lsr-reuse.ll +++ b/llvm/test/Transforms/LoopStrengthReduce/AArch64/lsr-reuse.ll @@ -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)