diff options
author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-08-27 06:53:52 +0000 |
---|---|---|
committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2015-08-27 06:53:52 +0000 |
commit | d020b7729553ecf31dd35fa3f2e02194de67ac6b (patch) | |
tree | 70ed0410167d42c4841d53b44a9785688b8d2d53 /polly/lib/Support | |
parent | a0a19c1c9187b64e07ea2f291135e912c1741010 (diff) | |
download | bcm5719-llvm-d020b7729553ecf31dd35fa3f2e02194de67ac6b.tar.gz bcm5719-llvm-d020b7729553ecf31dd35fa3f2e02194de67ac6b.zip |
Use ISL to Determine Loop Trip Count
Use ISL to compute the loop trip count when scalar evolution is unable to do
so.
Contributed-by: Matthew Simpson <mssimpso@codeaurora.org>
Differential Revision: http://reviews.llvm.org/D9444
llvm-svn: 246142
Diffstat (limited to 'polly/lib/Support')
-rw-r--r-- | polly/lib/Support/SCEVAffinator.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/polly/lib/Support/SCEVAffinator.cpp b/polly/lib/Support/SCEVAffinator.cpp index b6b237dea4d..79db71f52b7 100644 --- a/polly/lib/Support/SCEVAffinator.cpp +++ b/polly/lib/Support/SCEVAffinator.cpp @@ -160,7 +160,7 @@ SCEVAffinator::visitAddRecExpr(const SCEVAddRecExpr *Expr) { isl_space *Space = isl_space_set_alloc(Ctx, 0, NumIterators); isl_local_space *LocalSpace = isl_local_space_from_space(Space); - int loopDimension = getLoopDepth(Expr->getLoop()); + unsigned loopDimension = S->getRelativeLoopDepth(Expr->getLoop()); isl_aff *LAff = isl_aff_set_coefficient_si( isl_aff_zero_on_domain(LocalSpace), isl_dim_in, loopDimension, 1); @@ -248,9 +248,3 @@ __isl_give isl_pw_aff *SCEVAffinator::visitUnknown(const SCEVUnknown *Expr) { llvm_unreachable( "Unknowns SCEV was neither parameter nor a valid instruction."); } - -int SCEVAffinator::getLoopDepth(const Loop *L) { - Loop *outerLoop = S->getRegion().outermostLoopInRegion(const_cast<Loop *>(L)); - assert(outerLoop && "Scop does not contain this loop"); - return L->getLoopDepth() - outerLoop->getLoopDepth(); -} |