[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 19:45:11 PDT 2021
aeubanks added a comment.
I see what you mean by `module(func-pass)` vs `function(func-pass)`, but `function(func-pass)` is much more unambiguous. If there was a cgscc pass and a function pass with the same name it would be ambiguous.
As for a better error message, a similar issue is there, but of course most pass names are unique, so we could do something like what you propose. Or maybe just tack on a "perhaps the type of pass you're running is wrong".
================
Comment at: llvm/docs/NewPassManager.rst:429
+
+ $ opt -passes='function(require<my-function-analysis>),my-module-pass' /tmp/a.ll -S
+
----------------
nickdesaulniers wrote:
> aeubanks wrote:
> > 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
> Sorry, I meant:
>
> What is the difference between:
> `opt -passes='function(require<my-function-analysis>),my-module-pass' /tmp/a.ll -S`
> vs
> `opt -passes='function(my-function-analysis),my-module-pass' /tmp/a.ll -S`
>
> Wouldn't `my-function-analysis` run either way? If so, what's the point of `require<>`? If not, what difference does `require<>` imply?
you don't directly run analyses, you can only run passes. `require<foo>` is basically just a pass that just queries for that analysis, putting it in the cache
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