-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling pass from Clang #36
Comments
Hello @palmerc , Thank you for stopping by! :) Unfortunately, the short answer is that I don't know. Running plugins from Passing command line options to plugins with In
This might have changed since I looked into it originally (LLVM ~9). -Andrzej |
Cool! I’m looking into this and I will report my findings.
… On 17 Jul 2021, at 17:34, Andrzej Warzyński ***@***.***> wrote:
Hello @palmerc ,
Thank you for stopping by! :) Unfortunately, the short answer is that I don't know.
Running plugins from clang
It's a very important use-case and I am curious myself. I've labeled this as an enhancement and will try to produce some examples and/or docs (or at least get a better understanding of the available options). I can't commit to any timelines and volunteers are always very welcome :)
Passing command line options to plugins with clang
All of llvm-tutor relies on opt to load and run the plugins. clang is a completely different driver, so the underlying logic around command-line options is also very different. I haven't really looked into it yet.
In opt, AFAIK, it is not possible to pass command line options to plugins when using the new PM. This was brought up in the past:
https://lists.llvm.org/pipermail/llvm-dev/2019-September/134973.html (slightly different question, but the answer applies here as well)
https://www.reddit.com/r/LLVM/comments/eh6m1t/new_pass_manager_new_interesting_behavior_with/
This might have changed since I looked into it originally (LLVM ~9).
-Andrzej
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Initial look. You can get options back to LLVM by calling clang with |
Thanks for the update! Do you know where are options for LLVM defined? (e.g. |
When you call opt directly you use --passes and the list of desired passes, but in some older code I've seen you could call from clang with -mllvm followed by some additional options added directly to PassManagerBuilder in the form of cl::opt items. This was also how you could then pass along additional options to the pass. This code was using the legacy pass manager. What is the current way to specify the passes and options when using clang?
The text was updated successfully, but these errors were encountered: