[PATCH] D88342: [Docs][NewPM] Add note about required passes

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 16:32:03 PDT 2020


ychen added a comment.

Thank you for writing this down.



================
Comment at: llvm/docs/WritingAnLLVMNewPMPass.rst:217
+
+If the pass is a required pass, meaning it must run on the IR to produce
+semantically valid output, add a static ``isRequired()`` method that returns
----------------
Personally, I may reorder the structure a little bit:

(definition) A pass that defines a static `isRequired()` method that returns true is a required pass.
< ... example ...>
(motivation) - meta passes (pass manager, adaptor pass etc)  - user passes: `AlwaysInlinerPass` etc.
(behavior) override all other mechanisms that may skip a pass, like "optnone"  etc.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88342



More information about the llvm-commits mailing list