[polly] r246161 - Do not detect Scops with only one loop.
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 09:55:19 PDT 2015
Author: grosser
Date: Thu Aug 27 11:55:18 2015
New Revision: 246161
URL: http://llvm.org/viewvc/llvm-project?rev=246161&view=rev
Log:
Do not detect Scops with only one loop.
If a region does not have more than one loop, we do not identify it as
a Scop in ScopDetection. The main optimizations Polly is currently performing
(tiling, preparation for outer-loop vectorization and loop fusion) are unlikely
to have a positive impact on individual loops. In some cases, Polly's run-time
alias checks or conditional hoisting may still have a positive impact, but those
are mostly enabling transformations which LLVM already performs for individual
loops. As we do not focus on individual loops, we leave them untouched to not
introduce compile time regressions and execution time noise. This results in
good compile time reduction (oourafft: -73.99%, smg2000: -56.25%).
Contributed-by: Pratik Bhatu <cs12b1010 at iith.ac.in>
Reviewers: grosser
Differential Revision: http://reviews.llvm.org/D12268
Modified:
polly/trunk/include/polly/ScopDetection.h
polly/trunk/lib/Analysis/ScopDetection.cpp
polly/trunk/test/DependenceInfo/different_schedule_dimensions.ll
polly/trunk/test/Isl/Ast/assumed_context_empty_domain_restriction.ll
polly/trunk/test/Isl/CodeGen/alias-check-multi-dim.ll
polly/trunk/test/Isl/CodeGen/exprModDiv.ll
polly/trunk/test/Isl/CodeGen/getNumberOfIterations.ll
polly/trunk/test/Isl/CodeGen/if-conditions-in-vector-code.ll
polly/trunk/test/Isl/CodeGen/inner_scev_sdiv_in_lb_invariant.ll
polly/trunk/test/Isl/CodeGen/inner_scev_sdiv_in_rtc.ll
polly/trunk/test/Isl/CodeGen/multidim-non-matching-typesize-2.ll
polly/trunk/test/Isl/CodeGen/multidim-non-matching-typesize.ll
polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-2.ll
polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion.ll
polly/trunk/test/Isl/CodeGen/non-affine-subregion-dominance-reuse.ll
polly/trunk/test/Isl/CodeGen/non_affine_float_compare.ll
polly/trunk/test/Isl/CodeGen/read-only-scalars.ll
polly/trunk/test/Isl/CodeGen/srem-in-other-bb.ll
polly/trunk/test/ScopDetect/non-affine-conditional.ll
polly/trunk/test/ScopDetect/non-affine-float-compare.ll
polly/trunk/test/ScopDetect/non-affine-loop-condition-dependent-access_2.ll
polly/trunk/test/ScopDetect/non-affine-loop-condition-dependent-access_3.ll
polly/trunk/test/ScopDetect/non-affine-loop.ll
polly/trunk/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_2.ll
polly/trunk/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll
polly/trunk/test/ScopInfo/NonAffine/non_affine_but_srem.ll
polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_nested.ll
polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_affine_loop.ll
polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_non_affine_loop.ll
polly/trunk/test/ScopInfo/NonAffine/non_affine_float_compare.ll
polly/trunk/test/ScopInfo/aliasing_many_arrays_to_compare.ll
polly/trunk/test/ScopInfo/invariant_load_ptr_ptr_noalias.ll
polly/trunk/test/ScopInfo/no-scalar-deps-in-non-affine-subregion.ll
polly/trunk/test/ScopInfo/read-only-scalars.ll
Modified: polly/trunk/include/polly/ScopDetection.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopDetection.h?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopDetection.h (original)
+++ polly/trunk/include/polly/ScopDetection.h Thu Aug 27 11:55:18 2015
@@ -294,6 +294,11 @@ private:
/// @return True if the loop is valid in the region.
bool isValidLoop(Loop *L, DetectionContext &Context) const;
+ /// @brief Check if a region contains more than one loop.
+ ///
+ /// @param R The region to check
+ bool hasMoreThanOneLoop(Region *R) const;
+
/// @brief Check if the function @p F is marked as invalid.
///
/// @note An OpenMP subfunction will be marked as invalid.
Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Thu Aug 27 11:55:18 2015
@@ -798,6 +798,23 @@ bool ScopDetection::isValidLoop(Loop *L,
return invalid<ReportLoopBound>(Context, /*Assert=*/true, L, LoopCount);
}
+bool ScopDetection::hasMoreThanOneLoop(Region *R) const {
+ Loop *EntryLoop = LI->getLoopFor(R->getEntry());
+ if (!EntryLoop)
+ return false;
+
+ if (!EntryLoop->getSubLoops().empty())
+ return true;
+
+ for (pred_iterator PI = pred_begin(R->getExit()), PE = pred_end(R->getExit());
+ PI != PE; ++PI)
+ if (R->contains(*PI))
+ if (EntryLoop != LI->getLoopFor(*PI))
+ return true;
+
+ return false;
+}
+
Region *ScopDetection::expandRegion(Region &R) {
// Initial no valid region was found (greater than R)
std::unique_ptr<Region> LastValidRegion;
@@ -1009,6 +1026,9 @@ bool ScopDetection::isValidRegion(Detect
&(CurRegion.getEntry()->getParent()->getEntryBlock()))
return invalid<ReportEntry>(Context, /*Assert=*/true, CurRegion.getEntry());
+ if (!DetectUnprofitable && !hasMoreThanOneLoop(&CurRegion))
+ invalid<ReportUnprofitable>(Context, /*Assert=*/true, &CurRegion);
+
if (!isValidExit(Context))
return false;
Modified: polly/trunk/test/DependenceInfo/different_schedule_dimensions.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/DependenceInfo/different_schedule_dimensions.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/DependenceInfo/different_schedule_dimensions.ll (original)
+++ polly/trunk/test/DependenceInfo/different_schedule_dimensions.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt -S %loadPolly -polly-dependences -analyze < %s | FileCheck %s
+; RUN: opt -S %loadPolly -polly-dependences -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s
; CHECK: RAW dependences:
; CHECK: { Stmt_bb9[0] -> Stmt_bb10[0] }
Modified: polly/trunk/test/Isl/Ast/assumed_context_empty_domain_restriction.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/Ast/assumed_context_empty_domain_restriction.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/Ast/assumed_context_empty_domain_restriction.ll (original)
+++ polly/trunk/test/Isl/Ast/assumed_context_empty_domain_restriction.ll Thu Aug 27 11:55:18 2015
@@ -1,6 +1,9 @@
-; RUN: opt %loadPolly -analyze -polly-detect < %s | FileCheck %s --check-prefix=DETECT
-; RUN: opt %loadPolly -analyze -polly-scops < %s | FileCheck %s --check-prefix=INFO
-; RUN: opt %loadPolly -analyze -polly-ast < %s | FileCheck %s
+; RUN: opt %loadPolly -analyze -polly-detect -polly-detect-unprofitable < %s | \
+; RUN: FileCheck %s --check-prefix=DETECT
+; RUN: opt %loadPolly -analyze -polly-scops -polly-detect-unprofitable < %s | \
+; RUN: FileCheck %s --check-prefix=INFO
+; RUN: opt %loadPolly -analyze -polly-ast -polly-detect-unprofitable < %s | \
+; RUN: FileCheck %s
;
; This test used to crash the scalar code generation, now we will bail out after
; ScopInfo and destory the ScoP as the runtime context is empty.
Modified: polly/trunk/test/Isl/CodeGen/alias-check-multi-dim.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/alias-check-multi-dim.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/alias-check-multi-dim.ll (original)
+++ polly/trunk/test/Isl/CodeGen/alias-check-multi-dim.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-codegen -polly-delinearize -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-delinearize \
+; RUN: -polly-detect-unprofitable -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; CHECK: sext i32 %indvar.init to i64
Modified: polly/trunk/test/Isl/CodeGen/exprModDiv.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/exprModDiv.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/exprModDiv.ll (original)
+++ polly/trunk/test/Isl/CodeGen/exprModDiv.ll Thu Aug 27 11:55:18 2015
@@ -1,5 +1,8 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-dir=%S -polly-codegen -S < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-dir=%S -polly-codegen -polly-import-jscop-postfix=pow2 -S < %s | FileCheck %s -check-prefix=POW2
+; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-dir=%S \
+; RUN: -polly-codegen -polly-detect-unprofitable -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-dir=%S \
+; RUN: -polly-codegen -polly-import-jscop-postfix=pow2 \
+; RUN: -polly-detect-unprofitable -S < %s | FileCheck %s -check-prefix=POW2
;
; void exprModDiv(float *A, float *B, float *C, long N, long p) {
; for (long i = 0; i < N; i++)
Modified: polly/trunk/test/Isl/CodeGen/getNumberOfIterations.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/getNumberOfIterations.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/getNumberOfIterations.ll (original)
+++ polly/trunk/test/Isl/CodeGen/getNumberOfIterations.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-vectorizer=polly -polly-codegen < %s -S | FileCheck %s
+; RUN: opt %loadPolly -polly-vectorizer=polly -polly-codegen \
+; RUN: -polly-detect-unprofitable < %s -S | FileCheck %s
; #pragma known-parallel
; for (int c0 = 0; c0 <= min(15, N - 1); c0 += 1)
Modified: polly/trunk/test/Isl/CodeGen/if-conditions-in-vector-code.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/if-conditions-in-vector-code.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/if-conditions-in-vector-code.ll (original)
+++ polly/trunk/test/Isl/CodeGen/if-conditions-in-vector-code.ll Thu Aug 27 11:55:18 2015
@@ -1,7 +1,7 @@
-; RUN: opt %loadPolly -analyze -polly-ast -polly-vectorizer=polly < %s | \
+; RUN: opt %loadPolly -analyze -polly-detect-unprofitable -polly-ast -polly-vectorizer=polly < %s | \
; RUN: FileCheck %s -check-prefix=AST
-; RUN: opt %loadPolly -polly-codegen -polly-vectorizer=polly -S < %s | \
+; RUN: opt %loadPolly -polly-detect-unprofitable -polly-codegen -polly-vectorizer=polly -S < %s | \
; RUN: FileCheck %s
;
; void foo(float *A) {
Modified: polly/trunk/test/Isl/CodeGen/inner_scev_sdiv_in_lb_invariant.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/inner_scev_sdiv_in_lb_invariant.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/inner_scev_sdiv_in_lb_invariant.ll (original)
+++ polly/trunk/test/Isl/CodeGen/inner_scev_sdiv_in_lb_invariant.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -S -polly-codegen -polly-no-early-exit < %s | FileCheck %s
+; RUN: opt %loadPolly -S -polly-codegen -polly-no-early-exit \
+; RUN: -polly-detect-unprofitable < %s | FileCheck %s
;
; Check that this will not crash our code generation.
;
Modified: polly/trunk/test/Isl/CodeGen/inner_scev_sdiv_in_rtc.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/inner_scev_sdiv_in_rtc.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/inner_scev_sdiv_in_rtc.ll (original)
+++ polly/trunk/test/Isl/CodeGen/inner_scev_sdiv_in_rtc.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-codegen -polly-no-early-exit -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-no-early-exit \
+; RUN: -polly-detect-unprofitable -S < %s | FileCheck %s
;
; This will just check that we generate valid code here.
;
Modified: polly/trunk/test/Isl/CodeGen/multidim-non-matching-typesize-2.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/multidim-non-matching-typesize-2.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/multidim-non-matching-typesize-2.ll (original)
+++ polly/trunk/test/Isl/CodeGen/multidim-non-matching-typesize-2.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-detect-unprofitable \
+; RUN: -S < %s | FileCheck %s
; CHECK: polly
target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
Modified: polly/trunk/test/Isl/CodeGen/multidim-non-matching-typesize.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/multidim-non-matching-typesize.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/multidim-non-matching-typesize.ll (original)
+++ polly/trunk/test/Isl/CodeGen/multidim-non-matching-typesize.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-detect-unprofitable \
+; RUN: -S < %s | FileCheck %s
target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
Modified: polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-2.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-2.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-2.ll (original)
+++ polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion-2.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-codegen -polly-no-early-exit -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-no-early-exit \
+; RUN: -polly-detect-unprofitable -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
Modified: polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion.ll (original)
+++ polly/trunk/test/Isl/CodeGen/non-affine-phi-node-expansion.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-detect-unprofitable \
+; RUN: -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
%struct.wombat = type {[4 x i32]}
Modified: polly/trunk/test/Isl/CodeGen/non-affine-subregion-dominance-reuse.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/non-affine-subregion-dominance-reuse.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/non-affine-subregion-dominance-reuse.ll (original)
+++ polly/trunk/test/Isl/CodeGen/non-affine-subregion-dominance-reuse.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-codegen -S -verify-dom-info < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S -verify-dom-info \
+; RUN: -polly-detect-unprofitable < %s | FileCheck %s
;
; Check that we do not reuse the B[i-1] GEP created in block S again in
; block Q. Hence, we create two GEPs for B[i-1]:
Modified: polly/trunk/test/Isl/CodeGen/non_affine_float_compare.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/non_affine_float_compare.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/non_affine_float_compare.ll (original)
+++ polly/trunk/test/Isl/CodeGen/non_affine_float_compare.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,6 @@
-; RUN: opt %loadPolly -polly-codegen -polly-no-early-exit -polly-allow-nonaffine-branches -S -verify-dom-info < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -polly-no-early-exit \
+; RUN: -polly-allow-nonaffine-branches -S -verify-dom-info \
+; RUN: -polly-detect-unprofitable < %s | FileCheck %s
;
; void f(float *A) {
; for (int i = 0; i < 1024; i++)
Modified: polly/trunk/test/Isl/CodeGen/read-only-scalars.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/read-only-scalars.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/read-only-scalars.ll (original)
+++ polly/trunk/test/Isl/CodeGen/read-only-scalars.ll Thu Aug 27 11:55:18 2015
@@ -1,5 +1,9 @@
-; RUN: opt %loadPolly -polly-analyze-read-only-scalars=false -polly-codegen -polly-no-early-exit -S < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-analyze-read-only-scalars=true -polly-codegen -polly-no-early-exit -S < %s | FileCheck %s -check-prefix=SCALAR
+; RUN: opt %loadPolly -polly-analyze-read-only-scalars=false -polly-codegen \
+; RUN: -polly-no-early-exit -polly-detect-unprofitable \
+; RUN: -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-analyze-read-only-scalars=true -polly-codegen \
+; RUN: -polly-no-early-exit -polly-detect-unprofitable \
+; RUN: -S < %s | FileCheck %s -check-prefix=SCALAR
; CHECK-NOT: alloca
Modified: polly/trunk/test/Isl/CodeGen/srem-in-other-bb.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/Isl/CodeGen/srem-in-other-bb.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/Isl/CodeGen/srem-in-other-bb.ll (original)
+++ polly/trunk/test/Isl/CodeGen/srem-in-other-bb.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-codegen -S -polly-no-early-exit < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-codegen -S -polly-no-early-exit \
+; RUN: -polly-detect-unprofitable < %s | FileCheck %s
;
; void pos(float *A, long n) {
; for (long i = 0; i < 100; i++)
Modified: polly/trunk/test/ScopDetect/non-affine-conditional.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopDetect/non-affine-conditional.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopDetect/non-affine-conditional.ll (original)
+++ polly/trunk/test/ScopDetect/non-affine-conditional.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-allow-nonaffine-branches -polly-detect -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-allow-nonaffine-branches -polly-detect \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s
;
; void f(int *A) {
; for (int i = 0; i < 1024; i++)
Modified: polly/trunk/test/ScopDetect/non-affine-float-compare.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopDetect/non-affine-float-compare.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopDetect/non-affine-float-compare.ll (original)
+++ polly/trunk/test/ScopDetect/non-affine-float-compare.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s
;
; void f(float *A) {
; for (int i = 0; i < 1024; i++)
Modified: polly/trunk/test/ScopDetect/non-affine-loop-condition-dependent-access_2.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopDetect/non-affine-loop-condition-dependent-access_2.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopDetect/non-affine-loop-condition-dependent-access_2.ll (original)
+++ polly/trunk/test/ScopDetect/non-affine-loop-condition-dependent-access_2.ll Thu Aug 27 11:55:18 2015
@@ -1,6 +1,13 @@
-; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=false -analyze < %s | FileCheck %s --check-prefix=REJECTNONAFFINELOOPS
-; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPS
-; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPSANDACCESSES
+; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=false -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=REJECTNONAFFINELOOPS
+; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=true -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPS
+; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine \
+; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true \
+; RUN: -polly-detect-unprofitable -polly-detect-unprofitable -analyze < %s \
+; RUN: | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPSANDACCESSES
;
; Here we have a non-affine loop (in the context of the loop nest)
; and also a non-affine access (A[k]). While we can always detect the
Modified: polly/trunk/test/ScopDetect/non-affine-loop-condition-dependent-access_3.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopDetect/non-affine-loop-condition-dependent-access_3.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopDetect/non-affine-loop-condition-dependent-access_3.ll (original)
+++ polly/trunk/test/ScopDetect/non-affine-loop-condition-dependent-access_3.ll Thu Aug 27 11:55:18 2015
@@ -1,6 +1,13 @@
-; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=false -analyze < %s | FileCheck %s --check-prefix=REJECTNONAFFINELOOPS
-; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPS
-; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPSANDACCESSES
+; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=false -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=REJECTNONAFFINELOOPS
+; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=true -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPS
+; RUN: opt %loadPolly -basicaa -polly-detect -polly-allow-nonaffine \
+; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s \
+; RUN: --check-prefix=ALLOWNONAFFINELOOPSANDACCESSES
;
; Here we have a non-affine loop (in the context of the loop nest)
; and also a non-affine access (A[k]). While we can always detect the
Modified: polly/trunk/test/ScopDetect/non-affine-loop.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopDetect/non-affine-loop.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopDetect/non-affine-loop.ll (original)
+++ polly/trunk/test/ScopDetect/non-affine-loop.ll Thu Aug 27 11:55:18 2015
@@ -1,7 +1,18 @@
-; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=false -analyze < %s | FileCheck %s --check-prefix=REJECTNONAFFINELOOPS
-; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPS
-; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -polly-allow-nonaffine -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPSANDACCESSES
-; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -polly-allow-nonaffine -polly-detect-scops-in-regions-without-loops -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPSANDACCESSESANDNOLOOPS
+; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=false -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=REJECTNONAFFINELOOPS
+; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=true -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPS
+; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=true -polly-allow-nonaffine \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s \
+; RUN: --check-prefix=ALLOWNONAFFINELOOPSANDACCESSES
+; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=true -polly-allow-nonaffine \
+; RUN: -polly-detect-scops-in-regions-without-loops \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s \
+; RUN: --check-prefix=ALLOWNONAFFINELOOPSANDACCESSESANDNOLOOPS
;
; This function/region does contain a loop, however it is non-affine, hence the access
; A[i] is also. Furthermore, it is the only loop, thus when we over approximate
Modified: polly/trunk/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_2.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_2.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_2.ll (original)
+++ polly/trunk/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_2.ll Thu Aug 27 11:55:18 2015
@@ -1,6 +1,13 @@
-; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=false -analyze < %s | FileCheck %s --check-prefix=INNERMOST
-; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=INNERMOST
-; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=ALL
+; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=false -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=INNERMOST
+; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=true -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=INNERMOST
+; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine \
+; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s \
+; RUN: --check-prefix=ALL
;
; Here we have a non-affine loop (in the context of the loop nest)
; and also a non-affine access (A[k]). While we can always model the
Modified: polly/trunk/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll (original)
+++ polly/trunk/test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll Thu Aug 27 11:55:18 2015
@@ -1,6 +1,12 @@
-; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=false -analyze < %s | FileCheck %s --check-prefix=INNERMOST
-; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=INNERMOST
-; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=ALL
+; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=false -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=INNERMOST
+; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=true -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=INNERMOST
+; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine \
+; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=ALL
;
; Here we have a non-affine loop (in the context of the loop nest)
; and also a non-affine access (A[k]). While we can always model the
Modified: polly/trunk/test/ScopInfo/NonAffine/non_affine_but_srem.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/NonAffine/non_affine_but_srem.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/NonAffine/non_affine_but_srem.ll (original)
+++ polly/trunk/test/ScopInfo/NonAffine/non_affine_but_srem.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-scops -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s
;
; void pos(float *A, long n) {
; for (long i = 0; i < 100; i++)
Modified: polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_nested.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_nested.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_nested.ll (original)
+++ polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_nested.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s
;
; void f(int *A) {
; for (int i = 0; i < 1024; i++)
Modified: polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_affine_loop.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_affine_loop.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_affine_loop.ll (original)
+++ polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_affine_loop.ll Thu Aug 27 11:55:18 2015
@@ -1,5 +1,10 @@
-; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=INNERMOST
-; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=ALL
+; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=true -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=INNERMOST
+; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine \
+; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s \
+; RUN: --check-prefix=ALL
;
; INNERMOST: Function: f
; INNERMOST: Region: %bb9---%bb17
Modified: polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_non_affine_loop.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_non_affine_loop.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_non_affine_loop.ll (original)
+++ polly/trunk/test/ScopInfo/NonAffine/non_affine_conditional_surrounding_non_affine_loop.ll Thu Aug 27 11:55:18 2015
@@ -1,5 +1,9 @@
-; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=INNERMOST
-; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=ALL
+; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches \
+; RUN: -polly-allow-nonaffine-loops=true -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=INNERMOST
+; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine \
+; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true \
+; RUN: -analyze < %s | FileCheck %s --check-prefix=ALL
;
; INNERMOST: Function: f
; INNERMOST: Region: %bb9---%bb18
Modified: polly/trunk/test/ScopInfo/NonAffine/non_affine_float_compare.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/NonAffine/non_affine_float_compare.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/NonAffine/non_affine_float_compare.ll (original)
+++ polly/trunk/test/ScopInfo/NonAffine/non_affine_float_compare.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s
;
; void f(float *A) {
; for (int i = 0; i < 1024; i++)
Modified: polly/trunk/test/ScopInfo/aliasing_many_arrays_to_compare.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/aliasing_many_arrays_to_compare.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/aliasing_many_arrays_to_compare.ll (original)
+++ polly/trunk/test/ScopInfo/aliasing_many_arrays_to_compare.ll Thu Aug 27 11:55:18 2015
@@ -1,5 +1,8 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s --check-prefix=FOUND
-; RUN: opt %loadPolly -polly-scops -analyze -polly-rtc-max-arrays-per-group=3 < %s | FileCheck %s --check-prefix=IGNORED
+; RUN: opt %loadPolly -polly-scops -polly-detect-unprofitable -analyze \
+; RUN: < %s | FileCheck %s --check-prefix=FOUND
+; RUN: opt %loadPolly -polly-scops -polly-detect-unprofitable -analyze \
+; RUN: -polly-rtc-max-arrays-per-group=3 < %s | FileCheck %s \
+; RUN: --check-prefix=IGNORED
;
; FOUND: Function: foo
; IGNORED-NOT: Function: foo
Modified: polly/trunk/test/ScopInfo/invariant_load_ptr_ptr_noalias.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/invariant_load_ptr_ptr_noalias.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/invariant_load_ptr_ptr_noalias.ll (original)
+++ polly/trunk/test/ScopInfo/invariant_load_ptr_ptr_noalias.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -tbaa -polly-scops -polly-ignore-aliasing -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -tbaa -polly-scops -polly-ignore-aliasing \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s
;
; CHECK: Arrays {
; CHECK: i32** MemRef_A[*][8]
Modified: polly/trunk/test/ScopInfo/no-scalar-deps-in-non-affine-subregion.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/no-scalar-deps-in-non-affine-subregion.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/no-scalar-deps-in-non-affine-subregion.ll (original)
+++ polly/trunk/test/ScopInfo/no-scalar-deps-in-non-affine-subregion.ll Thu Aug 27 11:55:18 2015
@@ -1,4 +1,5 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-scops -polly-detect-unprofitable \
+; RUN: -analyze < %s | FileCheck %s
;
; Check that we do not generate any scalar dependences regarding x. It is
; defined and used on the non-affine subregion only, thus we do not need
Modified: polly/trunk/test/ScopInfo/read-only-scalars.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScopInfo/read-only-scalars.ll?rev=246161&r1=246160&r2=246161&view=diff
==============================================================================
--- polly/trunk/test/ScopInfo/read-only-scalars.ll (original)
+++ polly/trunk/test/ScopInfo/read-only-scalars.ll Thu Aug 27 11:55:18 2015
@@ -1,5 +1,8 @@
-; RUN: opt %loadPolly -polly-analyze-read-only-scalars=false -polly-scops -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-analyze-read-only-scalars=true -polly-scops -analyze < %s | FileCheck %s -check-prefix=SCALARS
+; RUN: opt %loadPolly -polly-analyze-read-only-scalars=false -polly-scops \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-analyze-read-only-scalars=true -polly-scops \
+; RUN: -polly-detect-unprofitable -analyze < %s | FileCheck %s \
+; RUN: -check-prefix=SCALARS
; CHECK-NOT: Memref_scalar
More information about the llvm-commits
mailing list