Skip to content

Commit

Permalink
Reland "Load pass plugins during option processing, so that plugin op…
Browse files Browse the repository at this point in the history
…tions are registered and live."

Fix Polly failures.

Reviewed By: mehdi_amini, Meinersbur

Differential Revision: https://reviews.llvm.org/D121566
  • Loading branch information
Wael Yehia committed Mar 18, 2022
1 parent aee3684 commit c80198b
Show file tree
Hide file tree
Showing 33 changed files with 91 additions and 74 deletions.
5 changes: 5 additions & 0 deletions llvm/test/Feature/load_extension.ll
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
; REQUIRES: x86-registered-target
; RUN: opt %s %loadbye -goodbye -wave-goodbye -disable-output -enable-new-pm=0 2>&1 | FileCheck %s
; RUN: opt %s %loadnewpmbye %loadbye -passes="goodbye" -wave-goodbye -disable-output 2>&1 | FileCheck %s
; RUN: opt %s %loadnewpmbye -passes="goodbye" -wave-goodbye -disable-output 2>&1 | FileCheck %s
; RUN: opt -module-summary %s -o %t.o
; RUN: llvm-lto2 run %t.o %loadbye -wave-goodbye -use-new-pm=0 -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s
; RUN: llvm-lto2 run %t.o %loadbye %loadnewpmbye -wave-goodbye -use-new-pm -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s
; RUN: llvm-lto2 run %t.o %loadbye %loadnewpmbye -opt-pipeline="goodbye" -wave-goodbye -use-new-pm -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s
; REQUIRES: plugins, examples
; UNSUPPORTED: windows
; CHECK: Bye
;
; Specifying a new PM pass plugin with the old PM is an error.
; RUN: ! opt %s %loadnewpmbye -goodbye -wave-goodbye -disable-output -enable-new-pm=0 2>&1 | FileCheck %s --check-prefix=ERROR
; ERROR: load-pass-plugin specified with legacy PM.

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
Expand Down
19 changes: 4 additions & 15 deletions llvm/tools/opt/NewPMDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ static cl::opt<DebugLogging> DebugPM(
DebugLogging::Verbose, "verbose",
"Print extra information about adaptors and pass managers")));

static cl::list<std::string>
PassPlugins("load-pass-plugin",
cl::desc("Load passes from plugin library"));

