[Flang] Allow registering plugin extensions with the pass builder
authorUsman Nadeem <mnadeem@quicinc.com>
Thu, 10 Nov 2022 22:09:51 +0000 (14:09 -0800)
committerUsman Nadeem <mnadeem@quicinc.com>
Thu, 10 Nov 2022 22:16:15 +0000 (14:16 -0800)
commitd34dce25d9585305c1d7a89f16a259bbbf62ff2b
tree8123f4b90bd257a476708a8e2377d2c940115651
parentfbc2c8f2fbbb7fbc9a88ad64ac83de888d505d27
[Flang] Allow registering plugin extensions with the pass builder

Pass plugins are compiled and linked dynamically by default. Setting
`LLVM_${NAME}_LINK_INTO_TOOLS` to `ON` turns the project into a
statically linked extension. Projects like Polly can be used this way by
adding `-DLLVM_POLLY_LINK_INTO_TOOLS=ON` to the `cmake` command.

The changes in this patch makes the PassBuilder in Flang aware of
statically linked pass plugins, see the documentation for more details:
https://github.com/llvm/llvm-project/blob/main/llvm/docs/WritingAnLLVMNewPMPass.rst#id21

Differential Revision: https://reviews.llvm.org/D137673

Change-Id: Id1aa501dcb4821d0ec779f375cc8e8d6b0b92fce
flang/docs/FlangDriver.md
flang/docs/ReleaseNotes.md
flang/lib/Frontend/CMakeLists.txt
flang/lib/Frontend/FrontendActions.cpp
flang/test/CMakeLists.txt
flang/test/Driver/pass-plugin.f90
flang/test/lit.cfg.py
flang/test/lit.site.cfg.py.in