1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/lib
Teresa Johnson 3a2a2bb628 [LTO] Support for embedding bitcode section during LTO
Summary:
This adds support for embedding bitcode in a binary during LTO. The libLTO gains supports the `-lto-embed-bitcode` flag. The option allows users of the LTO library to embed a bitcode section. For example, LLD can pass the option via `ld.lld -mllvm=-lto-embed-bitcode`.

This feature allows doing something comparable to `clang -c -fembed-bitcode`, but on the (LTO) linker level. Having bitcode alongside native code has many use-cases. To give an example, the MacOS linker can create a `-bitcode_bundle` section containing bitcode. Also, having this feature built into LLVM is an alternative to 3rd party tools such as [[ https://github.com/travitch/whole-program-llvm | wllvm ]] or [[ https://github.com/SRI-CSL/gllvm | gllvm ]]. As with these tools, this feature simplifies creating "whole-program" llvm bitcode files, but in contrast to wllvm/gllvm it does not rely on a specific llvm frontend/driver.

Patch by Josef Eisl <josef.eisl@oracle.com>

Reviewers: #llvm, #clang, rsmith, pcc, alexshap, tejohnson

Reviewed By: tejohnson

Subscribers: tejohnson, mehdi_amini, inglorion, hiraditya, aheejin, steven_wu, dexonsmith, dang, cfe-commits, llvm-commits, #llvm, #clang

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D68213
2019-12-12 12:34:19 -08:00
..
Analysis Rename LoopInfo::isRotated() to LoopInfo::isRotatedForm(). 2019-12-12 14:22:36 -05:00
AsmParser [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
BinaryFormat [AIX] Emit TOC entries for ASM printing 2019-11-27 17:20:55 -05:00
Bitcode [LTO] Support for embedding bitcode section during LTO 2019-12-12 12:34:19 -08:00
Bitstream [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
CodeGen [DAGCombiner] improve readability 2019-12-12 13:16:50 -05:00
DebugInfo [llvm-dwarfdump] Add blank line after printing line table 2019-12-12 14:06:10 +00:00
Demangle Revert "Add some missing includes to MicrosoftDemangle.cpp (PR44217)" 2019-12-04 11:10:07 -08:00
ExecutionEngine [ORC] Remove the automagic Main JITDylib fram ExecutionSession. 2019-12-05 01:36:49 -08:00
Frontend [OpenMP] Introduce the OpenMP-IR-Builder 2019-12-11 14:38:49 -06:00
Fuzzer
FuzzMutate [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
IR [Alignment][NFC] Adding Align compatible methods to IntrinsicInst/IRBuilder 2019-12-12 16:22:15 +01:00
IRReader [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
LineEditor [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
Linker [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
LTO [LTO] Support for embedding bitcode section during LTO 2019-12-12 12:34:19 -08:00
MC [WebAssembly] Add new export_name clang attribute for controlling wasm export names 2019-12-11 11:54:57 -08:00
MCA [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
Object [WebAssembly] Add new export_name clang attribute for controlling wasm export names 2019-12-11 11:54:57 -08:00
ObjectYAML [ELF] Support for PT_GNU_PROPERTY in header and tools 2019-12-04 15:38:12 +00:00
Option [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
Passes [Matrix] Add first set of matrix intrinsics and initial lowering pass. 2019-12-12 15:42:18 +00:00
ProfileData Revert "[Coverage] Revise format to reduce binary size" 2019-12-04 10:35:14 -08:00
Remarks [Remarks] Allow empty temporary remark files 2019-11-22 15:58:12 -08:00
Support [Support] Try to fix bot failure after 8ddcd1dc26 2019-12-12 12:20:11 +00:00
TableGen [TableGen] Add bang-operators !getop and !setop. 2019-12-11 12:05:22 +00:00
Target [SystemZ] Implement the packed stack layout 2019-12-12 10:26:03 -08:00
Testing
TextAPI [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
ToolDrivers [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
Transforms [Matrix] Add first set of matrix intrinsics and initial lowering pass. 2019-12-12 15:42:18 +00:00
WindowsManifest Revert "Temporarily revert "build: avoid hardcoding the libxml2 library name"" 2019-12-03 09:27:14 -08:00
XRay [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
CMakeLists.txt [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.h 2019-12-10 00:10:09 -06:00
LLVMBuild.txt [OpenMP][NFCI] Introduce llvm/IR/OpenMPConstants.h 2019-12-10 00:10:09 -06:00