[PATCH] D104812: [docs][NewPM] Add some instructions on how to invoke opt

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 23 17:02:40 PDT 2021


aeubanks added inline comments.


================
Comment at: llvm/docs/NewPassManager.rst:394-395
+
+* If the first pass is not a module pass, a pass manager of the first pass is
+  implicitly created
+
----------------
nickdesaulniers wrote:
> How does a developer know whether a pass is a module pass vs a function pass? Is there a way to find out? Can that be added to the documentation?
> 
> I assume some error message is produced when the proper "adapter" is left out? Perhaps having such an error message, with an explicit recommendation on what's going wrong, why, and how to resolve will make search engines able to index.  That way, when a developer hits such an error, then searches for the error, they find this solution in the docs?
it's part of the section below that prints all available passes, clarified there


================
Comment at: llvm/docs/NewPassManager.rst:429
+
+  $ opt -passes='function(require<my-function-analysis>),my-module-pass' /tmp/a.ll -S
+
----------------
nickdesaulniers wrote:
> How does this differ from say:
> `-passes='function(my-function-analysis,my-module-pass'`
> ?
`-passes=my-function-analysis` just isn't a thing
I've made it clearer what this actually does


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104812



More information about the llvm-commits mailing list