tests: Explicitly state if profitability tests should be used

Polly's profitability heuristic saves compile time by skipping trivial scops or
scops were we know no good optimization can be applied. For almost all our tests
this heuristic makes little sense as we aim for minimal test cases when testing
functionality. Hence, in almost all cases this heuristic is better be disabled.
In preparation of disabling Polly's compile time heuristic by default in the
test suite we first explicitly enable it in the couple of test cases that really
use it (or run with/without heuristic side-by-side).

llvm-svn: 249418
This commit is contained in:
Tobias Grosser 2015-10-06 15:19:35 +00:00
parent 85a6e0f870
commit 935f62cf0d
12 changed files with 65 additions and 20 deletions

View File

@ -1,6 +1,12 @@
; RUN: opt %loadPolly -polly-detect -analyze < %s | FileCheck %s
; RUN: opt %loadPolly -polly-allow-nonaffine-loops -polly-detect-unprofitable -polly-detect -analyze < %s | FileCheck %s --check-prefix=NALOOPS
; RUN: opt %loadPolly -polly-allow-nonaffine-loops -polly-detect -analyze < %s | FileCheck %s --check-prefix=PROFIT
; RUN: opt %loadPolly -polly-detect-unprofitable=false \
; RUN: -polly-detect -analyze < %s | FileCheck %s
; RUN: opt %loadPolly -polly-allow-nonaffine-loops -polly-detect-unprofitable \
; RUN: -polly-detect -analyze < %s | FileCheck %s --check-prefix=NALOOPS
; RUN: opt %loadPolly -polly-allow-nonaffine-loops -polly-detect -analyze \
; RUN: -polly-detect-unprofitable=false < %s | \
; RUN: FileCheck %s --check-prefix=PROFIT
; The latch conditions of the outer loop are not affine, thus the loop cannot
; handled by the domain generation and needs to be overapproximated.

View File

@ -1,7 +1,10 @@
; RUN: opt %loadPolly -basicaa -polly-detect-unprofitable -polly-detect -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=false -analyze < %s | FileCheck %s --check-prefix=REJECTNONAFFINELOOPS
; RUN: opt %loadPolly -basicaa -polly-detect-unprofitable -polly-detect -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=ALLOWNONAFFINELOOPS
; RUN: opt %loadPolly -basicaa -polly-detect-unprofitable -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 -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s --check-prefix=PROFIT
; RUN: opt %loadPolly -basicaa -polly-detect -polly-detect-unprofitable=false \
; RUN: -polly-allow-nonaffine -polly-allow-nonaffine-branches \
; RUN: -polly-allow-nonaffine-loops=true -analyze < %s \
; RUN: | FileCheck %s --check-prefix=PROFIT
;
; Here we have a non-affine loop but also a non-affine access which should
; be rejected as long as -polly-allow-nonaffine isn't given.

View File

@ -12,7 +12,8 @@
; RUN: -polly-allow-nonaffine-loops=true -polly-allow-nonaffine \
; RUN: -analyze < %s | FileCheck %s \
; RUN: --check-prefix=ALLOWNONAFFINELOOPSANDACCESSES
; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-branches \
; RUN: opt %loadPolly -polly-detect-unprofitable=false \
; RUN: -polly-detect -polly-allow-nonaffine-branches \
; RUN: -polly-allow-nonaffine-loops=true -polly-allow-nonaffine \
; RUN: -analyze < %s | FileCheck %s \
; RUN: --check-prefix=PROFIT

View File

@ -1,4 +1,5 @@
; RUN: opt %loadPolly -polly-detect -analyze < %s | FileCheck %s
; RUN: opt %loadPolly -polly-detect-unprofitable=false -polly-detect \
; RUN: -analyze < %s | FileCheck %s
;
; CHECK-NOT: Valid
;

View File

