[PATCH] D120490: lld: Enable new passmanager plugin support for LTO
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 20:45:19 PDT 2022
MaskRay added inline comments.
================
Comment at: lld/ELF/Config.h:147
std::vector<uint8_t> buildIdVector;
+ std::vector<llvm::StringRef> passPlugins;
llvm::MapVector<std::pair<const InputSectionBase *, const InputSectionBase *>,
----------------
Move this before `std::vector<llvm::StringRef> searchPaths;`
================
Comment at: lld/ELF/LTO.cpp:147
c.UseNewPM = config->ltoNewPassManager;
+ for (const llvm::StringRef &PluginFN : config->passPlugins)
+ c.PassPlugins.push_back(std::string(PluginFN));
----------------
================
Comment at: lld/test/ELF/lto/ltopasses-extension.ll:5
+; RUN: ld.lld -%loadnewpmbye --lto-newpm-passes="goodbye" -mllvm=%loadbye -mllvm=-wave-goodbye %t.o 2>&1 | FileCheck %s
+; RUN: ld.lld -mllvm=%loadbye -mllvm=-wave-goodbye %t.o --plugin-opt=legacy-pass-manager 2>&1 | FileCheck %s
+; CHECK: Bye
----------------
We don't need legacy PM tests. It will go away soon.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120490/new/
https://reviews.llvm.org/D120490
More information about the llvm-commits
mailing list