[PATCH] D136626: [docs][NewPM] Move pass plugin documentation into existing new PM docs

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 17:01:26 PDT 2022


aeubanks added inline comments.


================
Comment at: llvm/docs/WritingAnLLVMNewPMPass.rst:239-240
+
+LLVM provides a mechanism to automatically register pass plugins within various
+tools like ``clang`` or ``opt``.  Create a CMake project at the root of the repo
+alongside other projects.  This project must contain the following minimal
----------------
awarzynski wrote:
> To me, "automatic pass registration" equals "static registration". However, IIUC, this is meant to cover both "static" and "dynamic" registration. And the first sentence here suggests that only static/automatic registration is covered.
better?


================
Comment at: llvm/docs/WritingAnLLVMNewPMPass.rst:262
+
+To include statically linked pass plugins when building a tool that uses the new pass manager:
+
----------------
Meinersbur wrote:
> awarzynski wrote:
> > Can you elaborate a bit? This isn't needed for `Bye`, is it? So when would it be needed?
> "Bye" is already included in `llvm/Support/Extension.def` (if enabled in CMake configuration). 
> 
> This needed is when you want to write a tool (like `opt`, `bugpoint`, ...) that uses the NPM pipeline builder to automatically add pass-extension plugins (such as "Bye") when creating an O1/O2/... pipeline (in addition to a the pre-registered set of passes). I.e. that does not just happen automatically if the tool itself does not add code for it.
clearer now?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136626



More information about the llvm-commits mailing list