[flang-commits] [PATCH] D129156: Add -fpass-plugin option to Flang

Tarun Prabhu via flang-commits flang-commits at lists.llvm.org
Mon Jul 11 06:59:27 PDT 2022


 > 3. Have you tried the Bye <
https://github.com/llvm/llvm-project/blob/main/llvm/examples/Bye/Bye.cpp>
pass?

Ah, good point. I hadn't. I'll see if I can use that instead.

> From what I can see, it is not. If you do want to test this flag with a
proper pass, then it would be very desirable to extend this patch to Clang
and add a test there too. This way your work would benefit both
sub-projects,

Ok. It shouldn't be too difficult to create a patch for that. I suppose I
can add one and see what the clang community has to say about it.

Yup. I've tried to fill this gap by creating llvm-tutor <
> https://github.com/banach-space/llvm-tutor> (apologies for shameless
> self-promotion).


In the spirit of shameless self-promotion, I have done something [[
https://github.com/tarunprabhu/clang-plugin-examples | similar]] for clang
plugins too :-) .

 > CompilerInvocation.cpp deals with "option parsing" and "compiler
configuration". FrontendActions.cpp deals with  "running" the compiler.
These are very different stages in the compiler executation.

True, but even with actions, there may be those that would benefit from not
failing immediately. For instance, the `ParseArgs()` method in a
`PluginASTAction` may also report errors during option parsing that may
benefit from deferred failure (although I must confess that I don't know
exactly when a `PluginASTAction`'s `ParseArgs()` is run during the
compilation process -- in particular, whether it runs during or after the
other arguments have been parsed. I think I did trace the path at one
point, but I don't remember now).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220711/8a6cbfd5/attachment.html>


More information about the flang-commits mailing list