[PATCH] D84977: [NewPM] Only verify loop for nonskipped user loop pass

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 10:43:00 PDT 2020


ychen added a comment.

In D84977#2186618 <https://reviews.llvm.org/D84977#2186618>, @ebrevnov wrote:

> In D84977#2186550 <https://reviews.llvm.org/D84977#2186550>, @aeubanks wrote:
>
>> It seems like the verification is to check either that on the first round, `LoopCanonicalizationFPM` worked, or on iterations after the first, the loop pass maintained whatever loop invariants.
>> Since the `LoopPassManager` itself doesn't check for `L->isRecursivelyLCSSAForm(LAR.DT, LI)`, I don't think we should guard the check with `!isSpecialPass(Pass.name(), {"PassManager"})`.
>
> If I'm not mistaken LoopPassManager does check loop invariant after each pass (lines 63-68 in LoopPassManager.cpp).  If it didn't we would need to fix that, right? I think FunctionToLoopPassAdaptor should redirect to LoopPassManager for running loop passes instead of duplicating its functionality. Ideas?

An adaptor could wrap a loop pass directly without a loop pass manager. The code in FunctionToLoopPassAdaptor is needed to handle that.

>> Maybe it makes more sense to mark `LoopSimplifyPass` and `LCSSAPass` as required? Since we don't know ahead of time if any loop passes in the pass manager are required (well we could, but that's a different issue).
>
> But that would affect much more places than needed. Instead LoopPassManager could run canonicalization passes before first non-skipped pass. Should be easy to support.

ditto.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84977



More information about the llvm-commits mailing list