[PATCH] D12493: Do Not Model Unbounded Loops
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 12:59:34 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246477: Do Not Model Unbounded Loops (authored by jdoerfert).
Changed prior to commit:
http://reviews.llvm.org/D12493?vs=33582&id=33615#toc
Repository:
rL LLVM
http://reviews.llvm.org/D12493
Files:
polly/trunk/lib/Analysis/ScopInfo.cpp
polly/trunk/test/ScopInfo/isl_trip_count_02.ll
Index: polly/trunk/lib/Analysis/ScopInfo.cpp
===================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp
+++ polly/trunk/lib/Analysis/ScopInfo.cpp
@@ -903,9 +903,13 @@
isl_set *UpperBoundSet = isl_pw_aff_le_set(IV, UpperBound);
Domain = isl_set_intersect(Domain, UpperBoundSet);
} else {
- // If SCEV cannot provide a loop trip count we compute it with ISL.
+ // If SCEV cannot provide a loop trip count, we compute it with ISL. If
+ // the domain remains unbounded, make the assumed context infeasible
+ // as code generation currently does not expect unbounded loops.
addLoopTripCountToDomain(L);
isl_pw_aff_free(IV);
+ if (!isl_set_dim_has_upper_bound(Domain, isl_dim_set, i))
+ Parent.addAssumption(isl_set_empty(Parent.getParamSpace()));
}
}
Index: polly/trunk/test/ScopInfo/isl_trip_count_02.ll
===================================================================
--- polly/trunk/test/ScopInfo/isl_trip_count_02.ll
+++ polly/trunk/test/ScopInfo/isl_trip_count_02.ll
@@ -1,6 +1,8 @@
; RUN: opt %loadPolly -polly-detect-unprofitable -polly-allow-non-scev-backedge-taken-count -polly-scops -analyze < %s | FileCheck %s
;
-; CHECK: [M, N] -> { Stmt_for_body[i0] : i0 >= 0 and N <= -1 + M };
+; TODO: We do not allow unbounded loops at the moment.
+;
+; CHECK-NOT: Stmt_for_body
;
; void f(int *A, int N, int M) {
; for (int i = M; i > N; i++)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12493.33615.patch
Type: text/x-patch
Size: 1480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150831/4f2964e4/attachment.bin>
More information about the llvm-commits
mailing list