[PATCH] D108283: [flang][driver] Add documentation for Plugins

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 23 16:37:52 PDT 2021


Meinersbur added a comment.

In D108283#2959060 <https://reviews.llvm.org/D108283#2959060>, @awarzynski wrote:

>> Note that clang/LLVM's newer `-fpass-plugin` has a different design that avoids global registries and instead calls a function in the loaded library.
>
> Avoiding global registries would be nice, so this is worth looking into, thanks!  Isn't -fpass-plugin <https://github.com/llvm/llvm-project/blob/40fd2d93c0ac694dce49e1d52f585752d011d884/clang/include/clang/Driver/Options.td#L2475-L2478>  for middle-end plugins though?

Yes, indeed. It was introduced with the new pass manager for new pass manager plugins. It seemed to me that this was the general direction the LLVM infrastructure would want to go for a plugin infrastructure. Clang's current plugin types cannot be changed for compatibility reasons, but new plugin types could also use this approach and potentially deprecate the old infrastructure.

This does not mean we have to re-do flang plugin not; if clang redesigns its frontend plugin infrastructure one day, I think it will be straightforward do apply the same to flang.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108283



More information about the llvm-commits mailing list