[ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default.

Splitting basic blocks into multiple statements if there are now
additional scalar dependencies gives more freedom to the scheduler, but
more statements also means higher compile-time complexity. Switch to
finer statement granularity, the additional compile time should be
limited by the number of operations quota.

The regression tests are written for the -polly-stmt-granularity=bb
setting, therefore we add that flag to those tests that break with the
new default. Some of the tests only fail because the statements are
named differently due to a basic block resulting in multiple statements,
but which are removed during simplification of statements without
side-effects. Previous commits tried to reduce this effect, but it is
not completely avoidable.

Differential Revision: https://reviews.llvm.org/D42151

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@324169 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/ScopBuilder.cpp b/lib/Analysis/ScopBuilder.cpp
index ebb97d9..a04b4dd 100644
--- a/lib/Analysis/ScopBuilder.cpp
+++ b/lib/Analysis/ScopBuilder.cpp
@@ -116,7 +116,7 @@
                           "Scalar independence heuristic"),
                clEnumValN(GranularityChoice::Stores, "store",
                           "Store-level granularity")),
-    cl::init(GranularityChoice::BasicBlocks), cl::cat(PollyCategory));
+    cl::init(GranularityChoice::ScalarIndependence), cl::cat(PollyCategory));
 
 void ScopBuilder::buildPHIAccesses(ScopStmt *PHIStmt, PHINode *PHI,
                                    Region *NonAffineSubRegion,
diff --git a/test/DeLICM/map_memset_zero.ll b/test/DeLICM/map_memset_zero.ll
index c96eedb..c2ee0d4 100644
--- a/test/DeLICM/map_memset_zero.ll
+++ b/test/DeLICM/map_memset_zero.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze < %s | FileCheck -match-full-lines %s
 ;
 ; Check that PHI mapping works even in presence of a memset whose'
 ; zero value is used.
diff --git a/test/DeLICM/nomap_occupied.ll b/test/DeLICM/nomap_occupied.ll
index 52e177b..e5d9396 100644
--- a/test/DeLICM/nomap_occupied.ll
+++ b/test/DeLICM/nomap_occupied.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze < %s | FileCheck %s
 ;
 ;    void func(double *A) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reduction.ll b/test/DeLICM/reduction.ll
index c8b5504..c33bf28 100644
--- a/test/DeLICM/reduction.ll
+++ b/test/DeLICM/reduction.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm-partial-writes=true -polly-delicm -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm-partial-writes=true -polly-delicm -analyze < %s | FileCheck -match-full-lines %s
 ;
 ;    void func(double *A) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reduction_looprotate_gvnpre.ll b/test/DeLICM/reduction_looprotate_gvnpre.ll
index 0ad3e3c..0fd4447 100644
--- a/test/DeLICM/reduction_looprotate_gvnpre.ll
+++ b/test/DeLICM/reduction_looprotate_gvnpre.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm-partial-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck -check-prefix=PARTIAL %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm-partial-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck -check-prefix=PARTIAL %s
 ;
 ;    void func(double *A) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reduction_looprotate_gvnpre_cond1.ll b/test/DeLICM/reduction_looprotate_gvnpre_cond1.ll
index 65fb4a9..1c1f17d 100644
--- a/test/DeLICM/reduction_looprotate_gvnpre_cond1.ll
+++ b/test/DeLICM/reduction_looprotate_gvnpre_cond1.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Load (but not store) of A[j] hoisted, reduction only over some iterations.
 ;
diff --git a/test/DeLICM/reduction_looprotate_gvnpre_cond2.ll b/test/DeLICM/reduction_looprotate_gvnpre_cond2.ll
index 4f3def1..ae01565 100644
--- a/test/DeLICM/reduction_looprotate_gvnpre_cond2.ll
+++ b/test/DeLICM/reduction_looprotate_gvnpre_cond2.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Load (but not store) of A[j] hoisted, reduction not written in all iterations.
 ; FIXME: %join is not mapped because the MemoryKind::Value mapping does not
diff --git a/test/DeLICM/reduction_looprotate_gvnpre_nopreheader.ll b/test/DeLICM/reduction_looprotate_gvnpre_nopreheader.ll
index fdc6c4c..d864180 100644
--- a/test/DeLICM/reduction_looprotate_gvnpre_nopreheader.ll
+++ b/test/DeLICM/reduction_looprotate_gvnpre_nopreheader.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Hosted reduction load (but not the store) without preheader.
 ;
diff --git a/test/DeLICM/reduction_looprotate_hoisted.ll b/test/DeLICM/reduction_looprotate_hoisted.ll
index 750ff7d..3a96ff6 100644
--- a/test/DeLICM/reduction_looprotate_hoisted.ll
+++ b/test/DeLICM/reduction_looprotate_hoisted.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-invariant-load-hoisting -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-invariant-load-hoisting -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
 ;
 ;    void func(int *A, int* StartPtr) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reduction_looprotate_licm.ll b/test/DeLICM/reduction_looprotate_licm.ll
index dd73c5e..8cf033a 100644
--- a/test/DeLICM/reduction_looprotate_licm.ll
+++ b/test/DeLICM/reduction_looprotate_licm.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
 ;
 ;    void func(double *A) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reduction_looprotate_licm2.ll b/test/DeLICM/reduction_looprotate_licm2.ll
index 1c909aa..6bd4b97 100644
--- a/test/DeLICM/reduction_looprotate_licm2.ll
+++ b/test/DeLICM/reduction_looprotate_licm2.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm -analyze < %s | FileCheck %s
 ;
 ; Use %phi instead of the normal %add; that is, the last last iteration will
 ; be ignored such the %phi cannot be written to A[3] in %body.
diff --git a/test/DeLICM/reduction_looprotate_licm_double_write.ll b/test/DeLICM/reduction_looprotate_licm_double_write.ll
index 3fedca0..1923751 100644
--- a/test/DeLICM/reduction_looprotate_licm_double_write.ll
+++ b/test/DeLICM/reduction_looprotate_licm_double_write.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-flatten-schedule \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule \
 ; RUN: -polly-delicm-overapproximate-writes=true \
 ; RUN: -polly-delicm-compute-known=true -polly-delicm \
 ; RUN: -analyze < %s | FileCheck %s
diff --git a/test/DeLICM/reduction_looprotate_licm_nopreheader.ll b/test/DeLICM/reduction_looprotate_licm_nopreheader.ll
index 53b179a..377ee4f 100644
--- a/test/DeLICM/reduction_looprotate_licm_nopreheader.ll
+++ b/test/DeLICM/reduction_looprotate_licm_nopreheader.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze < %s | FileCheck %s
 ;
 ; Register-promoted reduction but without preheader.
 ;
diff --git a/test/DeLICM/reduction_looprotate_load.ll b/test/DeLICM/reduction_looprotate_load.ll
index 1e9c8ef..644b7cf 100644
--- a/test/DeLICM/reduction_looprotate_load.ll
+++ b/test/DeLICM/reduction_looprotate_load.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
 ;
 ;    void func(int *A, double* StartPtr) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reduction_looprotate_loopguard_gvnpre.ll b/test/DeLICM/reduction_looprotate_loopguard_gvnpre.ll
index 0c27af5..352587c 100644
--- a/test/DeLICM/reduction_looprotate_loopguard_gvnpre.ll
+++ b/test/DeLICM/reduction_looprotate_loopguard_gvnpre.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Reduction over parametric number of elements and a loopguard if the
 ; reduction loop is not executed at all. Load hoisted before loop.
diff --git a/test/DeLICM/reduction_looprotate_loopguard_licm1.ll b/test/DeLICM/reduction_looprotate_loopguard_licm1.ll
index 4f441e4..c21a053 100644
--- a/test/DeLICM/reduction_looprotate_loopguard_licm1.ll
+++ b/test/DeLICM/reduction_looprotate_loopguard_licm1.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Reduction over parametric number of elements and a loopguard if the
 ; reduction loop is not executed at all.
diff --git a/test/DeLICM/reduction_looprotate_loopguard_licm2.ll b/test/DeLICM/reduction_looprotate_loopguard_licm2.ll
index 672593c..8986849 100644
--- a/test/DeLICM/reduction_looprotate_loopguard_licm2.ll
+++ b/test/DeLICM/reduction_looprotate_loopguard_licm2.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Reduction over parametric number of elements and a loopguard if the
 ; reduction loop is not executed at all, such that A[j] is also not written to.
diff --git a/test/DeLICM/reduction_looprotate_loopguard_licm3.ll b/test/DeLICM/reduction_looprotate_loopguard_licm3.ll
index 61c34a6..b622500 100644
--- a/test/DeLICM/reduction_looprotate_loopguard_licm3.ll
+++ b/test/DeLICM/reduction_looprotate_loopguard_licm3.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Reduction over parametric number of elements and a loopguard if the
 ; reduction loop is not executed at all, such that A[j] is also not accessed.
diff --git a/test/DeLICM/reduction_looprotate_readonly.ll b/test/DeLICM/reduction_looprotate_readonly.ll
index f7751fa..2121665 100644
--- a/test/DeLICM/reduction_looprotate_readonly.ll
+++ b/test/DeLICM/reduction_looprotate_readonly.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
 ;
 ;    void func(double *A, double Start) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reduction_looprotate_synthesizable.ll b/test/DeLICM/reduction_looprotate_synthesizable.ll
index 445164c..f673bd9 100644
--- a/test/DeLICM/reduction_looprotate_synthesizable.ll
+++ b/test/DeLICM/reduction_looprotate_synthesizable.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
 ;
 ;    void func(int *A) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reduction_looprotate_undef.ll b/test/DeLICM/reduction_looprotate_undef.ll
index 343eb21..0cd9db4 100644
--- a/test/DeLICM/reduction_looprotate_undef.ll
+++ b/test/DeLICM/reduction_looprotate_undef.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm-overapproximate-writes=true -polly-delicm-compute-known=true -polly-delicm -analyze < %s | FileCheck %s
 ;
 ;    void func(int *A) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reduction_overapproximate.ll b/test/DeLICM/reduction_overapproximate.ll
index 8e20e29..7ca0567 100644
--- a/test/DeLICM/reduction_overapproximate.ll
+++ b/test/DeLICM/reduction_overapproximate.ll
@@ -1,6 +1,6 @@
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm-compute-known=true -polly-delicm-overapproximate-writes=true -polly-delicm-partial-writes=false -polly-delicm -analyze < %s | FileCheck %s --check-prefix=APPROX
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm-compute-known=true -polly-delicm-overapproximate-writes=false -polly-delicm-partial-writes=false  -polly-delicm -analyze < %s | FileCheck %s --check-prefix=EXACT
-; RUN: opt %loadPolly -polly-flatten-schedule -polly-delicm-compute-known=true -polly-delicm-partial-writes=true -polly-delicm -analyze < %s | FileCheck %s --check-prefix=PARTIAL
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm-compute-known=true -polly-delicm-overapproximate-writes=true -polly-delicm-partial-writes=false -polly-delicm -analyze < %s | FileCheck %s --check-prefix=APPROX
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm-compute-known=true -polly-delicm-overapproximate-writes=false -polly-delicm-partial-writes=false  -polly-delicm -analyze < %s | FileCheck %s --check-prefix=EXACT
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-flatten-schedule -polly-delicm-compute-known=true -polly-delicm-partial-writes=true -polly-delicm -analyze < %s | FileCheck %s --check-prefix=PARTIAL
 ;
 ;    void func(double *A {
 ;      for (int j = -1; j < 3; j += 1) { /* outer */
diff --git a/test/DeLICM/reduction_unrelatedunusual.ll b/test/DeLICM/reduction_unrelatedunusual.ll
index 49e22fc..1701b11 100644
--- a/test/DeLICM/reduction_unrelatedunusual.ll
+++ b/test/DeLICM/reduction_unrelatedunusual.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm-partial-writes=true -polly-delicm -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm-partial-writes=true -polly-delicm -analyze < %s | FileCheck -match-full-lines %s
 ;
 ; Map %add and %phi to A[j].
 ; The non-analyzable store to C[0] is unrelated and can be ignored.
diff --git a/test/DeLICM/reject_loadafterstore.ll b/test/DeLICM/reject_loadafterstore.ll
index 9f1a05d..4b40319 100644
--- a/test/DeLICM/reject_loadafterstore.ll
+++ b/test/DeLICM/reject_loadafterstore.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze -pass-remarks-missed=polly-delicm < %s 2>&1 | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze -pass-remarks-missed=polly-delicm < %s 2>&1 | FileCheck %s
 ;
 ;    void func(double *A) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reject_storeafterstore.ll b/test/DeLICM/reject_storeafterstore.ll
index f3f8955..797cf5d 100644
--- a/test/DeLICM/reject_storeafterstore.ll
+++ b/test/DeLICM/reject_storeafterstore.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-delicm -analyze -pass-remarks-missed=polly-delicm < %s 2>&1 | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze -pass-remarks-missed=polly-delicm < %s 2>&1 | FileCheck %s
 ;
 ;    void func(double *A) {
 ;      for (int j = 0; j < 2; j += 1) { /* outer */
diff --git a/test/DeLICM/reject_unusualstore.ll b/test/DeLICM/reject_unusualstore.ll
index cdbfcc1..49b3791 100644
--- a/test/DeLICM/reject_unusualstore.ll
+++ b/test/DeLICM/reject_unusualstore.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-delicm -analyze< %s | FileCheck %s
-; RUN: opt %loadPolly -polly-delicm -disable-output -stats < %s 2>&1 | FileCheck %s --check-prefix=STATS
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -analyze< %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-delicm -disable-output -stats < %s 2>&1 | FileCheck %s --check-prefix=STATS
 ; REQUIRES: asserts
 ;
 ;    void func(double *A) {
diff --git a/test/DependenceInfo/fine_grain_dep_0.ll b/test/DependenceInfo/fine_grain_dep_0.ll
index 0679c25..d85f232 100644
--- a/test/DependenceInfo/fine_grain_dep_0.ll
+++ b/test/DependenceInfo/fine_grain_dep_0.ll
@@ -1,6 +1,6 @@
-; RUN: opt %loadPolly -polly-dependences -polly-dependences-analysis-type=value-based -polly-dependences-analysis-level=reference-wise -analyze < %s | FileCheck %s --check-prefix=REF
-; RUN: opt %loadPolly -polly-dependences -polly-dependences-analysis-type=value-based -polly-dependences-analysis-level=access-wise -analyze < %s | FileCheck %s --check-prefix=ACC
-; RUN: opt %loadPolly -polly-function-dependences -polly-dependences-analysis-type=value-based -polly-dependences-analysis-level=access-wise -analyze < %s | FileCheck %s --check-prefix=ACC
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-dependences -polly-dependences-analysis-type=value-based -polly-dependences-analysis-level=reference-wise -analyze < %s | FileCheck %s --check-prefix=REF
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-dependences -polly-dependences-analysis-type=value-based -polly-dependences-analysis-level=access-wise -analyze < %s | FileCheck %s --check-prefix=ACC
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-function-dependences -polly-dependences-analysis-type=value-based -polly-dependences-analysis-level=access-wise -analyze < %s | FileCheck %s --check-prefix=ACC
 ;
 ; REF:      RAW dependences:
 ; REF-NEXT:     [N] -> { Stmt_for_body[i0] -> Stmt_for_body[6 + i0] : 0 <= i0 <= -13 + N; Stmt_for_body[i0] -> Stmt_for_body[4 + i0] : 0 <= i0 <= -11 + N; [Stmt_for_body[i0] -> MemRef_a[]] -> [Stmt_for_body[4 + i0] -> MemRef_a[]] : 0 <= i0 <= -11 + N; [Stmt_for_body[i0] -> MemRef_b[]] -> [Stmt_for_body[6 + i0] -> MemRef_b[]] : 0 <= i0 <= -13 + N }
diff --git a/test/DependenceInfo/reduction_dependences_equal_non_reduction_dependences.ll b/test/DependenceInfo/reduction_dependences_equal_non_reduction_dependences.ll
index 1353616..36d06f6 100644
--- a/test/DependenceInfo/reduction_dependences_equal_non_reduction_dependences.ll
+++ b/test/DependenceInfo/reduction_dependences_equal_non_reduction_dependences.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -basicaa -polly-dependences -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -basicaa -polly-stmt-granularity=bb -polly-dependences -analyze < %s | FileCheck %s
 ;
 ; This loopnest contains a reduction which imposes the same dependences as the
 ; accesses to the array A. We need to ensure we keep the dependences of A.
diff --git a/test/DependenceInfo/reduction_two_reductions_different_rloops.ll b/test/DependenceInfo/reduction_two_reductions_different_rloops.ll
index 1404d15..c5e6b91 100644
--- a/test/DependenceInfo/reduction_two_reductions_different_rloops.ll
+++ b/test/DependenceInfo/reduction_two_reductions_different_rloops.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -basicaa -polly-dependences -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -basicaa -polly-stmt-granularity=bb -polly-dependences -analyze < %s | FileCheck %s
 ;
 ; CHECK:      RAW dependences:
 ; CHECK-NEXT:     {  }
diff --git a/test/ForwardOpTree/atax.ll b/test/ForwardOpTree/atax.ll
index 12b2b20..7b3fb56 100644
--- a/test/ForwardOpTree/atax.ll
+++ b/test/ForwardOpTree/atax.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-optree-normalize-phi=true -polly-optree -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-optree-normalize-phi=true -polly-optree -analyze < %s | FileCheck %s -match-full-lines
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
diff --git a/test/ForwardOpTree/forward_load_differentarray.ll b/test/ForwardOpTree/forward_load_differentarray.ll
index 9663cc7..0b29959 100644
--- a/test/ForwardOpTree/forward_load_differentarray.ll
+++ b/test/ForwardOpTree/forward_load_differentarray.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-optree -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-optree -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; To forward %val, B[j] cannot be reused in bodyC because it is overwritten
 ; between. Verify that instead the alternative C[j] is used.
diff --git a/test/ForwardOpTree/forward_load_double_write.ll b/test/ForwardOpTree/forward_load_double_write.ll
index 5b988e1..7ddfb34 100644
--- a/test/ForwardOpTree/forward_load_double_write.ll
+++ b/test/ForwardOpTree/forward_load_double_write.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-optree -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-optree -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Rematerialize a load even in case two writes of identical values are in
 ; one scop statement.
diff --git a/test/ForwardOpTree/forward_load_fromloop.ll b/test/ForwardOpTree/forward_load_fromloop.ll
index eb650a7..dd60751 100644
--- a/test/ForwardOpTree/forward_load_fromloop.ll
+++ b/test/ForwardOpTree/forward_load_fromloop.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-optree -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-optree -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Forward a the LoadInst %val into %bodyB. %val is executed multiple times,
 ; we must get the last loaded values.
diff --git a/test/ForwardOpTree/forward_load_tripleuse.ll b/test/ForwardOpTree/forward_load_tripleuse.ll
index 504bac3..ed2f4d3 100644
--- a/test/ForwardOpTree/forward_load_tripleuse.ll
+++ b/test/ForwardOpTree/forward_load_tripleuse.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-optree -polly-codegen -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-optree -polly-codegen -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; %val1 is used three times: Twice by its own operand tree of %val2 and once
 ; more by the store in %bodyB.
diff --git a/test/ForwardOpTree/jacobi-1d.ll b/test/ForwardOpTree/jacobi-1d.ll
index 0825ea0..a7ecb2b 100644
--- a/test/ForwardOpTree/jacobi-1d.ll
+++ b/test/ForwardOpTree/jacobi-1d.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-optree-normalize-phi=true -polly-optree -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-optree-normalize-phi=true -polly-optree -analyze < %s | FileCheck %s -match-full-lines
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
diff --git a/test/Isl/Ast/dependence_distance_multiple_constant.ll b/test/Isl/Ast/dependence_distance_multiple_constant.ll
index fdb1902..b7b5c25 100644
--- a/test/Isl/Ast/dependence_distance_multiple_constant.ll
+++ b/test/Isl/Ast/dependence_distance_multiple_constant.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -basicaa -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polyhedral-info -polly-check-parallel -analyze < %s | FileCheck %s -check-prefix=PINFO
+; RUN: opt %loadPolly -basicaa -polly-stmt-granularity=bb -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polyhedral-info -polly-check-parallel -analyze < %s | FileCheck %s -check-prefix=PINFO
 ;
 ;        void f(int *restrict A, int *restrict B, int N) {
 ; CHECK:   #pragma minimal dependence distance: 5
diff --git a/test/Isl/Ast/dependence_distance_varying_multiple.ll b/test/Isl/Ast/dependence_distance_varying_multiple.ll
index 3bad27c..fff6ec4 100644
--- a/test/Isl/Ast/dependence_distance_varying_multiple.ll
+++ b/test/Isl/Ast/dependence_distance_varying_multiple.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -basicaa -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polyhedral-info -polly-check-parallel -analyze < %s | FileCheck %s -check-prefix=PINFO
+; RUN: opt %loadPolly -basicaa -polly-stmt-granularity=bb -polly-ast -polly-ast-detect-parallel -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polyhedral-info -polly-check-parallel -analyze < %s | FileCheck %s -check-prefix=PINFO
 ;
 ;        void f(int *restrict A, int *restrict B, int *restrict C, int *restrict D,
 ;               int *restrict E, int N) {
diff --git a/test/Isl/CodeGen/MemAccess/create_arrays_heap.ll b/test/Isl/CodeGen/MemAccess/create_arrays_heap.ll
index ca49829..8395230 100644
--- a/test/Isl/CodeGen/MemAccess/create_arrays_heap.ll
+++ b/test/Isl/CodeGen/MemAccess/create_arrays_heap.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-scops -analyze -polly-import-jscop -polly-import-jscop-postfix=transformed < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s --check-prefix=CODEGEN
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -polly-import-jscop -polly-import-jscop-postfix=transformed < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s --check-prefix=CODEGEN
 ;
 ; #define Ni 1056
 ; #define Nj 1056
diff --git a/test/Isl/CodeGen/MemAccess/map_scalar_access.ll b/test/Isl/CodeGen/MemAccess/map_scalar_access.ll
index 04c1fbb..06d91e3 100644
--- a/test/Isl/CodeGen/MemAccess/map_scalar_access.ll
+++ b/test/Isl/CodeGen/MemAccess/map_scalar_access.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-import-jscop-postfix=transformed -polly-import-jscop -analyze          < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-import-jscop-postfix=transformed -polly-import-jscop -polly-codegen -S < %s | FileCheck %s --check-prefix=CODEGEN
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop-postfix=transformed -polly-import-jscop -analyze          < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop-postfix=transformed -polly-import-jscop -polly-codegen -S < %s | FileCheck %s --check-prefix=CODEGEN
 
 define void @map_scalar_access(double* noalias nonnull %A) {
 entry:
diff --git a/test/Isl/CodeGen/MemAccess/multiple_types.ll b/test/Isl/CodeGen/MemAccess/multiple_types.ll
index d958df6..c68bbdc 100644
--- a/test/Isl/CodeGen/MemAccess/multiple_types.ll
+++ b/test/Isl/CodeGen/MemAccess/multiple_types.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop \
 ; RUN: -polly-allow-differing-element-types \
 ; RUN:   -polly-codegen -S    < %s | FileCheck %s
 ;
diff --git a/test/Isl/CodeGen/OpenMP/mapped-phi-access.ll b/test/Isl/CodeGen/OpenMP/mapped-phi-access.ll
index 5968840..6d93257 100644
--- a/test/Isl/CodeGen/OpenMP/mapped-phi-access.ll
+++ b/test/Isl/CodeGen/OpenMP/mapped-phi-access.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-parallel -polly-delicm -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-parallel -polly-delicm -polly-codegen -S < %s | FileCheck %s
 ;
 ; Verify that -polly-parallel can handle mapped scalar MemoryAccesses.
 ;
diff --git a/test/Isl/CodeGen/OpenMP/recomputed-srem.ll b/test/Isl/CodeGen/OpenMP/recomputed-srem.ll
index c05830c..1f38711 100644
--- a/test/Isl/CodeGen/OpenMP/recomputed-srem.ll
+++ b/test/Isl/CodeGen/OpenMP/recomputed-srem.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-codegen -polly-parallel \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-codegen -polly-parallel \
 ; RUN: -polly-parallel-force -S < %s | FileCheck %s
 ;
 ; Test to verify that we pass %rem96 to the parallel subfunction.
diff --git a/test/Isl/CodeGen/partial_write_impossible_restriction.ll b/test/Isl/CodeGen/partial_write_impossible_restriction.ll
index 2819b31..c8aac54 100644
--- a/test/Isl/CodeGen/partial_write_impossible_restriction.ll
+++ b/test/Isl/CodeGen/partial_write_impossible_restriction.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
 ;
 ; The isl scheduler isolates %cond.false into two instances.
 ; A partial write access in one of the instances was never executed,
diff --git a/test/Isl/CodeGen/partial_write_mapped_scalar.ll b/test/Isl/CodeGen/partial_write_mapped_scalar.ll
index 53b17b2..c343f15 100644
--- a/test/Isl/CodeGen/partial_write_mapped_scalar.ll
+++ b/test/Isl/CodeGen/partial_write_mapped_scalar.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
 ;
 ; Partial write of a (mapped) scalar.
 ;
diff --git a/test/Isl/CodeGen/partial_write_mapped_vector.ll b/test/Isl/CodeGen/partial_write_mapped_vector.ll
index cfb21ca..c97951b 100644
--- a/test/Isl/CodeGen/partial_write_mapped_vector.ll
+++ b/test/Isl/CodeGen/partial_write_mapped_vector.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -basicaa -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-vectorizer=polly -polly-opt-isl -polly-ast -polly-codegen -S < %s | FileCheck %s
+; RUN: opt %loadPolly -basicaa -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-vectorizer=polly -polly-opt-isl -polly-ast -polly-codegen -S < %s | FileCheck %s
 ;
 ; Polly's vectorizer does not support partial accesses.
 ;
diff --git a/test/Isl/CodeGen/unpredictable-loop-unsynthesizable.ll b/test/Isl/CodeGen/unpredictable-loop-unsynthesizable.ll
index 5d5aa01..52505a0 100644
--- a/test/Isl/CodeGen/unpredictable-loop-unsynthesizable.ll
+++ b/test/Isl/CodeGen/unpredictable-loop-unsynthesizable.ll
@@ -1,6 +1,6 @@
-; RUN: opt %loadPolly -polly-scops -analyze \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze \
 ; RUN: -polly-invariant-load-hoisting=true < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-codegen -analyze \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-codegen -analyze \
 ; RUN: -polly-invariant-load-hoisting=true < %s
 
 ; The loop for.body is a scop with invariant load hoisting, but does not
diff --git a/test/JSONExporter/ImportArrays/ImportArrays-Negative-size.ll b/test/JSONExporter/ImportArrays/ImportArrays-Negative-size.ll
index 16e5071..3e8e67f 100644
--- a/test/JSONExporter/ImportArrays/ImportArrays-Negative-size.ll
+++ b/test/JSONExporter/ImportArrays/ImportArrays-Negative-size.ll
@@ -1,4 +1,4 @@
-; RUN: not opt %loadPolly -polly-scops -analyze -polly-import-jscop -polly-import-jscop-postfix=transformed < %s 2>&1 | FileCheck %s
+; RUN: not opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -polly-import-jscop -polly-import-jscop-postfix=transformed < %s 2>&1 | FileCheck %s
 ;
 ; #define Ni 1056
 ; #define Nj 1056
diff --git a/test/MaximalStaticExpansion/load_after_store_same_statement.ll b/test/MaximalStaticExpansion/load_after_store_same_statement.ll
index cad2475..5141c4a 100644
--- a/test/MaximalStaticExpansion/load_after_store_same_statement.ll
+++ b/test/MaximalStaticExpansion/load_after_store_same_statement.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-mse -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-mse -pass-remarks-analysis="polly-mse" -analyze < %s 2>&1| FileCheck %s --check-prefix=MSE
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-mse -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-mse -pass-remarks-analysis="polly-mse" -analyze < %s 2>&1| FileCheck %s --check-prefix=MSE
 ;
 ; Verify that the expansion of an array with load after store in a same statement is not done.
 ;
diff --git a/test/MaximalStaticExpansion/working_expansion_multiple_dependences_per_statement.ll b/test/MaximalStaticExpansion/working_expansion_multiple_dependences_per_statement.ll
index ad86962..e4c9f68 100644
--- a/test/MaximalStaticExpansion/working_expansion_multiple_dependences_per_statement.ll
+++ b/test/MaximalStaticExpansion/working_expansion_multiple_dependences_per_statement.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-mse -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-mse -analyze < %s | FileCheck %s
 ;
 ; Verify that the accesses are correctly expanded
 ;
diff --git a/test/MaximalStaticExpansion/working_expansion_multiple_instruction_per_statement.ll b/test/MaximalStaticExpansion/working_expansion_multiple_instruction_per_statement.ll
index 6416d16..3872a40 100644
--- a/test/MaximalStaticExpansion/working_expansion_multiple_instruction_per_statement.ll
+++ b/test/MaximalStaticExpansion/working_expansion_multiple_instruction_per_statement.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-mse -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-mse -analyze < %s | FileCheck %s
 ;
 ; Verify that the accesses are correctly expanded 
 ;
diff --git a/test/MaximalStaticExpansion/working_phi_two_scalars.ll b/test/MaximalStaticExpansion/working_phi_two_scalars.ll
index 0e02ea0..c4d8983 100644
--- a/test/MaximalStaticExpansion/working_phi_two_scalars.ll
+++ b/test/MaximalStaticExpansion/working_phi_two_scalars.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-mse -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-mse -pass-remarks-analysis="polly-mse" -analyze < %s 2>&1 | FileCheck %s --check-prefix=MSE
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-mse -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-mse -pass-remarks-analysis="polly-mse" -analyze < %s 2>&1 | FileCheck %s --check-prefix=MSE
 ;
 ; Verify that the accesses are correctly expanded for MemoryKind::PHI
 ; tmp_05 and tmp2_06 are not expanded because they need copy-in.
diff --git a/test/PruneUnprofitable/prune_only_scalardeps.ll b/test/PruneUnprofitable/prune_only_scalardeps.ll
index b42292e..e817dcf 100644
--- a/test/PruneUnprofitable/prune_only_scalardeps.ll
+++ b/test/PruneUnprofitable/prune_only_scalardeps.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -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 -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,
diff --git a/test/ScopInfo/branch-references-loop-scev-with-unknown-iterations-3.ll b/test/ScopInfo/branch-references-loop-scev-with-unknown-iterations-3.ll
index 604bb4a..2de7409 100644
--- a/test/ScopInfo/branch-references-loop-scev-with-unknown-iterations-3.ll
+++ b/test/ScopInfo/branch-references-loop-scev-with-unknown-iterations-3.ll
@@ -1,6 +1,6 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | \
 ; RUN:     FileCheck %s -check-prefix=NONAFFINE
-; RUN: opt %loadPolly -polly-scops -analyze \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze \
 ; RUN:     -polly-allow-nonaffine-branches=false < %s | \
 ; RUN:     FileCheck %s -check-prefix=NO-NONEAFFINE
 
diff --git a/test/ScopInfo/condition-after-error-block-2.ll b/test/ScopInfo/condition-after-error-block-2.ll
index 4d8e176..d9bbf14 100644
--- a/test/ScopInfo/condition-after-error-block-2.ll
+++ b/test/ScopInfo/condition-after-error-block-2.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 
 ; Verify that we do not allow PHI nodes such as %phi, if they reference an error
 ; block and are used by anything else than a terminator instruction.
diff --git a/test/ScopInfo/condtion-after-error-block.ll b/test/ScopInfo/condtion-after-error-block.ll
index 5fa3c1e..cee3d05 100644
--- a/test/ScopInfo/condtion-after-error-block.ll
+++ b/test/ScopInfo/condtion-after-error-block.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 
 ; Verify that we allow scops containing uniform branch conditions, where all
 ; but one incoming block comes from an error condition.
diff --git a/test/ScopInfo/const_srem_sdiv.ll b/test/ScopInfo/const_srem_sdiv.ll
index 3c50cb8..4cd4fac 100644
--- a/test/ScopInfo/const_srem_sdiv.ll
+++ b/test/ScopInfo/const_srem_sdiv.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze \
 ; RUN: -polly-invariant-load-hoisting=true < %s | FileCheck %s
 ;
 ; See http://research.microsoft.com/pubs/151917/divmodnote-letter.pdf
diff --git a/test/ScopInfo/constant_functions_multi_dim.ll b/test/ScopInfo/constant_functions_multi_dim.ll
index 726e19f..8483e64 100644
--- a/test/ScopInfo/constant_functions_multi_dim.ll
+++ b/test/ScopInfo/constant_functions_multi_dim.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze \
 ; RUN:                -polly-detect-full-functions < %s | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
diff --git a/test/ScopInfo/delinearize-together-all-data-refs.ll b/test/ScopInfo/delinearize-together-all-data-refs.ll
index 484a7de..5e8f433 100644
--- a/test/ScopInfo/delinearize-together-all-data-refs.ll
+++ b/test/ScopInfo/delinearize-together-all-data-refs.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 
 ; void foo(long n, long m, long o, double A[n][m][o]) {
 ;   for (long i = 0; i < n-3; i++)
diff --git a/test/ScopInfo/escaping_empty_scop.ll b/test/ScopInfo/escaping_empty_scop.ll
index 048bf97..212d5e7 100644
--- a/test/ScopInfo/escaping_empty_scop.ll
+++ b/test/ScopInfo/escaping_empty_scop.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 ;
 ;    void g();
 ;    int f(int *A) {
diff --git a/test/ScopInfo/exit-phi-1.ll b/test/ScopInfo/exit-phi-1.ll
index 920bc68..ede2654 100644
--- a/test/ScopInfo/exit-phi-1.ll
+++ b/test/ScopInfo/exit-phi-1.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s --check-prefix=CODEGEN
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-codegen -S < %s | FileCheck %s --check-prefix=CODEGEN
 ;
 ; Check for correct code generation of exit PHIs, even if the same PHI value
 ; is used again inside the the SCoP.
diff --git a/test/ScopInfo/exit-phi-2.ll b/test/ScopInfo/exit-phi-2.ll
index 4007ddc..53e11dc 100644
--- a/test/ScopInfo/exit-phi-2.ll
+++ b/test/ScopInfo/exit-phi-2.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 ;
 ; Check that there is no MK_ExitPHI READ access.
 ;
diff --git a/test/ScopInfo/exit_phi_accesses-2.ll b/test/ScopInfo/exit_phi_accesses-2.ll
index 483cd70..b8c02e0 100644
--- a/test/ScopInfo/exit_phi_accesses-2.ll
+++ b/test/ScopInfo/exit_phi_accesses-2.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -analyze -polly-scops %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -analyze -polly-scops %s | FileCheck %s
 
 ; CHECK-LABEL: Function: foo
 ;
diff --git a/test/ScopInfo/invariant_load_complex_condition.ll b/test/ScopInfo/invariant_load_complex_condition.ll
index f545656..666b85d 100644
--- a/test/ScopInfo/invariant_load_complex_condition.ll
+++ b/test/ScopInfo/invariant_load_complex_condition.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -S -polly-scops -analyze \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -S -polly-scops -analyze \
 ; RUN: -polly-invariant-load-hoisting=true < %s | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
diff --git a/test/ScopInfo/loop_carry.ll b/test/ScopInfo/loop_carry.ll
index ea24010..15e092d 100644
--- a/test/ScopInfo/loop_carry.ll
+++ b/test/ScopInfo/loop_carry.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -basicaa -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -basicaa -polly-stmt-granularity=bb -polly-scops -analyze < %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"
 
diff --git a/test/ScopInfo/many-scalar-dependences.ll b/test/ScopInfo/many-scalar-dependences.ll
index 92d409c..34e0d71 100644
--- a/test/ScopInfo/many-scalar-dependences.ll
+++ b/test/ScopInfo/many-scalar-dependences.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 ;
 ;    void f(float a[100][100]) {
 ;      float x;
diff --git a/test/ScopInfo/mod_ref_access_pointee_arguments.ll b/test/ScopInfo/mod_ref_access_pointee_arguments.ll
index 927c4e5..3422e82 100644
--- a/test/ScopInfo/mod_ref_access_pointee_arguments.ll
+++ b/test/ScopInfo/mod_ref_access_pointee_arguments.ll
@@ -1,6 +1,6 @@
-; RUN: opt %loadPolly -basicaa -polly-scops -analyze -polly-allow-modref-calls \
+; RUN: opt %loadPolly -basicaa -polly-stmt-granularity=bb -polly-scops -analyze -polly-allow-modref-calls \
 ; RUN:  < %s | FileCheck %s
-; RUN: opt %loadPolly -basicaa -polly-codegen -polly-allow-modref-calls \
+; RUN: opt %loadPolly -basicaa -polly-stmt-granularity=bb -polly-codegen -polly-allow-modref-calls \
 ; RUN: -disable-output < %s
 ;
 ; Verify that we model the may-write access of the prefetch intrinsic
diff --git a/test/ScopInfo/mod_ref_read_pointee_arguments.ll b/test/ScopInfo/mod_ref_read_pointee_arguments.ll
index c153846..bc5e063 100644
--- a/test/ScopInfo/mod_ref_read_pointee_arguments.ll
+++ b/test/ScopInfo/mod_ref_read_pointee_arguments.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -basicaa -polly-scops -analyze -polly-allow-modref-calls \
+; RUN: opt %loadPolly -basicaa -polly-stmt-granularity=bb -polly-scops -analyze -polly-allow-modref-calls \
 ; RUN: < %s | FileCheck %s
 ; RUN: opt %loadPolly -basicaa -polly-codegen -disable-output \
 ; RUN: -polly-allow-modref-calls < %s
diff --git a/test/ScopInfo/multidim_2d_with_modref_call.ll b/test/ScopInfo/multidim_2d_with_modref_call.ll
index 74cd009..6db6e9e 100644
--- a/test/ScopInfo/multidim_2d_with_modref_call.ll
+++ b/test/ScopInfo/multidim_2d_with_modref_call.ll
@@ -1,7 +1,7 @@
-; RUN: opt %loadPolly -polly-scops -analyze -polly-allow-modref-calls \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -polly-allow-modref-calls \
 ; RUN: -polly-invariant-load-hoisting=true \
 ; RUN: < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine -analyze \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -polly-allow-nonaffine -analyze \
 ; RUN: -polly-invariant-load-hoisting=true \
 ; RUN: -polly-allow-modref-calls < %s | FileCheck %s --check-prefix=NONAFFINE
 
diff --git a/test/ScopInfo/multidim_2d_with_modref_call_2.ll b/test/ScopInfo/multidim_2d_with_modref_call_2.ll
index 1598d8e..f9f64a5 100644
--- a/test/ScopInfo/multidim_2d_with_modref_call_2.ll
+++ b/test/ScopInfo/multidim_2d_with_modref_call_2.ll
@@ -1,7 +1,7 @@
-; RUN: opt %loadPolly -polly-scops -analyze -polly-allow-modref-calls \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -polly-allow-modref-calls \
 ; RUN: -polly-invariant-load-hoisting=true \
 ; RUN: < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -polly-allow-nonaffine \
 ; RUN: -polly-invariant-load-hoisting=true \
 ; RUN: -polly-allow-modref-calls -analyze < %s | FileCheck %s --check-prefix=NONAFFINE
 
diff --git a/test/ScopInfo/multidim_fixedsize_multi_offset.ll b/test/ScopInfo/multidim_fixedsize_multi_offset.ll
index 8cf2e8d..e2d982c 100644
--- a/test/ScopInfo/multidim_fixedsize_multi_offset.ll
+++ b/test/ScopInfo/multidim_fixedsize_multi_offset.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 ;
 ; CHECK:      Context:
 ; CHECK-NEXT: {  :  }
diff --git a/test/ScopInfo/multidim_fold_constant_dim_zero.ll b/test/ScopInfo/multidim_fold_constant_dim_zero.ll
index 26f72b4..771dd2c 100644
--- a/test/ScopInfo/multidim_fold_constant_dim_zero.ll
+++ b/test/ScopInfo/multidim_fold_constant_dim_zero.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze -debug -S < %s 2>&1 | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -debug -S < %s 2>&1 | FileCheck %s
 
 ; REQUIRES: asserts
 
diff --git a/test/ScopInfo/multidim_fortran_2d_with_modref_call.ll b/test/ScopInfo/multidim_fortran_2d_with_modref_call.ll
index 786ad84..e17ca9c 100644
--- a/test/ScopInfo/multidim_fortran_2d_with_modref_call.ll
+++ b/test/ScopInfo/multidim_fortran_2d_with_modref_call.ll
@@ -1,7 +1,7 @@
-; RUN: opt %loadPolly -polly-scops -analyze -polly-allow-modref-calls \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -polly-allow-modref-calls \
 ; RUN: -polly-invariant-load-hoisting=true \
 ; RUN:  < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-scops -polly-allow-nonaffine -analyze \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -polly-allow-nonaffine -analyze \
 ; RUN: -polly-invariant-load-hoisting=true \
 ; RUN: -polly-allow-modref-calls < %s | FileCheck %s --check-prefix=NONAFFINE
 
diff --git a/test/ScopInfo/multidim_fortran_srem.ll b/test/ScopInfo/multidim_fortran_srem.ll
index 46cec71..bc926e4 100644
--- a/test/ScopInfo/multidim_fortran_srem.ll
+++ b/test/ScopInfo/multidim_fortran_srem.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 target datalayout = "e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 
 ; CHECK:      Statements {
diff --git a/test/ScopInfo/multidim_nested_start_share_parameter.ll b/test/ScopInfo/multidim_nested_start_share_parameter.ll
index 6450f94..a6676ec 100644
--- a/test/ScopInfo/multidim_nested_start_share_parameter.ll
+++ b/test/ScopInfo/multidim_nested_start_share_parameter.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %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-S128"
 
 ; void foo(long n, long m, long o, double A[n][m][o]) {
diff --git a/test/ScopInfo/multidim_with_bitcast.ll b/test/ScopInfo/multidim_with_bitcast.ll
index d954088..a57685f 100644
--- a/test/ScopInfo/multidim_with_bitcast.ll
+++ b/test/ScopInfo/multidim_with_bitcast.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 
diff --git a/test/ScopInfo/multiple-types-access-offset-not-dividable-by-element-size.ll b/test/ScopInfo/multiple-types-access-offset-not-dividable-by-element-size.ll
index 738c38c..ead5cbb 100644
--- a/test/ScopInfo/multiple-types-access-offset-not-dividable-by-element-size.ll
+++ b/test/ScopInfo/multiple-types-access-offset-not-dividable-by-element-size.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -pass-remarks-analysis="polly-scops" \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -pass-remarks-analysis="polly-scops" \
 ; RUN: -polly-allow-differing-element-types \
 ; RUN:                -analyze < %s  2>&1 | FileCheck %s
 ;
diff --git a/test/ScopInfo/multiple-types-non-affine-2.ll b/test/ScopInfo/multiple-types-non-affine-2.ll
index 6fb4638..9319087 100644
--- a/test/ScopInfo/multiple-types-non-affine-2.ll
+++ b/test/ScopInfo/multiple-types-non-affine-2.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-allow-differing-element-types -polly-scops -polly-allow-nonaffine -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-allow-differing-element-types -polly-codegen -polly-allow-nonaffine -analyze
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-allow-differing-element-types -polly-scops -polly-allow-nonaffine -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-allow-differing-element-types -polly-codegen -polly-allow-nonaffine -analyze
 ;
 ;    // Check that accessing one array with different types works,
 ;    // even though some accesses are non-affine.
diff --git a/test/ScopInfo/multiple-types-non-affine.ll b/test/ScopInfo/multiple-types-non-affine.ll
index e090655..bc1ab09 100644
--- a/test/ScopInfo/multiple-types-non-affine.ll
+++ b/test/ScopInfo/multiple-types-non-affine.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-allow-differing-element-types -polly-scops -polly-allow-nonaffine -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-allow-differing-element-types -polly-codegen -polly-allow-nonaffine -analyze
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-allow-differing-element-types -polly-scops -polly-allow-nonaffine -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-allow-differing-element-types -polly-codegen -polly-allow-nonaffine -analyze
 ;
 ;    // Check that accessing one array with different types works,
 ;    // even though some accesses are non-affine.
diff --git a/test/ScopInfo/multiple-types.ll b/test/ScopInfo/multiple-types.ll
index a776f3e..813cce0 100644
--- a/test/ScopInfo/multiple-types.ll
+++ b/test/ScopInfo/multiple-types.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze \
 ; RUN: -polly-allow-differing-element-types < %s | FileCheck %s
 ;
 ;    // Check that accessing one array with different types works.
diff --git a/test/ScopInfo/non-affine-region-with-loop-2.ll b/test/ScopInfo/non-affine-region-with-loop-2.ll
index 555c6e1..3826943 100644
--- a/test/ScopInfo/non-affine-region-with-loop-2.ll
+++ b/test/ScopInfo/non-affine-region-with-loop-2.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-allow-nonaffine-loops -polly-scops -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-allow-nonaffine-loops -polly-codegen -analyze
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-allow-nonaffine-loops -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-allow-nonaffine-loops -polly-codegen -analyze
 ;
 ; CHECK:    Stmt_loop3
 ; CHECK:            Domain :=
diff --git a/test/ScopInfo/out-of-scop-use-in-region-entry-phi-node.ll b/test/ScopInfo/out-of-scop-use-in-region-entry-phi-node.ll
index 9491400..5a7e552 100644
--- a/test/ScopInfo/out-of-scop-use-in-region-entry-phi-node.ll
+++ b/test/ScopInfo/out-of-scop-use-in-region-entry-phi-node.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 
 ; CHECK: MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 1]
 ; CHECK-NEXT: [p_0] -> { Stmt_bb3[] -> MemRef_tmp5[] };
diff --git a/test/ScopInfo/parameter-constant-division.ll b/test/ScopInfo/parameter-constant-division.ll
index 28a823b..a973af1 100644
--- a/test/ScopInfo/parameter-constant-division.ll
+++ b/test/ScopInfo/parameter-constant-division.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops \
 ; RUN: -polly-invariant-load-hoisting=true \
 ; RUN: -analyze -S < %s | FileCheck %s
 ;
diff --git a/test/ScopInfo/phi_after_error_block.ll b/test/ScopInfo/phi_after_error_block.ll
index c8aae44..d1e0341 100644
--- a/test/ScopInfo/phi_after_error_block.ll
+++ b/test/ScopInfo/phi_after_error_block.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 
 declare void @bar()
 
diff --git a/test/ScopInfo/phi_scalar_simple_2.ll b/test/ScopInfo/phi_scalar_simple_2.ll
index 46010ac..ad253e8 100644
--- a/test/ScopInfo/phi_scalar_simple_2.ll
+++ b/test/ScopInfo/phi_scalar_simple_2.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 ;
 ;    int jd(int *restrict A, int x, int N, int c) {
 ;      for (int i = 0; i < N; i++)
diff --git a/test/ScopInfo/pointer-used-as-base-pointer-and-scalar-read.ll b/test/ScopInfo/pointer-used-as-base-pointer-and-scalar-read.ll
index c34b3f1..2dfc078 100644
--- a/test/ScopInfo/pointer-used-as-base-pointer-and-scalar-read.ll
+++ b/test/ScopInfo/pointer-used-as-base-pointer-and-scalar-read.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 
 ; In this test case we pass a pointer %A into a PHI node and also use this
 ; pointer as base pointer of an array store. As a result, we get both scalar
diff --git a/test/ScopInfo/polly-timeout-parameter-bounds.ll b/test/ScopInfo/polly-timeout-parameter-bounds.ll
index 652a0d9..b56a1d1 100644
--- a/test/ScopInfo/polly-timeout-parameter-bounds.ll
+++ b/test/ScopInfo/polly-timeout-parameter-bounds.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 
 ; CHECK:      Statements {
 ; CHECK-NEXT:  	Stmt_bb9
diff --git a/test/ScopInfo/process_added_dimensions.ll b/test/ScopInfo/process_added_dimensions.ll
index 48a8bdf..7dd2daf 100644
--- a/test/ScopInfo/process_added_dimensions.ll
+++ b/test/ScopInfo/process_added_dimensions.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 
 ; CHECK:      Context:
 ; CHECK-NEXT: {  :  }
diff --git a/test/ScopInfo/read-only-scalars.ll b/test/ScopInfo/read-only-scalars.ll
index 0ffedf9..d13ccf4 100644
--- a/test/ScopInfo/read-only-scalars.ll
+++ b/test/ScopInfo/read-only-scalars.ll
@@ -1,6 +1,6 @@
-; RUN: opt %loadPolly -polly-analyze-read-only-scalars=false -polly-scops \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-analyze-read-only-scalars=false -polly-scops \
 ; RUN:                -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-analyze-read-only-scalars=true -polly-scops \
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-analyze-read-only-scalars=true -polly-scops \
 ; RUN:                -analyze < %s | FileCheck %s \
 ; RUN:                -check-prefix=SCALARS
 
diff --git a/test/ScopInfo/reduction_disabled_multiplicative.ll b/test/ScopInfo/reduction_disabled_multiplicative.ll
index 5b97232..ab3de3e 100644
--- a/test/ScopInfo/reduction_disabled_multiplicative.ll
+++ b/test/ScopInfo/reduction_disabled_multiplicative.ll
@@ -1,4 +1,4 @@
-; RUN: opt -basicaa %loadPolly -polly-scops -analyze -polly-disable-multiplicative-reductions < %s | FileCheck %s
+; RUN: opt -basicaa %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -polly-disable-multiplicative-reductions < %s | FileCheck %s
 ;
 ; CHECK: ReadAccess :=       [Reduction Type: +
 ; CHECK:     { Stmt_for_body[i0] -> MemRef_sum[0] };
diff --git a/test/ScopInfo/reduction_escaping_intermediate_2.ll b/test/ScopInfo/reduction_escaping_intermediate_2.ll
index 0dcefa4..f386ea3 100644
--- a/test/ScopInfo/reduction_escaping_intermediate_2.ll
+++ b/test/ScopInfo/reduction_escaping_intermediate_2.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -basicaa -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -basicaa -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 ;
 ; void f(int N, int * restrict sums, int * restrict escape) {
 ;   int i, j;
diff --git a/test/ScopInfo/reduction_invalid_overlapping_accesses.ll b/test/ScopInfo/reduction_invalid_overlapping_accesses.ll
index 845f8e7..ed06cab 100644
--- a/test/ScopInfo/reduction_invalid_overlapping_accesses.ll
+++ b/test/ScopInfo/reduction_invalid_overlapping_accesses.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 ;
 ; void f(int *sums) {
 ;   int i, j;
diff --git a/test/ScopInfo/reduction_multiple_simple_binary.ll b/test/ScopInfo/reduction_multiple_simple_binary.ll
index 7bce4fa..f51a029 100644
--- a/test/ScopInfo/reduction_multiple_simple_binary.ll
+++ b/test/ScopInfo/reduction_multiple_simple_binary.ll
@@ -1,4 +1,4 @@
-; RUN: opt -basicaa %loadPolly -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt -basicaa %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s
 ;
 ; CHECK: ReadAccess :=       [Reduction Type: NONE
 ; CHECK:     { Stmt_for_body[i0] -> MemRef_A[1 + i0] };
diff --git a/test/ScopInfo/stmt_split_phi_in_stmt.ll b/test/ScopInfo/stmt_split_phi_in_stmt.ll
index 02603af..5656086 100644
--- a/test/ScopInfo/stmt_split_phi_in_stmt.ll
+++ b/test/ScopInfo/stmt_split_phi_in_stmt.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze -polly-print-instructions < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -polly-print-instructions < %s | FileCheck %s
 ;
 ; CHECK:    Statements {
 ; CHECK-NEXT:  	Stmt_Stmt
diff --git a/test/ScopInfo/stmt_split_scalar_dependence.ll b/test/ScopInfo/stmt_split_scalar_dependence.ll
index 48807a8..3bb6982 100644
--- a/test/ScopInfo/stmt_split_scalar_dependence.ll
+++ b/test/ScopInfo/stmt_split_scalar_dependence.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze -polly-print-instructions < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -polly-print-instructions < %s | FileCheck %s
 ;
 ; CHECK:    Statements {
 ; CHECK-NEXT:  	Stmt_Stmt
diff --git a/test/ScopInfo/stmt_split_within_loop.ll b/test/ScopInfo/stmt_split_within_loop.ll
index 4d42e5e..7911da4 100644
--- a/test/ScopInfo/stmt_split_within_loop.ll
+++ b/test/ScopInfo/stmt_split_within_loop.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze -polly-print-instructions < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze -polly-print-instructions < %s | FileCheck %s
 ;
 ; CHECK:    Statements {
 ; CHECK-NEXT:  	Stmt_Stmt
diff --git a/test/ScopInfo/unpredictable_nonscop_loop.ll b/test/ScopInfo/unpredictable_nonscop_loop.ll
index 5452fac..14debdc 100644
--- a/test/ScopInfo/unpredictable_nonscop_loop.ll
+++ b/test/ScopInfo/unpredictable_nonscop_loop.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -analyze < %s | FileCheck %s -match-full-lines
 ; Derived from test-suite/MultiSource/Applications/sgefa/blas.c
 ;
 ; The exit value of %i.0320 in land.rhs is not computable.
diff --git a/test/ScopInfo/unprofitable_scalar-accs.ll b/test/ScopInfo/unprofitable_scalar-accs.ll
index c8b31de..031fe0f 100644
--- a/test/ScopInfo/unprofitable_scalar-accs.ll
+++ b/test/ScopInfo/unprofitable_scalar-accs.ll
@@ -1,5 +1,5 @@
-; RUN: opt %loadPolly -polly-process-unprofitable=false -polly-unprofitable-scalar-accs=false -polly-scops -analyze < %s | FileCheck %s
-; RUN: opt %loadPolly -polly-process-unprofitable=false -polly-unprofitable-scalar-accs=true  -polly-scops -analyze < %s | FileCheck %s --check-prefix=HEURISTIC
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-process-unprofitable=false -polly-unprofitable-scalar-accs=false -polly-scops -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-process-unprofitable=false -polly-unprofitable-scalar-accs=true  -polly-scops -analyze < %s | FileCheck %s --check-prefix=HEURISTIC
 
 ; Check the effect of -polly-unprofitable-scalar-accs
 
diff --git a/test/Simplify/coalesce_3partials.ll b/test/Simplify/coalesce_3partials.ll
index e3e4fed..7df5908 100644
--- a/test/Simplify/coalesce_3partials.ll
+++ b/test/Simplify/coalesce_3partials.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
 ;
 ; Combine 3 partial accesses into one.
 ;
diff --git a/test/Simplify/coalesce_disjointelements.ll b/test/Simplify/coalesce_disjointelements.ll
index b7d9549..2581be6 100644
--- a/test/Simplify/coalesce_disjointelements.ll
+++ b/test/Simplify/coalesce_disjointelements.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
 ;
 ; Combine four partial stores into two.
 ; The stores write to the same array, but never the same element.
diff --git a/test/Simplify/coalesce_overlapping.ll b/test/Simplify/coalesce_overlapping.ll
index 6004644..6df11e7 100644
--- a/test/Simplify/coalesce_overlapping.ll
+++ b/test/Simplify/coalesce_overlapping.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
 ;
 ; Combine two partial stores (with overlapping domains) into one.
 ;
diff --git a/test/Simplify/coalesce_partial.ll b/test/Simplify/coalesce_partial.ll
index 4a19a7c..e16488a 100644
--- a/test/Simplify/coalesce_partial.ll
+++ b/test/Simplify/coalesce_partial.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
 ;
 ; Combine two partial stores (with disjoint domains) into one.
 ;
diff --git a/test/Simplify/dead_access_load.ll b/test/Simplify/dead_access_load.ll
index 3febfa1..e8c501f 100644
--- a/test/Simplify/dead_access_load.ll
+++ b/test/Simplify/dead_access_load.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Remove a dead load-instruction
 ; (an load whose result is not used anywhere)
diff --git a/test/Simplify/dead_access_phi.ll b/test/Simplify/dead_access_phi.ll
index 627195e..edd56d8 100644
--- a/test/Simplify/dead_access_phi.ll
+++ b/test/Simplify/dead_access_phi.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Remove a dead PHI write/read pair
 ; (accesses that are effectively not used)
diff --git a/test/Simplify/dead_access_value.ll b/test/Simplify/dead_access_value.ll
index 0b75e7e..1cb707d 100644
--- a/test/Simplify/dead_access_value.ll
+++ b/test/Simplify/dead_access_value.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Remove a dead value write/read pair
 ; (accesses that are effectively not used)
diff --git a/test/Simplify/dead_instruction.ll b/test/Simplify/dead_instruction.ll
index 0925c87..31bdaa2 100644
--- a/test/Simplify/dead_instruction.ll
+++ b/test/Simplify/dead_instruction.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Remove a dead instruction
 ; (an instruction whose result is not used anywhere)
diff --git a/test/Simplify/nocoalesce_differentvalues.ll b/test/Simplify/nocoalesce_differentvalues.ll
index ef1b7fc..20ea14e 100644
--- a/test/Simplify/nocoalesce_differentvalues.ll
+++ b/test/Simplify/nocoalesce_differentvalues.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
 ;
 ; Do not combine stores that write different values.
 ;
diff --git a/test/Simplify/nocoalesce_elementmismatch.ll b/test/Simplify/nocoalesce_elementmismatch.ll
index 6eeeccb..8fd4c71 100644
--- a/test/Simplify/nocoalesce_elementmismatch.ll
+++ b/test/Simplify/nocoalesce_elementmismatch.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
 ;
 ; Do not combine stores that do not write to different elements in the
 ; same instance.
diff --git a/test/Simplify/nocoalesce_readbetween.ll b/test/Simplify/nocoalesce_readbetween.ll
index dad462e..513fa29 100644
--- a/test/Simplify/nocoalesce_readbetween.ll
+++ b/test/Simplify/nocoalesce_readbetween.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
 ;
 ; Do not combine stores if there is a read between them.
 ; Note: The read between is unused, so will be removed by markAndSweep.
diff --git a/test/Simplify/nocoalesce_writebetween.ll b/test/Simplify/nocoalesce_writebetween.ll
index d467212..d7db178 100644
--- a/test/Simplify/nocoalesce_writebetween.ll
+++ b/test/Simplify/nocoalesce_writebetween.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-simplify -analyze < %s | FileCheck -match-full-lines %s
 ;
 ; Do not combine stores if there is a write between them.
 ;
diff --git a/test/Simplify/notredundant_synthesizable_unknownit.ll b/test/Simplify/notredundant_synthesizable_unknownit.ll
index 4dc33de..5cc42e1 100644
--- a/test/Simplify/notredundant_synthesizable_unknownit.ll
+++ b/test/Simplify/notredundant_synthesizable_unknownit.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-simplify -analyze < %s | FileCheck %s -match-full-lines
 ;
 ; Do not remove the scalar value write of %i.trunc in inner.for.
 ; It is used by body.
diff --git a/test/Simplify/out-of-scop-use-in-region-entry-phi-node.ll b/test/Simplify/out-of-scop-use-in-region-entry-phi-node.ll
index d41810d..b48f65d 100644
--- a/test/Simplify/out-of-scop-use-in-region-entry-phi-node.ll
+++ b/test/Simplify/out-of-scop-use-in-region-entry-phi-node.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-scops -polly-simplify -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-scops -polly-simplify -analyze < %s | FileCheck %s
 ;
 ; %tmp5 must keep the Value WRITE MemoryAccess, because as an incoming value of
 ; %tmp4, it is an "external use".
diff --git a/test/Simplify/overwritten.ll b/test/Simplify/overwritten.ll
index 55d59b3..09d48e7 100644
--- a/test/Simplify/overwritten.ll
+++ b/test/Simplify/overwritten.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck -match-full-lines %s 
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-simplify -analyze < %s | FileCheck -match-full-lines %s 
 ;
 ; Remove a store that is overwritten by another store in the same statement.
 ;
diff --git a/test/Simplify/overwritten_3store.ll b/test/Simplify/overwritten_3store.ll
index 133a347..17353c6 100644
--- a/test/Simplify/overwritten_3store.ll
+++ b/test/Simplify/overwritten_3store.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-simplify -analyze < %s | FileCheck -match-full-lines %s 
+; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-simplify -analyze < %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.