diff options
author | Tobias Grosser <tobias@grosser.es> | 2015-04-05 21:52:21 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2015-04-05 21:52:21 +0000 |
commit | 02cf69a6edf141cd69f3955266041a1273c1888f (patch) | |
tree | 51b5b752e6289d65b0ec905f41418fc31c192d39 | |
parent | 51b7298fa860742cb7d005df934224567f079184 (diff) | |
download | bcm5719-llvm-02cf69a6edf141cd69f3955266041a1273c1888f.tar.gz bcm5719-llvm-02cf69a6edf141cd69f3955266041a1273c1888f.zip |
Make -polly-no-tiling work again
llvm-svn: 234125
-rw-r--r-- | polly/lib/Transform/ScheduleOptimizer.cpp | 9 | ||||
-rw-r--r-- | polly/test/ScheduleOptimizer/rectangular-tiling.ll | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp index 942592a2de9..836eeeaf157 100644 --- a/polly/lib/Transform/ScheduleOptimizer.cpp +++ b/polly/lib/Transform/ScheduleOptimizer.cpp @@ -285,7 +285,14 @@ isl_schedule_node *IslScheduleOptimizer::optimizeBand(isl_schedule_node *Node, Sizes = isl_multi_val_set_val(Sizes, i, isl_val_int_from_si(Ctx, tileSize)); } - auto Res = isl_schedule_node_band_tile(Node, Sizes); + isl_schedule_node *Res; + + if (DisableTiling) { + isl_multi_val_free(Sizes); + Res = Node; + } else { + Res = isl_schedule_node_band_tile(Node, Sizes); + } if (PollyVectorizerChoice == VECTORIZER_NONE) return Res; diff --git a/polly/test/ScheduleOptimizer/rectangular-tiling.ll b/polly/test/ScheduleOptimizer/rectangular-tiling.ll index 98c16db8daa..0111d03f764 100644 --- a/polly/test/ScheduleOptimizer/rectangular-tiling.ll +++ b/polly/test/ScheduleOptimizer/rectangular-tiling.ll @@ -1,4 +1,5 @@ -; RUN: opt %loadPolly -polly-detect-unprofitable -polly-opt-isl -analyze -polly-no-tiling=0 -polly-ast -polly-tile-sizes=256,16 < %s | FileCheck %s +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-opt-isl -analyze -polly-ast -polly-tile-sizes=256,16 < %s | FileCheck %s +; RUN: opt %loadPolly -polly-detect-unprofitable -polly-opt-isl -analyze -polly-no-tiling -polly-ast -polly-tile-sizes=256,16 < %s | FileCheck %s --check-prefix=NOTILING ; CHECK: for (int c0 = 0; c0 <= 3; c0 += 1) ; CHECK: for (int c1 = 0; c1 <= 31; c1 += 1) @@ -6,6 +7,10 @@ ; CHECK: for (int c3 = 0; c3 <= 15; c3 += 1) ; CHECK: Stmt_for_body3(256 * c0 + c2, 16 * c1 + c3); +; NOTILING: for (int c0 = 0; c0 <= 1023; c0 += 1) +; NOTILING: for (int c1 = 0; c1 <= 511; c1 += 1) +; NOTILING: Stmt_for_body3(c0, c1); + target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64" ; Function Attrs: nounwind |