[PATCH] D67687: [NewPM][CodeGen] Introduce machine pass and machine pass manager

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 15:46:40 PDT 2020


ychen added a comment.

In D67687#2170494 <https://reviews.llvm.org/D67687#2170494>, @asbirlea wrote:

> IIRC the MIR pipeline is essentially flat (vs the IR one), so at this point it's probably fine to not have the adaptor complexity. However, if this changes to become more than a one time use, then perhaps the Module-Function hierarchy makes sense.
>  Let me ask this differently, if the CodegenNPM introduced the `ModuleToFunctionPassAdaptor` now, and it was only used during codegen set-up (assuming negligible overhead for this complexity), is it possible it will be useful long-term in case there are changes in the current restrictions?


TBH, I don't think the adaptor class would be useful for cases other than codegen setup, because a partial MIR pipeline seems not very useful to be run as part of an IR pipeline. The only other place, I could think of, the adaptor could be useful is to concatenate the pre-codengen IR pipeline with the MIR pipeline. But similar to the possibility of combining opt-pipeline with codegen pipeline, I'm not sure it brings actual benefits other than aesthetics.

> It would be very helpful if you added an overall comment explanation (or adding to the documentation) on the decision of which parts of the IR NPM infra is used in the CodegenNPM.

Sure, will do.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67687





More information about the llvm-commits mailing list