// This flag specifies a textual description of the alias analysis pipeline to
// use when querying for aliasing information. It only works in concert with
// the "passes" flag above.
Expand Down Expand Up @@ -269,6 +265,7 @@ bool llvm::runPassPipeline(StringRef Arg0, Module &M, TargetMachine *TM,
ToolOutputFile *ThinLTOLinkOut,
ToolOutputFile *OptRemarkFile,
StringRef PassPipeline, ArrayRef<StringRef> Passes,
ArrayRef<PassPlugin> PassPlugins,
OutputKind OK, VerifierKind VK,
bool ShouldPreserveAssemblyUseListOrder,
bool ShouldPreserveBitcodeUseListOrder,
Expand Down Expand Up @@ -341,17 +338,9 @@ bool llvm::runPassPipeline(StringRef Arg0, Module &M, TargetMachine *TM,
PassBuilder PB(TM, PTO, P, &PIC);
registerEPCallbacks(PB);

// Load requested pass plugins and let them register pass builder callbacks
for (auto &PluginFN : PassPlugins) {
auto PassPlugin = PassPlugin::Load(PluginFN);
if (!PassPlugin) {
errs() << "Failed to load passes from '" << PluginFN
<< "'. Request ignored.\n";
continue;
}

PassPlugin->registerPassBuilderCallbacks(PB);
}
// For any loaded plugins, let them register pass builder callbacks.
for (auto &PassPlugin : PassPlugins)
PassPlugin.registerPassBuilderCallbacks(PB);

PB.registerPipelineParsingCallback(
[](StringRef Name, ModulePassManager &MPM,
Expand Down
4 changes: 3 additions & 1 deletion llvm/tools/opt/NewPMDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
namespace llvm {
class StringRef;
class Module;
class PassPlugin;
class TargetMachine;
class ToolOutputFile;
class TargetLibraryInfoImpl;
Expand Down Expand Up @@ -69,7 +70,8 @@ bool runPassPipeline(StringRef Arg0, Module &M, TargetMachine *TM,
TargetLibraryInfoImpl *TLII, ToolOutputFile *Out,
ToolOutputFile *ThinLinkOut, ToolOutputFile *OptRemarkFile,
StringRef PassPipeline, ArrayRef<StringRef> PassInfos,
opt_tool::OutputKind OK, opt_tool::VerifierKind VK,
ArrayRef<PassPlugin> PassPlugins, opt_tool::OutputKind OK,
opt_tool::VerifierKind VK,
bool ShouldPreserveAssemblyUseListOrder,
bool ShouldPreserveBitcodeUseListOrder,
bool EmitSummaryIndex, bool EmitModuleHash,
Expand Down
38 changes: 31 additions & 7 deletions llvm/tools/opt/opt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "llvm/LinkAllPasses.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Passes/PassPlugin.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileSystem.h"
Expand Down Expand Up @@ -300,6 +301,10 @@ static cl::opt<std::string> RemarksFormat(
cl::desc("The format used for serializing remarks (default: YAML)"),
cl::value_desc("format"), cl::init("yaml"));

static cl::list<std::string>
PassPlugins("load-pass-plugin",
cl::desc("Load passes from plugin library"));

namespace llvm {
cl::opt<PGOKind>
PGOKindFlag("pgo-kind", cl::init(NoPGO), cl::Hidden,
Expand Down Expand Up @@ -581,6 +586,17 @@ int main(int argc, char **argv) {
initializeExampleIRTransforms(Registry);
#endif

SmallVector<PassPlugin, 1> PluginList;
PassPlugins.setCallback([&](const std::string &PluginPath) {
auto Plugin = PassPlugin::Load(PluginPath);
if (!Plugin) {
errs() << "Failed to load passes from '" << PluginPath
<< "'. Request ignored.\n";
return;
}
PluginList.emplace_back(Plugin.get());
});

cl::ParseCommandLineOptions(argc, argv,
"llvm .bc -> .bc modular optimizer and analysis printer\n");

Expand All @@ -591,6 +607,19 @@ int main(int argc, char **argv) {
return 1;
}

// If `-passes=` is specified, use NPM.
// If `-enable-new-pm` is specified and there are no codegen passes, use NPM.
// e.g. `-enable-new-pm -sroa` will use NPM.
// but `-enable-new-pm -codegenprepare` will still revert to legacy PM.
const bool UseNPM = (EnableNewPassManager && !shouldForceLegacyPM()) ||
PassPipeline.getNumOccurrences() > 0;

if (!UseNPM && PluginList.size()) {
errs() << argv[0] << ": " << PassPlugins.ArgStr
<< " specified with legacy PM.\n";
return 1;
}

// FIXME: once the legacy PM code is deleted, move runPassPipeline() here and
// construct the PassBuilder before parsing IR so we can reuse the same
// PassBuilder for print passes.
Expand Down Expand Up @@ -752,12 +781,7 @@ int main(int argc, char **argv) {
}
}

// If `-passes=` is specified, use NPM.
// If `-enable-new-pm` is specified and there are no codegen passes, use NPM.
// e.g. `-enable-new-pm -sroa` will use NPM.
// but `-enable-new-pm -codegenprepare` will still revert to legacy PM.
if ((EnableNewPassManager && !shouldForceLegacyPM()) ||
PassPipeline.getNumOccurrences() > 0) {
if (UseNPM) {
if (AnalyzeOnly) {
errs() << "Cannot specify -analyze under new pass manager, either "
"specify '-enable-new-pm=0', or use the corresponding new pass "
Expand Down Expand Up @@ -821,7 +845,7 @@ int main(int argc, char **argv) {
// layer.
return runPassPipeline(argv[0], *M, TM.get(), &TLII, Out.get(),
ThinLinkOut.get(), RemarksFile.get(), Pipeline,
Passes, OK, VK, PreserveAssemblyUseListOrder,
Passes, PluginList, OK, VK, PreserveAssemblyUseListOrder,
PreserveBitcodeUseListOrder, EmitSummaryIndex,
EmitModuleHash, EnableDebugify)
? 0
Expand Down
4 changes: 2 additions & 2 deletions polly/test/CodeGen/multiple-codegens.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: opt %loadPolly -polly-scops -polly-opt-isl -polly-codegen -polly-scops -polly-codegen -S < %s | FileCheck %s
; RUN: opt %loadPolly "-passes=scop(polly-opt-isl,polly-codegen,polly-codegen)" -S < %s | FileCheck %s
; RUN: opt %loadPolly "-passes=scop(polly-opt-isl,polly-codegen),scop(polly-codegen)" -S < %s | FileCheck %s
; RUN: opt %loadNPMPolly "-passes=scop(polly-opt-isl,polly-codegen,polly-codegen)" -S < %s | FileCheck %s
; RUN: opt %loadNPMPolly "-passes=scop(polly-opt-isl,polly-codegen),scop(polly-codegen)" -S < %s | FileCheck %s
;
; llvm.org/PR34441
; Properly handle multiple -polly-scops/-polly-codegen in the same
Expand Down
2 changes: 1 addition & 1 deletion polly/test/DeLICM/map_memset_zero.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-delicm -disable-output < %s | FileCheck -match-full-lines %s
; RUN: opt %loadPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-delicm>)" -disable-output < %s | FileCheck -match-full-lines %s
; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-delicm>)" -disable-output < %s | FileCheck -match-full-lines %s
;
; Check that PHI mapping works even in presence of a memset whose'
; zero value is used.
Expand Down
2 changes: 1 addition & 1 deletion polly/test/DeLICM/pass_existence.ll
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; RUN: opt %loadPolly -polly-delicm -disable-output < %s
; RUN: opt %loadPolly -polly-print-delicm -disable-output < %s | FileCheck %s
; RUN: opt %loadPolly "-passes=scop(print<polly-delicm>)" -disable-output < %s | FileCheck %s
; RUN: opt %loadNPMPolly "-passes=scop(print<polly-delicm>)" -disable-output < %s | FileCheck %s
;
; Simple test for the existence of the DeLICM pass.
;
Expand Down
2 changes: 1 addition & 1 deletion polly/test/DeadCodeElimination/computeout.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S %loadPolly -basic-aa -polly-dce -polly-print-ast -disable-output < %s | FileCheck %s
; RUN: opt -S %loadPolly "-passes=scop(polly-dce,print<polly-ast>)" < %s | FileCheck %s
; RUN: opt -S %loadNPMPolly "-passes=scop(polly-dce,print<polly-ast>)" < %s | FileCheck %s
; RUN: opt -S %loadPolly -basic-aa -polly-dce -polly-print-ast -polly-dependences-computeout=1 -disable-output < %s | FileCheck %s -check-prefix=TIMEOUT
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S %loadPolly -basic-aa -polly-dependences-analysis-type=value-based -polly-dce -polly-dce-precise-steps=2 -polly-print-ast -disable-output < %s | FileCheck %s
; RUN: opt -S %loadPolly "-passes=scop(polly-dce,print<polly-ast>)" -polly-dependences-analysis-type=value-based -polly-dce-precise-steps=2 < %s | FileCheck %s
; RUN: opt -S %loadNPMPolly "-passes=scop(polly-dce,print<polly-ast>)" -polly-dependences-analysis-type=value-based -polly-dce-precise-steps=2 < %s | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
;
; for(i = 0; i < 200; i++ )
Expand Down
2 changes: 1 addition & 1 deletion polly/test/ForwardOpTree/forward_load.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-print-optree -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly "-passes=scop(print<polly-optree>)" -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly "-passes=scop(print<polly-optree>)" -disable-output < %s | FileCheck %s -match-full-lines
;
; Rematerialize a load.
;
Expand Down
2 changes: 1 addition & 1 deletion polly/test/PruneUnprofitable/prune_only_scalardeps.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-process-unprofitable=false -polly-unprofitable-scalar-accs=false -polly-prune-unprofitable -disable-output -stats < %s 2>&1 | FileCheck -match-full-lines %s
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-process-unprofitable=false -polly-unprofitable-scalar-accs=false "-passes=scop(polly-prune-unprofitable)" -disable-output -stats < %s 2>&1 | FileCheck -match-full-lines %s
; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb -polly-process-unprofitable=false -polly-unprofitable-scalar-accs=false "-passes=scop(polly-prune-unprofitable)" -disable-output -stats < %s 2>&1 | FileCheck -match-full-lines %s
; REQUIRES: asserts
;
; Skip this SCoP for having scalar dependencies between all statements,
Expand Down
4 changes: 2 additions & 2 deletions polly/test/ScheduleOptimizer/computeout.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; RUN: opt -S %loadPolly -basic-aa -polly-opt-isl -polly-isl-arg=--no-schedule-serialize-sccs -polly-print-ast -disable-output < %s | FileCheck %s
; RUN: opt -S %loadPolly "-passes=scop(polly-opt-isl,print<polly-ast>)" -polly-isl-arg=--no-schedule-serialize-sccs -disable-output < %s | FileCheck %s
; RUN: opt -S %loadNPMPolly "-passes=scop(polly-opt-isl,print<polly-ast>)" -polly-isl-arg=--no-schedule-serialize-sccs -disable-output < %s | FileCheck %s
; RUN: opt -S %loadPolly -basic-aa -polly-opt-isl -polly-isl-arg=--schedule-serialize-sccs -polly-dependences-computeout=1 -polly-print-ast -disable-output < %s | FileCheck %s -check-prefix=TIMEOUT
; RUN: opt -S %loadPolly "-passes=scop(polly-opt-isl,print<polly-ast>)" -polly-isl-arg=--no-schedule-serialize-sccs -polly-dependences-computeout=1 -disable-output < %s | FileCheck %s -check-prefix=TIMEOUT
; RUN: opt -S %loadNPMPolly "-passes=scop(polly-opt-isl,print<polly-ast>)" -polly-isl-arg=--no-schedule-serialize-sccs -polly-dependences-computeout=1 -disable-output < %s | FileCheck %s -check-prefix=TIMEOUT
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"

; for(i = 0; i < 100; i++ )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-vectorizer=stripmine -polly-invariant-load-hoisting -polly-optimized-scops -polly-print-opt-isl -disable-output < %s | FileCheck %s
; RUN: opt %loadPolly "-passes=scop(print<polly-opt-isl>)" -polly-vectorizer=stripmine -polly-invariant-load-hoisting -disable-output < %s | FileCheck %s
; RUN: opt %loadNPMPolly "-passes=scop(print<polly-opt-isl>)" -polly-vectorizer=stripmine -polly-invariant-load-hoisting -disable-output < %s | FileCheck %s
;
; llvm.org/PR46578
;
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/dead_access_load.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
;
; Remove a dead load-instruction
; (an load whose result is not used anywhere)
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/dead_access_phi.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
;
; Remove a dead PHI write/read pair
; (accesses that are effectively not used)
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/dead_access_value.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
;
; Remove a dead value write/read pair
; (accesses that are effectively not used)
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/dead_instruction.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
;
; Remove a dead instruction
; (an instruction whose result is not used anywhere)
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/notdead_region_exitphi.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
;
; Do not remove dependencies of a phi node in a region's exit block.
;
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/notdead_region_innerphi.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
;
; Do not remove dependencies of a phi node within a region statement (%phi).
;
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/notredundant_region_middle.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
;
; Do not remove redundant stores in the middle of region statements.
; The store in region_true could be removed, but in practice we do try to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
;
; Do not remove the scalar value write of %i.trunc in inner.for.
; It is used by body.
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/overwritten.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-simplify -disable-output < %s | FileCheck -match-full-lines %s
; RUN: opt %loadPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck -match-full-lines %s
; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck -match-full-lines %s
;
; Remove a store that is overwritten by another store in the same statement.
;
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/overwritten_3store.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-print-simplify -disable-output < %s | FileCheck -match-full-lines %s
; RUN: opt %loadPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck -match-full-lines %s
; RUN: opt %loadNPMPolly -polly-stmt-granularity=bb "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck -match-full-lines %s
;
; Remove a store that is overwritten by another store in the same statement.
; Check that even multiple stores are removed.
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/overwritten_loadbetween.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-print-simplify -disable-output < %s | FileCheck -match-full-lines %s
; RUN: opt %loadPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck -match-full-lines %s
; RUN: opt %loadNPMPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck -match-full-lines %s
;
; Do not remove overwrites when the value is read before.
;
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/pass_existence.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-print-simplify -disable-output < %s | FileCheck %s
; RUN: opt %loadPolly -disable-output "-passes=scop(print<polly-simplify>)" < %s -aa-pipeline=basic-aa < %s | FileCheck %s
; RUN: opt %loadNPMPolly -disable-output "-passes=scop(print<polly-simplify>)" < %s -aa-pipeline=basic-aa < %s | FileCheck %s
;
; Simple test for the existence of the Simplify pass.
;
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/phi_in_regionstmt.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
;
; The PHINode %cond91.sink.sink.us.sink.6 is in the middle of a region
; statement.
Expand Down
2 changes: 1 addition & 1 deletion polly/test/Simplify/redundant.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt %loadPolly -polly-print-simplify -disable-output < %s | FileCheck %s -match-full-lines
; RUN: opt %loadPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
; RUN: opt %loadNPMPolly "-passes=scop(print<polly-simplify>)" -disable-output -aa-pipeline=basic-aa < %s | FileCheck %s -match-full-lines
;
; Remove redundant store (a store that writes the same value already
; at the destination)
Expand Down
Loading

0 comments on commit c80198b

Please sign in to comment.