[PATCH] D104812: [docs][NewPM] Add some instructions on how to invoke opt
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 23 14:09:09 PDT 2021
nickdesaulniers added a comment.
Thank you for this patch! It is very much welcome!
================
Comment at: llvm/docs/NewPassManager.rst:390
+
+ $ opt -passes='no-op-module,cgscc(no-op-cgscc,function(no-op-function,loop(no-op-loop))),function(no-op-function,loop(no-op-loop))' /tmp/a.ll -S -debug-pass-manager
+
----------------
Can you please document the relation/order between `function`,`loop`, and `cgscc` "adapters?" I think it would be good to provide more information about "adapters" here.
================
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
+
----------------
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?
================
Comment at: llvm/docs/NewPassManager.rst:429
+
+ $ opt -passes='function(require<my-function-analysis>),my-module-pass' /tmp/a.ll -S
+
----------------
How does this differ from say:
`-passes='function(my-function-analysis,my-module-pass'`
?
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