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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 18:10:53 PST 2023


lebedev.ri requested changes to this revision.
lebedev.ri added a comment.
This revision now requires changes to proceed.

In D141590#4055246 <https://reviews.llvm.org/D141590#4055246>, @TiehuZhang wrote:

> In D141590#4051555 <https://reviews.llvm.org/D141590#4051555>, @lebedev.ri wrote:
>
>> Yes, of course running more passes helps with optimizations. That is obvious and was not my question.
>> My question is why we need to do that in the first place, and why we can not catch those cases during the existing pass runs.
>
> Okay, I get it, thank @lebedev.ri. I'll try to explore further. Maybe there are some limitations in LoopIdiom or LoopVectorize pass? As the optimization opportunity of `LoopIdiom` occurs after the `SimpleLoopUnswitch` pass.

The normal `LoopIdiomRecognizePass` already runs after `SimpleLoopUnswitchPass`.
I think we need to see a phase-ordering test (`-O3`), that shows
that the existing pass invocation does not handle some pattern.
Without that, it's not possible to make progress here.

> In fact, I have another question, what is the basis for adding these passes in the sequence of `ExtraVectorizerPasses`?
> Because I notice that some places where `SimpleLoopUnswitch` pass is followed by `LoopIdiom` and `IndVarSimplify` pass (but not here).




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