[LLVM][NFC] Move PassPlugin from Passes to separate library#173279
Conversation
Created using spr 1.3.5-bogner
|
@llvm/pr-subscribers-llvm-analysis @llvm/pr-subscribers-flang-driver Author: Alexis Engelke (aengelke) ChangesThis avoid pulling in the entire Passes library with all passes as Full diff: https://github.com/llvm/llvm-project/pull/173279.diff 37 Files Affected:
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index cc6405614d025..a014b5e982cc3 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -41,8 +41,8 @@
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Object/OffloadBinary.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
#include "llvm/Passes/StandardInstrumentations.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/ProfileData/InstrProfCorrelator.h"
#include "llvm/Support/BuryPointer.h"
#include "llvm/Support/CommandLine.h"
diff --git a/clang/lib/CodeGen/CMakeLists.txt b/clang/lib/CodeGen/CMakeLists.txt
index ad9ef91c781a8..dbbc35b372f42 100644
--- a/clang/lib/CodeGen/CMakeLists.txt
+++ b/clang/lib/CodeGen/CMakeLists.txt
@@ -25,6 +25,7 @@ set(LLVM_LINK_COMPONENTS
ObjCARCOpts
Object
Passes
+ Plugins
ProfileData
ScalarOpts
Support
diff --git a/clang/tools/clang-linker-wrapper/CMakeLists.txt b/clang/tools/clang-linker-wrapper/CMakeLists.txt
index bf37d8031025e..0c2dea328f856 100644
--- a/clang/tools/clang-linker-wrapper/CMakeLists.txt
+++ b/clang/tools/clang-linker-wrapper/CMakeLists.txt
@@ -8,6 +8,7 @@ set(LLVM_LINK_COMPONENTS
TransformUtils
Analysis
Passes
+ Plugins
IRReader
Object
Option
diff --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
index fcb6c591ec5ca..48a3c5f97e375 100644
--- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
@@ -38,7 +38,7 @@
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptTable.h"
#include "llvm/Option/Option.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Errc.h"
diff --git a/flang/lib/Frontend/CMakeLists.txt b/flang/lib/Frontend/CMakeLists.txt
index fb74b3dcb280e..4ebe497e65676 100644
--- a/flang/lib/Frontend/CMakeLists.txt
+++ b/flang/lib/Frontend/CMakeLists.txt
@@ -46,6 +46,7 @@ add_flang_library(flangFrontend
LINK_COMPONENTS
Passes
+ Plugins
Analysis
BitReader
Extensions
diff --git a/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp
index f7b99a19d50a9..5c0311ccab8fd 100644
--- a/flang/lib/Frontend/FrontendActions.cpp
+++ b/flang/lib/Frontend/FrontendActions.cpp
@@ -55,8 +55,8 @@
#include "llvm/Linker/Linker.h"
#include "llvm/Object/OffloadBinary.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
#include "llvm/Passes/StandardInstrumentations.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/ProfileData/InstrProfCorrelator.h"
#include "llvm/Support/AMDGPUAddrSpace.h"
#include "llvm/Support/Error.h"
diff --git a/llvm/examples/Bye/Bye.cpp b/llvm/examples/Bye/Bye.cpp
index 4d612e2350a01..b476ab72a65f2 100644
--- a/llvm/examples/Bye/Bye.cpp
+++ b/llvm/examples/Bye/Bye.cpp
@@ -2,7 +2,7 @@
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Pass.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/examples/IRTransforms/SimplifyCFG.cpp b/llvm/examples/IRTransforms/SimplifyCFG.cpp
index 722f5c0ec9dc6..bf72643eeb62b 100644
--- a/llvm/examples/IRTransforms/SimplifyCFG.cpp
+++ b/llvm/examples/IRTransforms/SimplifyCFG.cpp
@@ -38,7 +38,7 @@
#include "llvm/IR/PassManager.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
using namespace llvm;
diff --git a/llvm/include/llvm/Passes/PassPlugin.h b/llvm/include/llvm/Plugins/PassPlugin.h
similarity index 96%
rename from llvm/include/llvm/Passes/PassPlugin.h
rename to llvm/include/llvm/Plugins/PassPlugin.h
index c1840b0fabfdb..6ca53b4407f25 100644
--- a/llvm/include/llvm/Passes/PassPlugin.h
+++ b/llvm/include/llvm/Plugins/PassPlugin.h
@@ -1,4 +1,4 @@
-//===- llvm/Passes/PassPlugin.h - Public Plugin API -----------------------===//
+//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_PASSES_PASSPLUGIN_H
-#define LLVM_PASSES_PASSPLUGIN_H
+#ifndef LLVM_PLUGINS_PASSPLUGIN_H
+#define LLVM_PLUGINS_PASSPLUGIN_H
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/CodeGen.h"
@@ -112,7 +112,7 @@ class PassPlugin {
sys::DynamicLibrary Library;
PassPluginLibraryInfo Info;
};
-}
+} // namespace llvm
// The function returns a struct with default initializers.
#ifdef __clang__
@@ -139,4 +139,4 @@ llvmGetPassPluginInfo();
#pragma clang diagnostic pop
#endif
-#endif /* LLVM_PASSES_PASSPLUGIN_H */
+#endif /* LLVM_PLUGINS_PASSPLUGIN_H */
diff --git a/llvm/lib/CMakeLists.txt b/llvm/lib/CMakeLists.txt
index a9432977718c6..d1c4ff5fb713f 100644
--- a/llvm/lib/CMakeLists.txt
+++ b/llvm/lib/CMakeLists.txt
@@ -41,6 +41,7 @@ add_subdirectory(AsmParser)
add_subdirectory(LineEditor)
add_subdirectory(ProfileData)
add_subdirectory(Passes)
+add_subdirectory(Plugins)
add_subdirectory(TargetParser)
add_subdirectory(TextAPI)
add_subdirectory(Telemetry)
diff --git a/llvm/lib/Extensions/Extensions.cpp b/llvm/lib/Extensions/Extensions.cpp
index 0d25cbda38e00..3e9f76d123080 100644
--- a/llvm/lib/Extensions/Extensions.cpp
+++ b/llvm/lib/Extensions/Extensions.cpp
@@ -1,4 +1,4 @@
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#define HANDLE_EXTENSION(Ext) \
llvm::PassPluginLibraryInfo get##Ext##PluginInfo();
#include "llvm/Support/Extension.def"
diff --git a/llvm/lib/LTO/CMakeLists.txt b/llvm/lib/LTO/CMakeLists.txt
index 057d73b6349cf..cf455ff04c112 100644
--- a/llvm/lib/LTO/CMakeLists.txt
+++ b/llvm/lib/LTO/CMakeLists.txt
@@ -34,6 +34,7 @@ add_llvm_component_library(LLVMLTO
ObjCARC
Object
Passes
+ Plugins
Remarks
Scalar
Support
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 49b412c9a2991..e998ac961e24a 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -30,8 +30,8 @@
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Object/ModuleSymbolTable.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
#include "llvm/Passes/StandardInstrumentations.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
diff --git a/llvm/lib/Passes/CMakeLists.txt b/llvm/lib/Passes/CMakeLists.txt
index 91c8c4f67074d..5d7cd3689f3ff 100644
--- a/llvm/lib/Passes/CMakeLists.txt
+++ b/llvm/lib/Passes/CMakeLists.txt
@@ -4,7 +4,6 @@ add_llvm_component_library(LLVMPasses
PassBuilder.cpp
PassBuilderBindings.cpp
PassBuilderPipelines.cpp
- PassPlugin.cpp
StandardInstrumentations.cpp
ADDITIONAL_HEADER_DIRS
diff --git a/llvm/lib/Plugins/CMakeLists.txt b/llvm/lib/Plugins/CMakeLists.txt
new file mode 100644
index 0000000000000..564be0c403d8e
--- /dev/null
+++ b/llvm/lib/Plugins/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_llvm_component_library(LLVMPlugins
+ PassPlugin.cpp
+
+ LINK_COMPONENTS
+ Support
+)
diff --git a/llvm/lib/Passes/PassPlugin.cpp b/llvm/lib/Plugins/PassPlugin.cpp
similarity index 93%
rename from llvm/lib/Passes/PassPlugin.cpp
rename to llvm/lib/Plugins/PassPlugin.cpp
index 201f5eef080c3..84d55fc513b78 100644
--- a/llvm/lib/Passes/PassPlugin.cpp
+++ b/llvm/lib/Plugins/PassPlugin.cpp
@@ -1,4 +1,4 @@
-//===- lib/Passes/PassPluginLoader.cpp - Load Plugins for New PM Passes ---===//
+//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdint>
diff --git a/llvm/tools/bugpoint/CMakeLists.txt b/llvm/tools/bugpoint/CMakeLists.txt
index 3c42af115b17a..03297416e68a7 100644
--- a/llvm/tools/bugpoint/CMakeLists.txt
+++ b/llvm/tools/bugpoint/CMakeLists.txt
@@ -14,6 +14,7 @@ set(LLVM_LINK_COMPONENTS
InstCombine
Instrumentation
Linker
+ Plugins
ObjCARCOpts
ScalarOpts
Support
diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp
index 52ed135e8bb3e..7f1510aea9594 100644
--- a/llvm/tools/bugpoint/bugpoint.cpp
+++ b/llvm/tools/bugpoint/bugpoint.cpp
@@ -21,7 +21,7 @@
#include "llvm/InitializePasses.h"
#include "llvm/LinkAllIR.h"
#include "llvm/LinkAllPasses.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/AlwaysTrue.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/InitLLVM.h"
diff --git a/llvm/tools/llc/CMakeLists.txt b/llvm/tools/llc/CMakeLists.txt
index 01825c6e4c64c..5be7db67a5f9e 100644
--- a/llvm/tools/llc/CMakeLists.txt
+++ b/llvm/tools/llc/CMakeLists.txt
@@ -13,6 +13,7 @@ set(LLVM_LINK_COMPONENTS
MC
MIRParser
Passes
+ Plugins
Remarks
ScalarOpts
SelectionDAG
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 9f5bec2eeae62..3a23b9476bad0 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -40,7 +40,7 @@
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Pass.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
diff --git a/llvm/tools/llvm-lto2/CMakeLists.txt b/llvm/tools/llvm-lto2/CMakeLists.txt
index 3b4644d6e2771..60ddce1898a6b 100644
--- a/llvm/tools/llvm-lto2/CMakeLists.txt
+++ b/llvm/tools/llvm-lto2/CMakeLists.txt
@@ -11,6 +11,7 @@ set(LLVM_LINK_COMPONENTS
MC
Object
Passes
+ Plugins
Support
Target
TargetParser
diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp
index ca6864cbf9b91..25f08764408db 100644
--- a/llvm/tools/llvm-lto2/llvm-lto2.cpp
+++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp
@@ -20,7 +20,7 @@
#include "llvm/CodeGen/CommandFlags.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/LTO/LTO.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/Caching.h"
#include "llvm/Support/CommandLine.h"
diff --git a/llvm/tools/opt/CMakeLists.txt b/llvm/tools/opt/CMakeLists.txt
index 6dd74ae1b7f8f..0c5d356c9cfae 100644
--- a/llvm/tools/opt/CMakeLists.txt
+++ b/llvm/tools/opt/CMakeLists.txt
@@ -19,6 +19,7 @@ set(LLVM_LINK_COMPONENTS
Instrumentation
MC
ObjCARCOpts
+ Plugins
Remarks
ScalarOpts
Support
diff --git a/llvm/tools/opt/NewPMDriver.cpp b/llvm/tools/opt/NewPMDriver.cpp
index eaa1d8f958a4d..2f57ae6d045e3 100644
--- a/llvm/tools/opt/NewPMDriver.cpp
+++ b/llvm/tools/opt/NewPMDriver.cpp
@@ -30,8 +30,8 @@
#include "llvm/IR/Verifier.h"
#include "llvm/IRPrinter/IRPrintingPasses.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
#include "llvm/Passes/StandardInstrumentations.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/ToolOutputFile.h"
diff --git a/llvm/tools/opt/optdriver.cpp b/llvm/tools/opt/optdriver.cpp
index e8fd5befa1d1d..b0c2733758948 100644
--- a/llvm/tools/opt/optdriver.cpp
+++ b/llvm/tools/opt/optdriver.cpp
@@ -39,7 +39,7 @@
#include "llvm/LinkAllPasses.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/TargetRegistry.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
diff --git a/llvm/unittests/Analysis/CMakeLists.txt b/llvm/unittests/Analysis/CMakeLists.txt
index cd04a779b9467..50bf4539e7984 100644
--- a/llvm/unittests/Analysis/CMakeLists.txt
+++ b/llvm/unittests/Analysis/CMakeLists.txt
@@ -5,6 +5,7 @@ set(LLVM_LINK_COMPONENTS
Core
Instrumentation
Passes
+ Plugins
Support
TargetParser
TransformUtils
diff --git a/llvm/unittests/Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp b/llvm/unittests/Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp
index beefff2b3b106..498a77271b257 100644
--- a/llvm/unittests/Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp
+++ b/llvm/unittests/Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp
@@ -2,7 +2,7 @@
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/unittests/Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp b/llvm/unittests/Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp
index 9c46c1b8e22ba..6fe54c24d70c1 100644
--- a/llvm/unittests/Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp
+++ b/llvm/unittests/Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp
@@ -2,7 +2,7 @@
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp b/llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp
index ca4ea8b627e83..0218543e9e6cb 100644
--- a/llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp
+++ b/llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp
@@ -3,7 +3,7 @@
#include "llvm/Config/config.h"
#include "llvm/IR/Module.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Testing/Support/Error.h"
diff --git a/llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp b/llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp
index 0b31b0892d75a..cb2d23c9bad9a 100644
--- a/llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp
+++ b/llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp
@@ -3,7 +3,7 @@
#include "llvm/Config/config.h"
#include "llvm/IR/Module.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Testing/Support/Error.h"
diff --git a/llvm/unittests/Passes/Plugins/CMakeLists.txt b/llvm/unittests/Passes/Plugins/CMakeLists.txt
index 9fd543db39c8e..709b00080afaa 100644
--- a/llvm/unittests/Passes/Plugins/CMakeLists.txt
+++ b/llvm/unittests/Passes/Plugins/CMakeLists.txt
@@ -3,7 +3,7 @@
# work with DLLs on Windows (where a shared library can't have undefined
# references), so just skip this testcase on Windows.
if (NOT WIN32 AND NOT CYGWIN)
- set(LLVM_LINK_COMPONENTS Support Passes Core AsmParser)
+ set(LLVM_LINK_COMPONENTS Support Passes Plugins Core AsmParser)
add_llvm_unittest(PluginsTests
PluginsTest.cpp
diff --git a/llvm/unittests/Passes/Plugins/DoublerPlugin/DoublerPlugin.cpp b/llvm/unittests/Passes/Plugins/DoublerPlugin/DoublerPlugin.cpp
index 102b13cf19bab..23e66cf7192f8 100644
--- a/llvm/unittests/Passes/Plugins/DoublerPlugin/DoublerPlugin.cpp
+++ b/llvm/unittests/Passes/Plugins/DoublerPlugin/DoublerPlugin.cpp
@@ -9,7 +9,7 @@
#include "llvm/IR/Module.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
using namespace llvm;
diff --git a/llvm/unittests/Passes/Plugins/PluginsTest.cpp b/llvm/unittests/Passes/Plugins/PluginsTest.cpp
index b1f09e966d6e5..d4d519eb52a53 100644
--- a/llvm/unittests/Passes/Plugins/PluginsTest.cpp
+++ b/llvm/unittests/Passes/Plugins/PluginsTest.cpp
@@ -13,7 +13,7 @@
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SourceMgr.h"
diff --git a/llvm/unittests/Passes/Plugins/TestPlugin/TestPlugin.cpp b/llvm/unittests/Passes/Plugins/TestPlugin/TestPlugin.cpp
index f9623b700172a..5a0bcdb10fb3c 100644
--- a/llvm/unittests/Passes/Plugins/TestPlugin/TestPlugin.cpp
+++ b/llvm/unittests/Passes/Plugins/TestPlugin/TestPlugin.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "../TestPlugin.h"
diff --git a/polly/lib/CMakeLists.txt b/polly/lib/CMakeLists.txt
index 7c609fda0a61a..41c3b97764ac7 100644
--- a/polly/lib/CMakeLists.txt
+++ b/polly/lib/CMakeLists.txt
@@ -24,6 +24,7 @@ set(POLLY_COMPONENTS
ipo
MC
Passes
+ Plugins
Linker
IRReader
Analysis
diff --git a/polly/lib/Plugin/Polly.cpp b/polly/lib/Plugin/Polly.cpp
index f567d37c07eab..8dadb7da67fb9 100644
--- a/polly/lib/Plugin/Polly.cpp
+++ b/polly/lib/Plugin/Polly.cpp
@@ -10,7 +10,7 @@
#include "polly/RegisterPasses.h"
#include "llvm/PassRegistry.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
// Pass Plugin Entrypoints
diff --git a/polly/lib/Support/RegisterPasses.cpp b/polly/lib/Support/RegisterPasses.cpp
index a430beebae7b1..ca96feec9bcf5 100644
--- a/polly/lib/Support/RegisterPasses.cpp
+++ b/polly/lib/Support/RegisterPasses.cpp
@@ -46,7 +46,7 @@
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/TargetSelect.h"
|
|
@llvm/pr-subscribers-lto Author: Alexis Engelke (aengelke) ChangesThis avoid pulling in the entire Passes library with all passes as Full diff: https://github.com/llvm/llvm-project/pull/173279.diff 37 Files Affected:
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index cc6405614d025..a014b5e982cc3 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -41,8 +41,8 @@
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Object/OffloadBinary.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
#include "llvm/Passes/StandardInstrumentations.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/ProfileData/InstrProfCorrelator.h"
#include "llvm/Support/BuryPointer.h"
#include "llvm/Support/CommandLine.h"
diff --git a/clang/lib/CodeGen/CMakeLists.txt b/clang/lib/CodeGen/CMakeLists.txt
index ad9ef91c781a8..dbbc35b372f42 100644
--- a/clang/lib/CodeGen/CMakeLists.txt
+++ b/clang/lib/CodeGen/CMakeLists.txt
@@ -25,6 +25,7 @@ set(LLVM_LINK_COMPONENTS
ObjCARCOpts
Object
Passes
+ Plugins
ProfileData
ScalarOpts
Support
diff --git a/clang/tools/clang-linker-wrapper/CMakeLists.txt b/clang/tools/clang-linker-wrapper/CMakeLists.txt
index bf37d8031025e..0c2dea328f856 100644
--- a/clang/tools/clang-linker-wrapper/CMakeLists.txt
+++ b/clang/tools/clang-linker-wrapper/CMakeLists.txt
@@ -8,6 +8,7 @@ set(LLVM_LINK_COMPONENTS
TransformUtils
Analysis
Passes
+ Plugins
IRReader
Object
Option
diff --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
index fcb6c591ec5ca..48a3c5f97e375 100644
--- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
@@ -38,7 +38,7 @@
#include "llvm/Option/ArgList.h"
#include "llvm/Option/OptTable.h"
#include "llvm/Option/Option.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Errc.h"
diff --git a/flang/lib/Frontend/CMakeLists.txt b/flang/lib/Frontend/CMakeLists.txt
index fb74b3dcb280e..4ebe497e65676 100644
--- a/flang/lib/Frontend/CMakeLists.txt
+++ b/flang/lib/Frontend/CMakeLists.txt
@@ -46,6 +46,7 @@ add_flang_library(flangFrontend
LINK_COMPONENTS
Passes
+ Plugins
Analysis
BitReader
Extensions
diff --git a/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp
index f7b99a19d50a9..5c0311ccab8fd 100644
--- a/flang/lib/Frontend/FrontendActions.cpp
+++ b/flang/lib/Frontend/FrontendActions.cpp
@@ -55,8 +55,8 @@
#include "llvm/Linker/Linker.h"
#include "llvm/Object/OffloadBinary.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
#include "llvm/Passes/StandardInstrumentations.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/ProfileData/InstrProfCorrelator.h"
#include "llvm/Support/AMDGPUAddrSpace.h"
#include "llvm/Support/Error.h"
diff --git a/llvm/examples/Bye/Bye.cpp b/llvm/examples/Bye/Bye.cpp
index 4d612e2350a01..b476ab72a65f2 100644
--- a/llvm/examples/Bye/Bye.cpp
+++ b/llvm/examples/Bye/Bye.cpp
@@ -2,7 +2,7 @@
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/Pass.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/examples/IRTransforms/SimplifyCFG.cpp b/llvm/examples/IRTransforms/SimplifyCFG.cpp
index 722f5c0ec9dc6..bf72643eeb62b 100644
--- a/llvm/examples/IRTransforms/SimplifyCFG.cpp
+++ b/llvm/examples/IRTransforms/SimplifyCFG.cpp
@@ -38,7 +38,7 @@
#include "llvm/IR/PassManager.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
using namespace llvm;
diff --git a/llvm/include/llvm/Passes/PassPlugin.h b/llvm/include/llvm/Plugins/PassPlugin.h
similarity index 96%
rename from llvm/include/llvm/Passes/PassPlugin.h
rename to llvm/include/llvm/Plugins/PassPlugin.h
index c1840b0fabfdb..6ca53b4407f25 100644
--- a/llvm/include/llvm/Passes/PassPlugin.h
+++ b/llvm/include/llvm/Plugins/PassPlugin.h
@@ -1,4 +1,4 @@
-//===- llvm/Passes/PassPlugin.h - Public Plugin API -----------------------===//
+//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_PASSES_PASSPLUGIN_H
-#define LLVM_PASSES_PASSPLUGIN_H
+#ifndef LLVM_PLUGINS_PASSPLUGIN_H
+#define LLVM_PLUGINS_PASSPLUGIN_H
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/CodeGen.h"
@@ -112,7 +112,7 @@ class PassPlugin {
sys::DynamicLibrary Library;
PassPluginLibraryInfo Info;
};
-}
+} // namespace llvm
// The function returns a struct with default initializers.
#ifdef __clang__
@@ -139,4 +139,4 @@ llvmGetPassPluginInfo();
#pragma clang diagnostic pop
#endif
-#endif /* LLVM_PASSES_PASSPLUGIN_H */
+#endif /* LLVM_PLUGINS_PASSPLUGIN_H */
diff --git a/llvm/lib/CMakeLists.txt b/llvm/lib/CMakeLists.txt
index a9432977718c6..d1c4ff5fb713f 100644
--- a/llvm/lib/CMakeLists.txt
+++ b/llvm/lib/CMakeLists.txt
@@ -41,6 +41,7 @@ add_subdirectory(AsmParser)
add_subdirectory(LineEditor)
add_subdirectory(ProfileData)
add_subdirectory(Passes)
+add_subdirectory(Plugins)
add_subdirectory(TargetParser)
add_subdirectory(TextAPI)
add_subdirectory(Telemetry)
diff --git a/llvm/lib/Extensions/Extensions.cpp b/llvm/lib/Extensions/Extensions.cpp
index 0d25cbda38e00..3e9f76d123080 100644
--- a/llvm/lib/Extensions/Extensions.cpp
+++ b/llvm/lib/Extensions/Extensions.cpp
@@ -1,4 +1,4 @@
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#define HANDLE_EXTENSION(Ext) \
llvm::PassPluginLibraryInfo get##Ext##PluginInfo();
#include "llvm/Support/Extension.def"
diff --git a/llvm/lib/LTO/CMakeLists.txt b/llvm/lib/LTO/CMakeLists.txt
index 057d73b6349cf..cf455ff04c112 100644
--- a/llvm/lib/LTO/CMakeLists.txt
+++ b/llvm/lib/LTO/CMakeLists.txt
@@ -34,6 +34,7 @@ add_llvm_component_library(LLVMLTO
ObjCARC
Object
Passes
+ Plugins
Remarks
Scalar
Support
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 49b412c9a2991..e998ac961e24a 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -30,8 +30,8 @@
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Object/ModuleSymbolTable.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
#include "llvm/Passes/StandardInstrumentations.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
diff --git a/llvm/lib/Passes/CMakeLists.txt b/llvm/lib/Passes/CMakeLists.txt
index 91c8c4f67074d..5d7cd3689f3ff 100644
--- a/llvm/lib/Passes/CMakeLists.txt
+++ b/llvm/lib/Passes/CMakeLists.txt
@@ -4,7 +4,6 @@ add_llvm_component_library(LLVMPasses
PassBuilder.cpp
PassBuilderBindings.cpp
PassBuilderPipelines.cpp
- PassPlugin.cpp
StandardInstrumentations.cpp
ADDITIONAL_HEADER_DIRS
diff --git a/llvm/lib/Plugins/CMakeLists.txt b/llvm/lib/Plugins/CMakeLists.txt
new file mode 100644
index 0000000000000..564be0c403d8e
--- /dev/null
+++ b/llvm/lib/Plugins/CMakeLists.txt
@@ -0,0 +1,6 @@
+add_llvm_component_library(LLVMPlugins
+ PassPlugin.cpp
+
+ LINK_COMPONENTS
+ Support
+)
diff --git a/llvm/lib/Passes/PassPlugin.cpp b/llvm/lib/Plugins/PassPlugin.cpp
similarity index 93%
rename from llvm/lib/Passes/PassPlugin.cpp
rename to llvm/lib/Plugins/PassPlugin.cpp
index 201f5eef080c3..84d55fc513b78 100644
--- a/llvm/lib/Passes/PassPlugin.cpp
+++ b/llvm/lib/Plugins/PassPlugin.cpp
@@ -1,4 +1,4 @@
-//===- lib/Passes/PassPluginLoader.cpp - Load Plugins for New PM Passes ---===//
+//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdint>
diff --git a/llvm/tools/bugpoint/CMakeLists.txt b/llvm/tools/bugpoint/CMakeLists.txt
index 3c42af115b17a..03297416e68a7 100644
--- a/llvm/tools/bugpoint/CMakeLists.txt
+++ b/llvm/tools/bugpoint/CMakeLists.txt
@@ -14,6 +14,7 @@ set(LLVM_LINK_COMPONENTS
InstCombine
Instrumentation
Linker
+ Plugins
ObjCARCOpts
ScalarOpts
Support
diff --git a/llvm/tools/bugpoint/bugpoint.cpp b/llvm/tools/bugpoint/bugpoint.cpp
index 52ed135e8bb3e..7f1510aea9594 100644
--- a/llvm/tools/bugpoint/bugpoint.cpp
+++ b/llvm/tools/bugpoint/bugpoint.cpp
@@ -21,7 +21,7 @@
#include "llvm/InitializePasses.h"
#include "llvm/LinkAllIR.h"
#include "llvm/LinkAllPasses.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/AlwaysTrue.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/InitLLVM.h"
diff --git a/llvm/tools/llc/CMakeLists.txt b/llvm/tools/llc/CMakeLists.txt
index 01825c6e4c64c..5be7db67a5f9e 100644
--- a/llvm/tools/llc/CMakeLists.txt
+++ b/llvm/tools/llc/CMakeLists.txt
@@ -13,6 +13,7 @@ set(LLVM_LINK_COMPONENTS
MC
MIRParser
Passes
+ Plugins
Remarks
ScalarOpts
SelectionDAG
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index 9f5bec2eeae62..3a23b9476bad0 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -40,7 +40,7 @@
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Pass.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
diff --git a/llvm/tools/llvm-lto2/CMakeLists.txt b/llvm/tools/llvm-lto2/CMakeLists.txt
index 3b4644d6e2771..60ddce1898a6b 100644
--- a/llvm/tools/llvm-lto2/CMakeLists.txt
+++ b/llvm/tools/llvm-lto2/CMakeLists.txt
@@ -11,6 +11,7 @@ set(LLVM_LINK_COMPONENTS
MC
Object
Passes
+ Plugins
Support
Target
TargetParser
diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp
index ca6864cbf9b91..25f08764408db 100644
--- a/llvm/tools/llvm-lto2/llvm-lto2.cpp
+++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp
@@ -20,7 +20,7 @@
#include "llvm/CodeGen/CommandFlags.h"
#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/LTO/LTO.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/Caching.h"
#include "llvm/Support/CommandLine.h"
diff --git a/llvm/tools/opt/CMakeLists.txt b/llvm/tools/opt/CMakeLists.txt
index 6dd74ae1b7f8f..0c5d356c9cfae 100644
--- a/llvm/tools/opt/CMakeLists.txt
+++ b/llvm/tools/opt/CMakeLists.txt
@@ -19,6 +19,7 @@ set(LLVM_LINK_COMPONENTS
Instrumentation
MC
ObjCARCOpts
+ Plugins
Remarks
ScalarOpts
Support
diff --git a/llvm/tools/opt/NewPMDriver.cpp b/llvm/tools/opt/NewPMDriver.cpp
index eaa1d8f958a4d..2f57ae6d045e3 100644
--- a/llvm/tools/opt/NewPMDriver.cpp
+++ b/llvm/tools/opt/NewPMDriver.cpp
@@ -30,8 +30,8 @@
#include "llvm/IR/Verifier.h"
#include "llvm/IRPrinter/IRPrintingPasses.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
#include "llvm/Passes/StandardInstrumentations.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/ToolOutputFile.h"
diff --git a/llvm/tools/opt/optdriver.cpp b/llvm/tools/opt/optdriver.cpp
index e8fd5befa1d1d..b0c2733758948 100644
--- a/llvm/tools/opt/optdriver.cpp
+++ b/llvm/tools/opt/optdriver.cpp
@@ -39,7 +39,7 @@
#include "llvm/LinkAllPasses.h"
#include "llvm/MC/MCTargetOptionsCommandFlags.h"
#include "llvm/MC/TargetRegistry.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Remarks/HotnessThresholdParser.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
diff --git a/llvm/unittests/Analysis/CMakeLists.txt b/llvm/unittests/Analysis/CMakeLists.txt
index cd04a779b9467..50bf4539e7984 100644
--- a/llvm/unittests/Analysis/CMakeLists.txt
+++ b/llvm/unittests/Analysis/CMakeLists.txt
@@ -5,6 +5,7 @@ set(LLVM_LINK_COMPONENTS
Core
Instrumentation
Passes
+ Plugins
Support
TargetParser
TransformUtils
diff --git a/llvm/unittests/Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp b/llvm/unittests/Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp
index beefff2b3b106..498a77271b257 100644
--- a/llvm/unittests/Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp
+++ b/llvm/unittests/Analysis/InlineAdvisorPlugin/InlineAdvisorPlugin.cpp
@@ -2,7 +2,7 @@
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/unittests/Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp b/llvm/unittests/Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp
index 9c46c1b8e22ba..6fe54c24d70c1 100644
--- a/llvm/unittests/Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp
+++ b/llvm/unittests/Analysis/InlineOrderPlugin/InlineOrderPlugin.cpp
@@ -2,7 +2,7 @@
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
diff --git a/llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp b/llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp
index ca4ea8b627e83..0218543e9e6cb 100644
--- a/llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp
+++ b/llvm/unittests/Analysis/PluginInlineAdvisorAnalysisTest.cpp
@@ -3,7 +3,7 @@
#include "llvm/Config/config.h"
#include "llvm/IR/Module.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Testing/Support/Error.h"
diff --git a/llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp b/llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp
index 0b31b0892d75a..cb2d23c9bad9a 100644
--- a/llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp
+++ b/llvm/unittests/Analysis/PluginInlineOrderAnalysisTest.cpp
@@ -3,7 +3,7 @@
#include "llvm/Config/config.h"
#include "llvm/IR/Module.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Testing/Support/Error.h"
diff --git a/llvm/unittests/Passes/Plugins/CMakeLists.txt b/llvm/unittests/Passes/Plugins/CMakeLists.txt
index 9fd543db39c8e..709b00080afaa 100644
--- a/llvm/unittests/Passes/Plugins/CMakeLists.txt
+++ b/llvm/unittests/Passes/Plugins/CMakeLists.txt
@@ -3,7 +3,7 @@
# work with DLLs on Windows (where a shared library can't have undefined
# references), so just skip this testcase on Windows.
if (NOT WIN32 AND NOT CYGWIN)
- set(LLVM_LINK_COMPONENTS Support Passes Core AsmParser)
+ set(LLVM_LINK_COMPONENTS Support Passes Plugins Core AsmParser)
add_llvm_unittest(PluginsTests
PluginsTest.cpp
diff --git a/llvm/unittests/Passes/Plugins/DoublerPlugin/DoublerPlugin.cpp b/llvm/unittests/Passes/Plugins/DoublerPlugin/DoublerPlugin.cpp
index 102b13cf19bab..23e66cf7192f8 100644
--- a/llvm/unittests/Passes/Plugins/DoublerPlugin/DoublerPlugin.cpp
+++ b/llvm/unittests/Passes/Plugins/DoublerPlugin/DoublerPlugin.cpp
@@ -9,7 +9,7 @@
#include "llvm/IR/Module.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
using namespace llvm;
diff --git a/llvm/unittests/Passes/Plugins/PluginsTest.cpp b/llvm/unittests/Passes/Plugins/PluginsTest.cpp
index b1f09e966d6e5..d4d519eb52a53 100644
--- a/llvm/unittests/Passes/Plugins/PluginsTest.cpp
+++ b/llvm/unittests/Passes/Plugins/PluginsTest.cpp
@@ -13,7 +13,7 @@
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SourceMgr.h"
diff --git a/llvm/unittests/Passes/Plugins/TestPlugin/TestPlugin.cpp b/llvm/unittests/Passes/Plugins/TestPlugin/TestPlugin.cpp
index f9623b700172a..5a0bcdb10fb3c 100644
--- a/llvm/unittests/Passes/Plugins/TestPlugin/TestPlugin.cpp
+++ b/llvm/unittests/Passes/Plugins/TestPlugin/TestPlugin.cpp
@@ -7,7 +7,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "../TestPlugin.h"
diff --git a/polly/lib/CMakeLists.txt b/polly/lib/CMakeLists.txt
index 7c609fda0a61a..41c3b97764ac7 100644
--- a/polly/lib/CMakeLists.txt
+++ b/polly/lib/CMakeLists.txt
@@ -24,6 +24,7 @@ set(POLLY_COMPONENTS
ipo
MC
Passes
+ Plugins
Linker
IRReader
Analysis
diff --git a/polly/lib/Plugin/Polly.cpp b/polly/lib/Plugin/Polly.cpp
index f567d37c07eab..8dadb7da67fb9 100644
--- a/polly/lib/Plugin/Polly.cpp
+++ b/polly/lib/Plugin/Polly.cpp
@@ -10,7 +10,7 @@
#include "polly/RegisterPasses.h"
#include "llvm/PassRegistry.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
// Pass Plugin Entrypoints
diff --git a/polly/lib/Support/RegisterPasses.cpp b/polly/lib/Support/RegisterPasses.cpp
index a430beebae7b1..ca96feec9bcf5 100644
--- a/polly/lib/Support/RegisterPasses.cpp
+++ b/polly/lib/Support/RegisterPasses.cpp
@@ -46,7 +46,7 @@
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Passes/PassBuilder.h"
-#include "llvm/Passes/PassPlugin.h"
+#include "llvm/Plugins/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/TargetSelect.h"
|
|
I still think that a separate library is a little overkill for this short single single file, but it also doesn't really fit anywhere else... |
nikic
left a comment
There was a problem hiding this comment.
I don't have a better suggestion, so LGTM.
This avoid pulling in the entire Passes library with all passes as dependencies when just referring to PassPlugin, which is in fact independent of the Passes themselves. Pull Request: llvm/llvm-project#173279
Accommodate LLVM PassPlugin rename LLVM [recently moved](llvm/llvm-project#173279) their `PassPlugin` files to a new folder. This PR updates our `PassWrapper` to point to the new location.
Rollup merge of #150394 - DKLoehr:passplugin, r=nikic Accommodate LLVM PassPlugin rename LLVM [recently moved](llvm/llvm-project#173279) their `PassPlugin` files to a new folder. This PR updates our `PassWrapper` to point to the new location.
Accommodate LLVM PassPlugin rename LLVM [recently moved](llvm/llvm-project#173279) their `PassPlugin` files to a new folder. This PR updates our `PassWrapper` to point to the new location.
This avoid pulling in the entire Passes library with all passes as dependencies when just referring to PassPlugin, which is in fact independent of the Passes themselves. Pull Request: llvm#173279
…171868) This permits pass plugins to use llvm::cl::opt. Additionally, add a test of -fpass-plugin, this was previously not tested at all. I'm not sure whether using the LLVM Bye.so in the tests is possible this way (e.g., if Clang is built standalone). Reland after llvm#173279. Pull Request: llvm#173287
This avoid pulling in the entire Passes library with all passes as dependencies when just referring to PassPlugin, which is in fact independent of the Passes themselves. Pull Request: llvm/llvm-project#173279 (cherry picked from commit f54df0d)
### Rationale for this change Some of our CI jobs fail because conda jobs are pulling LLVM 22.1.0 and we are not compatible. ### What changes are included in this PR? Add 22.1.0 as compatible LLVM and minor fix to update the location of PassPlugin.h due to: - llvm/llvm-project#173279 ### Are these changes tested? Yes via CI ### Are there any user-facing changes? No, the only change is that LLVM 22.1.0 will be supported. * GitHub Issue: #49428 Lead-authored-by: Raúl Cumplido <raulcumplido@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
) ### Rationale for this change Some of our CI jobs fail because conda jobs are pulling LLVM 22.1.0 and we are not compatible. ### What changes are included in this PR? Add 22.1.0 as compatible LLVM and minor fix to update the location of PassPlugin.h due to: - llvm/llvm-project#173279 ### Are these changes tested? Yes via CI ### Are there any user-facing changes? No, the only change is that LLVM 22.1.0 will be supported. * GitHub Issue: apache#49428 Lead-authored-by: Raúl Cumplido <raulcumplido@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
This avoid pulling in the entire Passes library with all passes as
dependencies when just referring to PassPlugin, which is in fact
independent of the Passes themselves.