[PATCH] D71250: [LV] Create new vector loop preheader so it contains vectorizer generated code only.

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 21:01:33 PST 2019


ebrevnov added a comment.

In D71250#1777947 <https://reviews.llvm.org/D71250#1777947>, @rengolin wrote:

> This change introduces a number of new branches in the code. While not necessarily the hottest code, it may prove significant on short loops, especially nested loops. Without evidence in the form of benchmarks etc. it's hard to justify.


These extra branches are very short leaved and optimized out by SimplifyCFG which happens just 3 passes after the vectorizer. Thus I don't believe it can cause any harm to the performance. I double check that LLVM's test-suite has no regressions.

> Furthermore, I'm not sure I agree with the statement that this makes the analysis somehow simpler. Do you have an explicit goal in mind?

This is definitely a subjective thing as there is no any formal metric to measure. IMHO having vectorizer generated code clearly separated from the rest makes IR more readable. It becomes easy to see whole structure of the vectorizer generated code. Having sad that it's surely not the main motivation for the change. The aim here is to simplify next patch (https://reviews.llvm.org/D71053) which benefits from being able to observe vectorizer generated code without doing extra book keeping.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71250/new/

https://reviews.llvm.org/D71250





More information about the llvm-commits mailing list