[PATCH] D87636: [ThinLTO] add post-thinlto-merge option to -lto-embed-bitcode
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 15 15:06:53 PDT 2020
tejohnson added inline comments.
================
Comment at: llvm/lib/LTO/LTOBackend.cpp:621
+ "command line arguments are not available");
+ llvm::EmbedBitcodeInModule(Mod, llvm::MemoryBufferRef(),
+ /*EmbedBitcode*/ true,
----------------
How about putting this at the start of opt() instead? Then it works for both Thin and Regular LTO. I would change the name to something like EmbedPreOptimized or something like that. Or EmbedPostMergePreOptimized if you want to be very exact (either name fits for the regular LTO scenario as well).
================
Comment at: llvm/test/LTO/X86/embed-bitcode.ll:11
; RUN: llvm-lto2 run -r %t1.o,_start,px -r %t2.o,foo,px -r %t3.o,bar,px -r %t2.o,bar,lx -lto-embed-bitcode=optimized -o %t3 %t1.o %t2.o %t3.o
; RUN: llvm-readelf -S %t3.0 | FileCheck %s --check-prefix=CHECK-ELF
----------------
Probably check the new case here too once it works for regular LTO as suggested above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87636/new/
https://reviews.llvm.org/D87636
More information about the llvm-commits
mailing list