[PATCH] D47899: [SCEV] Implement (non-exact) getSmallConstantTripCountUpperBound
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 7 15:04:54 PDT 2018
kparzysz added a comment.
In https://reviews.llvm.org/D47899#1125720, @efriedma wrote:
> The predicated trip count computation isn't modeling the loop in your example well; it thinks the maximum trip count is 2. But I guess that's okay.
It was 4 yesterday. I'll check it tomorrow when I'm back at work.
================
Comment at: include/llvm/Analysis/ScalarEvolution.h:731
+ /// value. The upper bound may be larger than the actual trip count.
+ /// Returns 0 if the trip count is unknown or cannot be estimated.
+ unsigned getSmallConstantTripCountUpperBound(const Loop *L);
----------------
efriedma wrote:
> The comment is backwards: the important thing is that actual trip count may be larger than the upper bound.
The actual trip count must be less than or equal than the upper bound. It wouldn't make any sense otherwise.
Repository:
rL LLVM
https://reviews.llvm.org/D47899
More information about the llvm-commits
mailing list