[polly-PATCH 2/3] Drop option -polly-detect-track-failures
Tobias Grosser
tobias at grosser.es
Sat Apr 18 09:14:43 PDT 2015
This option has been enabled since a while. As we do not see large performance
regressions due to failure tracking, we remove the possibility of disabling it.
This reduces the combinations of options that need to be tested.
---
lib/Analysis/ScopDetection.cpp | 18 ++++--------------
lib/Support/RegisterPasses.cpp | 3 ---
test/ScopDetect/keep_going_expansion.ll | 2 +-
test/ScopDetectionDiagnostics/ReportAlias-01.ll | 2 +-
.../ReportDifferentElementSize.ll | 2 +-
test/ScopDetectionDiagnostics/ReportFuncCall-01.ll | 2 +-
test/ScopDetectionDiagnostics/ReportLoopBound-01.ll | 6 +++---
.../ReportMultipleNonAffineAccesses.ll | 10 +++++-----
.../ReportNonAffineAccess-01.ll | 2 +-
test/ScopDetectionDiagnostics/ReportUnprofitable.ll | 2 +-
.../ReportVariantBasePtr-01.ll | 2 +-
11 files changed, 19 insertions(+), 32 deletions(-)
diff --git a/lib/Analysis/ScopDetection.cpp b/lib/Analysis/ScopDetection.cpp
index ae49880..22fa60a 100644
--- a/lib/Analysis/ScopDetection.cpp
+++ b/lib/Analysis/ScopDetection.cpp
@@ -142,12 +142,6 @@ static cl::opt<bool> AllowUnsigned("polly-allow-unsigned",
cl::Hidden, cl::init(false), cl::ZeroOrMore,
cl::cat(PollyCategory));
-static cl::opt<bool, true>
- TrackFailures("polly-detect-track-failures",
- cl::desc("Track failure strings in detecting scop regions"),
- cl::location(PollyTrackFailures), cl::Hidden, cl::ZeroOrMore,
- cl::init(true), cl::cat(PollyCategory));
-
static cl::opt<bool> KeepGoing("polly-detect-keep-going",
cl::desc("Do not fail on the first error."),
cl::Hidden, cl::ZeroOrMore, cl::init(false),
@@ -166,7 +160,6 @@ static cl::opt<bool, true> XPollyModelPHINodes(
cl::init(false), cl::cat(PollyCategory));
bool polly::PollyModelPHINodes = false;
-bool polly::PollyTrackFailures = false;
StringRef polly::PollySkipFnAttr = "polly.skip.fn";
//===----------------------------------------------------------------------===//
@@ -239,8 +232,7 @@ inline bool ScopDetection::invalid(DetectionContext &Context, bool Assert,
RejectLog &Log = Context.Log;
std::shared_ptr<RR> RejectReason = std::make_shared<RR>(Arguments...);
- if (PollyTrackFailures)
- Log.report(RejectReason);
+ Log.report(RejectReason);
DEBUG(dbgs() << RejectReason->getMessage());
DEBUG(dbgs() << "\n");
@@ -798,7 +790,7 @@ void ScopDetection::findScops(Region &R) {
bool HasErrors = !RegionIsValid || Context.Log.size() > 0;
- if (PollyTrackFailures && HasErrors)
+ if (HasErrors)
RejectLogs.insert(std::make_pair(&R, Context.Log));
if (!HasErrors) {
@@ -1012,10 +1004,8 @@ bool ScopDetection::runOnFunction(llvm::Function &F) {
findScops(*TopRegion);
// Only makes sense when we tracked errors.
- if (PollyTrackFailures) {
- emitMissedRemarksForValidRegions(F, ValidRegions);
- emitMissedRemarksForLeaves(F, TopRegion);
- }
+ emitMissedRemarksForValidRegions(F, ValidRegions);
+ emitMissedRemarksForLeaves(F, TopRegion);
for (const Region *R : ValidRegions)
emitValidRemarks(F, R);
diff --git a/lib/Support/RegisterPasses.cpp b/lib/Support/RegisterPasses.cpp
index 95f4bc3..66c843c 100644
--- a/lib/Support/RegisterPasses.cpp
+++ b/lib/Support/RegisterPasses.cpp
@@ -224,9 +224,6 @@ void registerPollyPasses(llvm::legacy::PassManagerBase &PM) {
}
static bool shouldEnablePolly() {
- if (PollyOnlyPrinter || PollyPrinter || PollyOnlyViewer || PollyViewer)
- PollyTrackFailures = true;
-
if (PollyOnlyPrinter || PollyPrinter || PollyOnlyViewer || PollyViewer ||
ExportJScop || ImportJScop)
PollyEnabled = true;
diff --git a/test/ScopDetect/keep_going_expansion.ll b/test/ScopDetect/keep_going_expansion.ll
index 937b8f0..88a2dab 100644
--- a/test/ScopDetect/keep_going_expansion.ll
+++ b/test/ScopDetect/keep_going_expansion.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-detect-track-failures -polly-detect-keep-going -polly-detect -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-detect-keep-going -polly-detect -analyze < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
diff --git a/test/ScopDetectionDiagnostics/ReportAlias-01.ll b/test/ScopDetectionDiagnostics/ReportAlias-01.ll
index 14596fb..d28528b 100644
--- a/test/ScopDetectionDiagnostics/ReportAlias-01.ll
+++ b/test/ScopDetectionDiagnostics/ReportAlias-01.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -polly-use-runtime-alias-checks=false -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -analyze < %s 2>&1| FileCheck %s
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-use-runtime-alias-checks=false -pass-remarks-missed="polly-detect" -polly-detect -analyze < %s 2>&1| FileCheck %s
;void f(int A[], int B[]) {
; for (int i=0; i<42; i++)
diff --git a/test/ScopDetectionDiagnostics/ReportDifferentElementSize.ll b/test/ScopDetectionDiagnostics/ReportDifferentElementSize.ll
index 0a609e4..e5a9e03 100644
--- a/test/ScopDetectionDiagnostics/ReportDifferentElementSize.ll
+++ b/test/ScopDetectionDiagnostics/ReportDifferentElementSize.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -analyze < %s 2>&1| FileCheck %s
+; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect -analyze < %s 2>&1| FileCheck %s
; 1 void differenttypes(char *A)
; 2 {
diff --git a/test/ScopDetectionDiagnostics/ReportFuncCall-01.ll b/test/ScopDetectionDiagnostics/ReportFuncCall-01.ll
index 5f33889..2600244 100644
--- a/test/ScopDetectionDiagnostics/ReportFuncCall-01.ll
+++ b/test/ScopDetectionDiagnostics/ReportFuncCall-01.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -analyze < %s 2>&1 | FileCheck %s
+; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect -analyze < %s 2>&1 | FileCheck %s
; #define N 1024
; double invalidCall(double A[N]);
diff --git a/test/ScopDetectionDiagnostics/ReportLoopBound-01.ll b/test/ScopDetectionDiagnostics/ReportLoopBound-01.ll
index 0968427..14f33a5 100644
--- a/test/ScopDetectionDiagnostics/ReportLoopBound-01.ll
+++ b/test/ScopDetectionDiagnostics/ReportLoopBound-01.ll
@@ -1,6 +1,6 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-allow-nonaffine-loops=false -polly-detect -analyze < %s 2>&1| FileCheck %s --check-prefix=REJECTNONAFFINELOOPS
-; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-allow-nonaffine-loops=true -polly-detect -analyze < %s 2>&1| FileCheck %s --check-prefix=ALLOWNONAFFINELOOPS
-; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-allow-nonaffine-loops=true -polly-allow-nonaffine -polly-detect -analyze < %s 2>&1| FileCheck %s --check-prefix=ALLOWNONAFFINEALL
+; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-allow-nonaffine-loops=false -polly-detect -analyze < %s 2>&1| FileCheck %s --check-prefix=REJECTNONAFFINELOOPS
+; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-allow-nonaffine-loops=true -polly-detect -analyze < %s 2>&1| FileCheck %s --check-prefix=ALLOWNONAFFINELOOPS
+; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-allow-nonaffine-loops=true -polly-allow-nonaffine -polly-detect -analyze < %s 2>&1| FileCheck %s --check-prefix=ALLOWNONAFFINEALL
; void f(int A[], int n) {
; for (int i = 0; i < A[n]; i++)
diff --git a/test/ScopDetectionDiagnostics/ReportMultipleNonAffineAccesses.ll b/test/ScopDetectionDiagnostics/ReportMultipleNonAffineAccesses.ll
index 58b5403..ae2f31e 100644
--- a/test/ScopDetectionDiagnostics/ReportMultipleNonAffineAccesses.ll
+++ b/test/ScopDetectionDiagnostics/ReportMultipleNonAffineAccesses.ll
@@ -1,8 +1,8 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -analyze < %s 2>&1| FileCheck %s
-; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -analyze < %s 2>&1| FileCheck %s -check-prefix=DELIN
-; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -polly-detect-keep-going -analyze < %s 2>&1| FileCheck %s -check-prefix=DELIN-ALL
-; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -polly-allow-nonaffine -analyze < %s 2>&1| FileCheck %s -check-prefix=NONAFFINE
-; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -polly-allow-nonaffine -analyze < %s 2>&1| FileCheck %s -check-prefix=NONAFFINE
+; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -pass-remarks-missed="polly-detect" -polly-detect -analyze < %s 2>&1| FileCheck %s
+; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -pass-remarks-missed="polly-detect" -polly-detect -analyze < %s 2>&1| FileCheck %s -check-prefix=DELIN
+; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -pass-remarks-missed="polly-detect" -polly-detect -polly-detect-keep-going -analyze < %s 2>&1| FileCheck %s -check-prefix=DELIN-ALL
+; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -pass-remarks-missed="polly-detect" -polly-detect -polly-allow-nonaffine -analyze < %s 2>&1| FileCheck %s -check-prefix=NONAFFINE
+; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -pass-remarks-missed="polly-detect" -polly-detect -polly-allow-nonaffine -analyze < %s 2>&1| FileCheck %s -check-prefix=NONAFFINE
; 1 void manyaccesses(float A[restrict], long n, float B[restrict][n])
; 2 {
diff --git a/test/ScopDetectionDiagnostics/ReportNonAffineAccess-01.ll b/test/ScopDetectionDiagnostics/ReportNonAffineAccess-01.ll
index 58cfc08..f6398d8 100644
--- a/test/ScopDetectionDiagnostics/ReportNonAffineAccess-01.ll
+++ b/test/ScopDetectionDiagnostics/ReportNonAffineAccess-01.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -analyze < %s 2>&1| FileCheck %s
+; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect -analyze < %s 2>&1| FileCheck %s
; void f(int A[]) {
; for(int i=0; i<42; ++i)
diff --git a/test/ScopDetectionDiagnostics/ReportUnprofitable.ll b/test/ScopDetectionDiagnostics/ReportUnprofitable.ll
index bc641e7..280b4a0 100644
--- a/test/ScopDetectionDiagnostics/ReportUnprofitable.ll
+++ b/test/ScopDetectionDiagnostics/ReportUnprofitable.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -analyze < %s 2>&1| FileCheck %s
+; RUN: opt %loadPolly -pass-remarks-missed="polly-detect" -polly-detect -analyze < %s 2>&1| FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
diff --git a/test/ScopDetectionDiagnostics/ReportVariantBasePtr-01.ll b/test/ScopDetectionDiagnostics/ReportVariantBasePtr-01.ll
index 9ca415f..ab93dc1 100644
--- a/test/ScopDetectionDiagnostics/ReportVariantBasePtr-01.ll
+++ b/test/ScopDetectionDiagnostics/ReportVariantBasePtr-01.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect-track-failures -polly-detect -analyze < %s 2>&1| FileCheck %s
+; RUN: opt %loadPolly -polly-detect-unprofitable -pass-remarks-missed="polly-detect" -polly-detect -analyze < %s 2>&1| FileCheck %s
; struct b {
; double **b;
--
2.1.0
More information about the llvm-commits
mailing list