[PATCH] D38785: [LV/LAA] Avoid specializing a loop for stride=1 when this predicate implies a single-iteration loop
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 14:47:28 PDT 2017
Ayal added a comment.
In https://reviews.llvm.org/D38785#913785, @dorit wrote:
> In short, I think we are all in agreement that:
>
> 1. This patch is a (small) improvement, * regardless of the users and their specific cost considerations *.
> 2. The cost-model aspect of deciding when to specialize for a certain stride needs to be improved. The users (LV especially) are currently not making informed decisions.
>
> …Right?
I agree,
1. This patch looks good to me; my comments below were very minor.
2. Add a TODO capturing these concerns/opportunities to further restrict unknown stride specialization. Not sure what probability may be assigned to an unknown stride being one, but another option is to optimize each gather/scatter with its unknown stride guard inside the loop, rather than loop-unswitching it into a preheader predicate.
Is this ok with you too @silviu.baranga ?
https://reviews.llvm.org/D38785
More information about the llvm-commits
mailing list