Index: lib/Support/RegisterPasses.cpp =================================================================== --- lib/Support/RegisterPasses.cpp +++ lib/Support/RegisterPasses.cpp @@ -42,6 +42,7 @@ #include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Verifier.h" #include "llvm/Passes/PassBuilder.h" +#include "llvm/Passes/PassPlugin.h" #include "llvm/Support/TargetSelect.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" @@ -703,3 +704,10 @@ // FIXME else Error? } } // namespace polly + +// Plugin Entrypoint: +extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK LLVM_PLUGIN_EXPORT +llvmGetPassPluginInfo() { + return {LLVM_PLUGIN_API_VERSION, "Polly", LLVM_VERSION_STRING, + polly::RegisterPollyPasses}; +} Index: test/lit.site.cfg.in =================================================================== --- test/lit.site.cfg.in +++ test/lit.site.cfg.in @@ -45,6 +45,8 @@ config.link_polly_into_tools.lower() == 'notfound' or \ config.link_polly_into_tools.lower() == 'link_polly_into_tools-notfound': config.substitutions.append(('%loadPolly', '-load ' + + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@' + + ' -load-pass-plugin ' + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@' + ' -polly-process-unprofitable ' + ' -polly-remarks-minimal '