[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 09:18:11 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?


Agreed, we will evaluate if we can this pass as a utility for vectorizer. In the past we tried that but got stuck because we were unable to recompute loop-access-info once the instructions have been reordered. Maybe you can help us here.

> 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.

The goal is to vectorize instructions by reordering, it just happens to catch cases missed by LICM. Once https://reviews.llvm.org/D35741  is merged, it will still catch cases currently missed by vectorizer e.g., when loads are not loop-invariant.


https://reviews.llvm.org/D36113





More information about the llvm-commits mailing list