llvm-project/llvm/lib/LTO
Mircea Trofin 9a2bab5ea2 [ThinLTO] Make -lto-embed-bitcode an enum
The current behavior of -lto-embed-bitcode is not quite the same as that
of -fembed-bitcode. While both populate .llvmbc with bitcode, the latter
populates it with pre-optimized bitcode(*), while the former with
post-optimized. The scenarios driving them are different - the latter's
goal is to allow re-compilation, while the former, IIUC, is execution.

I plan to add a third mode for thinlto cases, closely-related to
-fembed-bitcode's scenario: adding the bitcode pre-optimization, but
post-merging. This would allow re-compilation without requiring the
other .bc files that were merged (akin to how -fembed-bitcode allows
recompilation without all the .h files)

The third mode can't co-exist with the current -lto-embed-bitcode mode,
because the latter would overwrite it. For clarity, we change
-lto-embed-bitcode to be an enum.

(*) That's the compiler semantics. The driver splits compilation in 2
phases, so if -fembed-bitcode is given to the driver, the .llvmbc is
optimized bitcode; if the option is passed to the compiler (after -cc1),
the section is pre-optimized.

Differential Revision: https://reviews.llvm.org/D87477
2020-09-11 13:24:54 -07:00
..
CMakeLists.txt Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00
Caching.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
LLVMBuild.txt Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00
LTO.cpp [FIX] Avoid creating BFI when emitting remarks for dead functions 2020-08-25 11:12:38 -07:00
LTOBackend.cpp [ThinLTO] Make -lto-embed-bitcode an enum 2020-09-11 13:24:54 -07:00
LTOCodeGenerator.cpp [LTO] Don't apply LTOPostLink module flag during writeMergedModule 2020-08-26 11:17:45 -07:00
LTOModule.cpp Remove GlobalValue::getAlignment(). 2020-06-23 19:13:42 -07:00
SummaryBasedOptimizations.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
ThinLTOCodeGenerator.cpp [ThinLTO][Legacy] Fix StringRef assertion from ThinLTO bots 2020-09-04 12:30:09 -07:00
UpdateCompilerUsed.cpp TargetLowering.h - remove unnecessary TargetMachine.h include. NFC 2020-05-23 19:49:38 +01:00