[PATCH] D141590: [PassManager] Add some passes to the sequence of extra vector passes

Tiehu Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 19:14:16 PST 2023


TiehuZhang added a comment.

In D141590#4047397 <https://reviews.llvm.org/D141590#4047397>, @lebedev.ri wrote:

> I'm also a bit skeptical about this change.
> I would really recommend to fix the LoopIdiom pass itself,
> or at least explaining why that is impossible/unfeasible.

Hi, @lebedev.ri, thanks for you reivew! Actually, I don't think it's the problem of `LoopIdiom pass`, but the sequence of `ExtraVectorizerPasses` introduces additional optimization opportunities. When `extra-vectorizer-passes` is enabled, the vectorized loop executes some extra passes, as shown, `-passes=' early-cse,correlated-propagation,instcombine,loop-mssa(licm),simple-loop-unswitch<nontrivial>,...'`. In this case, `SimpleLoopUnswitch` pass may optimize the control flow of the nestloop and separate some simple loops. It brings optimization opportunities for LoopIdiom/IndVarSimplify. Adding LoopIdiom/IndVarSimplify after `SimpleLoopUnswitch`  pass of the sequence gives us the opportunity to optimize these loops, so that we could generate better IRs.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141590



More information about the llvm-commits mailing list