[PATCH] D100780: [Passes] Add extra LoopSimplifyCFG run after IndVarSimplify.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 12 16:54:46 PDT 2022


asbirlea added a comment.

In D100780#3508147 <https://reviews.llvm.org/D100780#3508147>, @aeubanks wrote:

> In D100780#3504820 <https://reviews.llvm.org/D100780#3504820>, @xbolva00 wrote:
>
>>>> This could be done by either exposing a simplifyLoopCFG helper function ...
>>
>> This variant sounds better, if possible.
>
> +1, at least for this case where it's a simple cleanup
>
> in other cases, such as D125293 <https://reviews.llvm.org/D125293> and D115052 <https://reviews.llvm.org/D115052> where we want to do more general cleanup due to added/lowered code, I believe @asbirlea has future plans to add new PM infra to conditionally run passes for simplification pipeline work

Sorry for the late reply here. For this specific case, always running `LoopSimplifyCFGPass` adds some compile-time and it seems unnecessary to add a hack for running it conditionally on the previous pass. So exposing a helper to be called directly from `IndVarSimplifyPass` makes more sense.

For additional context, I've been looking into the motivation for adding the `enable-no-rerun-simplification-pipeline` flag ( D113947 <https://reviews.llvm.org/D113947>) and what it would take to turn it on. Related to this, there are multiple cases of phase ordering issues that may need passes to be conditionally run or rerun, so I'm looking at a longer term design for the pass pipeline.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100780



More information about the llvm-commits mailing list