徐明杰 via llvm-dev
2021-Sep-29 10:53 UTC
[llvm-dev] LLD counterpart to '--plugin-opt=disbale-output' option of LLVMgold.so ?
Hi all. I noticed this is an option '--plugin-opt=disbale-output' in gold-plugin.cpp, when this option is enabled, the field `PreOptModuleHook` of lto::Config will be set to `[](size_t Task, const Module &M) { return false; };` . And as the description of `PreOptModuleHook` says, the link process will exit right after linking (regular LTO) or loading (ThinLTO) the module, before modifying it. This is very useful when we only want to get optimization remarks of LTO and do not want to do the whole link process. Is there a LLD counterpart option to '--plugin-opt=disbale-output' option of LLVMgold.so <http://llvmgold.so/> or any similar option ? Regards, Xu Mingjie @ ByteDance -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210929/ef8ce758/attachment.html>
Fāng-ruì Sòng via llvm-dev
2021-Nov-21 00:15 UTC
[llvm-dev] LLD counterpart to '--plugin-opt=disbale-output' option of LLVMgold.so ?
On Wed, Sep 29, 2021 at 3:53 AM 徐明杰 via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > Hi all. > I noticed this is an option '--plugin-opt=disbale-output' in gold-plugin.cpp, when this option is enabled, the field `PreOptModuleHook` of lto::Config will be set to `[](size_t Task, const Module &M) { return false; };` . > And as the description of `PreOptModuleHook` says, the link process will exit right after linking (regular LTO) or loading (ThinLTO) the module, before modifying it. > This is very useful when we only want to get optimization remarks of LTO and do not want to do the whole link process. > Is there a LLD counterpart option to '--plugin-opt=disbale-output' option of LLVMgold.so or any similar option ? > Regards, > Xu Mingjie @ ByteDance > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-devThere is no LLD counterpart. rL222687 added --plugin-opt=disable-output with a note that it my be used for benchmark, but seems that nobody has needed the feature.