This will embed bitcode after (Thin)LTO merge, but before optimizations.
In the case the thinlto backend is called from clang, the .llvmcmd
section is also produced. Doing so in the case where the caller is the
linker doesn't yet have a motivation, and would require plumbing through
command line args.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
190 ms | windows > Clang.Driver::msp430-toolchain.c |
Event Timeline
clang/test/CodeGen/Inputs/start-lib2.ll | ||
---|---|---|
4 | The message that this was copied from llvm/test/LTO/X86/Inputs/start-lib1.ll is incorrect - this is exactly start-lib2.ll. No idea how this was determined. |
llvm/lib/LTO/LTOBackend.cpp | ||
---|---|---|
639 | 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). | |
llvm/test/LTO/X86/embed-bitcode.ll | ||
11 | Probably check the new case here too once it works for regular LTO as suggested above. |
LGTM, just needs a comment update as noted below and also an update to the patch title.
llvm/lib/LTO/LTOBackend.cpp | ||
---|---|---|
368 | Update comment |
The message that this was copied from llvm/test/LTO/X86/Inputs/start-lib1.ll is incorrect - this is exactly start-lib2.ll. No idea how this was determined.