@ -1,5 +1,9 @@
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-detect -polly-allow-nonaffine-loops -analyze < %s | FileCheck %s
; RUN: opt %loadPolly -polly-detect -polly-allow-nonaffine-loops -analyze < %s | FileCheck %s --check-prefix=PROFIT
; RUN: opt %loadPolly -polly-detect-unprofitable \
; RUN: -polly-detect -polly-allow-nonaffine-loops -analyze \
; RUN: < %s | FileCheck %s
; RUN: opt %loadPolly -polly-detect-unprofitable=false \
; RUN: -polly-detect -polly-allow-nonaffine-loops -analyze \
; RUN: < %s | FileCheck %s --check-prefix=PROFIT
;
; void f(int *A) {
; for (int i = 0; i < 1024; i++) {

View File

@ -1,4 +1,4 @@
; RUN: opt %loadPolly -polly-detect -analyze \
; RUN: opt %loadPolly -polly-detect -polly-detect-unprofitable=false -analyze \
; RUN: -polly-allow-nonaffine-loops < %s | FileCheck %s
;
; RUN: opt %loadPolly -polly-detect -polly-detect-unprofitable -analyze \

View File

@ -1,6 +1,16 @@
; 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 -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 \
; RUN: -pass-remarks-missed="polly-detect" -polly-detect-track-failures \
; RUN: -polly-allow-nonaffine-loops=false -polly-detect -analyze \
; RUN: < %s 2>&1| FileCheck %s --check-prefix=REJECTNONAFFINELOOPS
; RUN: opt %loadPolly -polly-detect-unprofitable \
; RUN: -pass-remarks-missed="polly-detect" -polly-detect-track-failures \
; RUN: -polly-allow-nonaffine-loops=true -polly-detect -analyze \
; RUN: < %s 2>&1| FileCheck %s --check-prefix=ALLOWNONAFFINELOOPS
; RUN: opt %loadPolly -pass-remarks-missed="polly-detect" \
; RUN: -polly-detect-unprofitable=false \
; RUN: -polly-detect-track-failures -polly-allow-nonaffine-loops=true \
; RUN: -polly-allow-nonaffine -polly-detect -analyze < %s 2>&1 \
; RUN: | FileCheck %s --check-prefix=ALLOWNONAFFINEALL
; void f(int A[], int n) {
; for (int i = 0; i < A[n]; i++)

View File

@ -1,4 +1,6 @@
; 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" \
; RUN: -polly-detect-track-failures -polly-detect -analyze \
; RUN: -polly-detect-unprofitable=false < %s 2>&1| FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; void onlyWrite(float *A) {

View File

@ -1,5 +1,11 @@
; RUN: opt %loadPolly -basicaa -polly-detect-unprofitable -polly-scops -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s -check-prefix=SCALAR
; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s -check-prefix=PROFIT
; RUN: opt %loadPolly -basicaa -polly-detect-unprofitable -polly-scops \
; RUN: -polly-allow-nonaffine -polly-allow-nonaffine-branches \
; RUN: -polly-allow-nonaffine-loops=true -analyze < %s | FileCheck %s \
; RUN: -check-prefix=SCALAR
; RUN: opt %loadPolly -basicaa -polly-scops -polly-allow-nonaffine \
; RUN: -polly-detect-unprofitable=false \
; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true \
; RUN: -analyze < %s | FileCheck %s -check-prefix=PROFIT
;
; SCALAR: Function: f
; SCALAR: Region: %bb1---%bb13

View File

@ -1,10 +1,12 @@
; 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 -polly-detect-unprofitable \
; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine \
; RUN: -polly-detect-unprofitable \
; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true \
; RUN: -analyze < %s | FileCheck %s --check-prefix=ALL
; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine \
; RUN: -polly-detect-unprofitable=false \
; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops=true \
; RUN: -analyze < %s | FileCheck %s --check-prefix=PROFIT
;

View File

@ -1,5 +1,10 @@
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops -analyze < %s | FileCheck %s
; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops -analyze < %s | FileCheck %s --check-prefix=PROFIT
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops \
; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops \
; RUN: -analyze < %s | FileCheck %s
; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine-branches \
; RUN: -polly-detect-unprofitable=false \
; RUN: -polly-allow-nonaffine-loops -analyze < %s | FileCheck %s \
; RUN: --check-prefix=PROFIT
; RUN: opt %loadPolly -polly-scops -polly-detect-reductions \

View File

@ -1,5 +1,10 @@
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops -analyze < %s | FileCheck %s
; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops -analyze < %s | FileCheck %s --check-prefix=PROFIT
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-scops \
; RUN: -polly-allow-nonaffine -polly-allow-nonaffine-branches \
; RUN: -polly-allow-nonaffine-loops -analyze < %s | FileCheck %s
; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine \
; RUN: -polly-detect-unprofitable=false \
; RUN: -polly-allow-nonaffine-branches -polly-allow-nonaffine-loops \
; RUN: -analyze < %s | FileCheck %s --check-prefix=PROFIT
;
; Verify that we over approximate the read acces of A[j] in the last statement as j is
; computed in a non-affine loop we do not model.