[PATCH] D36113: [Loop Vectorize] Vectorize Loops with Backward Dependence

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 08:58:15 PDT 2017


hiraditya added a comment.

In https://reviews.llvm.org/D36113#849679, @hfinkel wrote:

> Two high-level thoughts:
>
> 1. Is this transformation always profitable even if we don't later vectorize? I worry that you're taking a stream of accesses that generally appear in order and making them appear out of order. That could have odd effects. Maybe this should all be a utility that the vectorizer uses more directly?
> 2. I don't think a goal of this should be to provide backup handling of things that LICM misses but MemorySSA can prove are loop invariant. We should improve LICM by making it use MemorySSA (see work on this in https://reviews.llvm.org/D35741 - pushing this along might help?). We could run LICM right before we vectorize too.


Adding comments from @dberlin  which got missed for some reason:

I'm definitely with Hal on the second point. We alreayd know there are deficiencies there, and the right way is to improve LICM.
If the goal is "move loop invariants", we want one pass that does that, not 6.

It's fine to have multiple passes when the job is so large that it can't sanely be done optimally by one thing, but i don't think this is ojne of those cases ....


https://reviews.llvm.org/D36113





More information about the llvm-commits mailing list