[PATCH] D120490: lld: Enable new passmanager plugin support for LTO
Raphael Isemann via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 24 13:42:44 PST 2022
teemperor added a comment.
Just some drive-by comments, but in general I think this would be nice to get fixed.
================
Comment at: lld/ELF/Config.h:147
std::vector<uint8_t> buildIdVector;
+ std::vector<std::string> PassPlugins;
llvm::MapVector<std::pair<const InputSectionBase *, const InputSectionBase *>,
----------------
================
Comment at: lld/ELF/Driver.cpp:1255-1257
+ for (auto *arg : args.filtered(OPT_load_pass_plugins)) {
+ config->PassPlugins.push_back(arg->getValue());
+ }
----------------
================
Comment at: lld/ELF/LTO.cpp:147
c.UseNewPM = config->ltoNewPassManager;
+ for (auto &PluginFN : config->PassPlugins)
+ c.PassPlugins.push_back(PluginFN);
----------------
================
Comment at: llvm/test/Feature/load_extension.ll:9
+; 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 -plugin-opt=legacy-pass-manager %t.o 2>&1 | FileCheck %s
; REQUIRES: plugins, examples
----------------
This seems like it should be a test in `lld/test` instead of LLVM?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120490/new/
https://reviews.llvm.org/D120490
More information about the llvm-commits
mailing list