[llvm-commits] [polly] r170422 - in /polly/trunk/lib/CodeGen: CodeGeneration.cpp IslCodeGeneration.cpp
Sebastian Pop
spop at codeaurora.org
Tue Dec 18 00:56:51 PST 2012
Author: spop
Date: Tue Dec 18 02:56:51 2012
New Revision: 170422
URL: http://llvm.org/viewvc/llvm-project?rev=170422&view=rev
Log:
return -1 when polly::getNumberOfIterations returns -1
Modified:
polly/trunk/lib/CodeGen/CodeGeneration.cpp
polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
Modified: polly/trunk/lib/CodeGen/CodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/CodeGeneration.cpp?rev=170422&r1=170421&r2=170422&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/CodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/CodeGeneration.cpp Tue Dec 18 02:56:51 2012
@@ -770,7 +770,10 @@
int ClastStmtCodeGen::getNumberOfIterations(const clast_for *For) {
isl_set *LoopDomain = isl_set_copy(isl_set_from_cloog_domain(For->domain));
- return polly::getNumberOfIterations(LoopDomain) / isl_int_get_si(For->stride) + 1;
+ int NumberOfIterations = polly::getNumberOfIterations(LoopDomain);
+ if (NumberOfIterations == -1)
+ return -1;
+ return NumberOfIterations / isl_int_get_si(For->stride) + 1;
}
void ClastStmtCodeGen::codegenForVector(const clast_for *F) {
Modified: polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslCodeGeneration.cpp?rev=170422&r1=170421&r2=170422&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/IslCodeGeneration.cpp Tue Dec 18 02:56:51 2012
@@ -665,7 +665,10 @@
isl_union_map *Schedule = isl_ast_build_get_schedule(Info->Context);
isl_set *LoopDomain = isl_set_from_union_set(isl_union_map_range(Schedule));
isl_id_free(Annotation);
- return polly::getNumberOfIterations(LoopDomain) + 1;
+ int NumberOfIterations = polly::getNumberOfIterations(LoopDomain);
+ if (NumberOfIterations == -1)
+ return -1;
+ return NumberOfIterations + 1;
}
void IslNodeBuilder::createUserVector(__isl_take isl_ast_node *User,
More information about the llvm-commits
mailing list