[PATCH] D25276: [LoopVectorizer] Interleaved-mem-accesses analysis and getPtrStride
silviu.baranga@arm.com via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 10:50:41 PDT 2016
sbaranga added a comment.
In https://reviews.llvm.org/D25276#573001, @dorit wrote:
> I see. Thanks.
>
> So in this case, don't we have a problem of potentially adding runtime SCEV assumptions without ever checking if we exceed the threshold? getPtrStride is called with Assume=true several times from the cost-model stage and from the actual vectorization transformation stage, via the call to isConsecutivePtr. Looks like these call sites are past the point when we check whether we exceeded the threshold for runtime SCEV assumptions...?
Yes, I think that would be the case. I think for now this isn't really a problem, as these are mostly edge cases. If it turns out to be a problem, we have several options:
- allowing Predicated Scalar Evolution interface to only add these checks if we don't exceed a certain threshold
- I've found that we can often rewrite the code to only add these checks if we really need them
We should also move the check for the number of SCEV assumptions after the legality stage of the vectorizer (I thought we already did that).
Thanks,
Silviu
https://reviews.llvm.org/D25276
More information about the llvm-commits
mailing list