llvm with tablegen backend for capstone disassembler
Go to file
Paul Kirth a67208e1c6 [llvm] Preliminary fat-lto-objects support
Fat LTO objects contain both LTO compatible IR, as well as generated
object code. This allows users to defer the choice of whether to use LTO
or not to link-time. This is a feature available in GCC for some time,
and makes the existing -ffat-lto-objects flag functional in the same
way as GCC's.

Within LLVM, we add a new EmbedBitcodePass that serializes the module to
the object file, and expose a new pass pipeline for compiling fat
objects. The new pipeline initially clones the module and runs the
selected (Thin)LTOPrelink pipeline, after which it will serialize the
module into a `.llvm.lto` section of an ELF file. When compiling for
(Thin)LTO, this normally the point at which the compiler would emit a
object file containing the bitcode and metadata.

After that point we compile the original module using the
PerModuleDefaultPipeline used for non-LTO compilation. We generate
standard object files at the end of this pipeline, which contain machine
code and the new `.llvm.lto` section containing bitcode.

Since the two pipelines operate on different copies of the module, we
can be sure that the bitcode in the `.llvm.lto` section and object code
in  `.text` are congruent with the existing output produced by the
default and LTO pipelines.

Original RFC: https://discourse.llvm.org/t/rfc-ffat-lto-objects-support/63977

Reviewed By: tejohnson, MaskRay, nikic

Differential Revision: https://reviews.llvm.org/D146776
2023-06-23 17:51:30 +00:00
.github/workflows workflows/release-tasks: Upload lit releases to pypi 2023-05-31 09:25:19 -07:00
bolt [BOLT] Fixing relative ordering of cold sections under multi-way function splitting 2023-06-22 14:26:48 -07:00
clang [clang-format] Respect ColumnLimit 0 line breaks in inline asm 2023-06-23 17:30:24 +03:00
clang-tools-extra [clang-tidy] Document modernize-raw-string-literal check options 2023-06-23 16:14:15 +00:00
cmake [CMake] Ensure CLANG_RESOURCE_DIR is respected. 2023-06-03 04:21:35 -07:00
compiler-rt [XRay][AArch64] Suppport __xray_customevent/__xray_typedevent 2023-06-23 09:24:18 -07:00
cross-project-tests [Dexter] XFAIL Dexter tests for Apple Silicon (arm64) 2023-05-26 15:43:20 -07:00
flang [flang][mlir][openacc] Add acc.reduction operation as data entry operation 2023-06-23 10:27:07 -07:00
libc [libc] Factor specifics of packet type out of process 2023-06-23 03:45:23 +01:00
libclc Reland "[CMake] Bumps minimum version to 3.20.0. 2023-05-27 12:51:21 +02:00
libcxx [libc++] Fix the check-format job 2023-06-21 17:59:32 -04:00
libcxxabi [libc++][NFC] Consistently qualify malloc and free calls with std:: 2023-06-16 09:40:31 -04:00
libunwind [libunwind] Removes CMake work-arounds. 2023-06-05 17:42:37 +02:00
lld [lld][ARM] Add support for 16-bit thumb group relocations 2023-06-23 13:43:04 +01:00
lldb [lldb][NFCI] Remove use of ConstString from StructuredDataPlugin 2023-06-23 10:29:52 -07:00
llvm [llvm] Preliminary fat-lto-objects support 2023-06-23 17:51:30 +00:00
llvm-libgcc Reland "[CMake] Bumps minimum version to 3.20.0. 2023-05-27 12:51:21 +02:00
mlir [flang][mlir][openacc] Add acc.reduction operation as data entry operation 2023-06-23 10:27:07 -07:00
openmp [OpenMP] Disable some tests for AArch64 2023-06-20 19:00:07 +00:00
polly [SCEV] Compute AddRec range computations using different type BECount 2023-05-31 21:05:17 -07:00
pstl Reland "[CMake] Bumps minimum version to 3.20.0. 2023-05-27 12:51:21 +02:00
runtimes Reland "[CMake] Bumps minimum version to 3.20.0. 2023-05-27 12:51:21 +02:00
third-party Revert "Prevent deadlocks in death tests." 2023-06-20 07:39:31 +00:00
utils [Bazel][mlir] Avoid ODR violation introduced in 7ab749c. 2023-06-22 08:00:50 +02:00
.arcconfig
.arclint
.clang-format
.clang-tidy Add -misc-use-anonymous-namespace to .clang-tidy 2023-05-06 02:33:20 +03:00
.git-blame-ignore-revs [NFC] Add libc++ formatting commit to the git-blame ignore file 2023-06-19 11:21:15 -04:00
.gitignore
.mailmap Add entry to mailmap 2023-04-25 23:15:07 -07:00
CONTRIBUTING.md Added instruction to join the llvm discourse and discord group. 2023-03-27 17:02:07 -07:00
LICENSE.TXT
README.md [docs] Update README and GettingStarted 2023-03-08 12:55:59 -08:00
SECURITY.md

The LLVM Compiler Infrastructure

Welcome to the LLVM project!

This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.

The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.

C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.

Other components include: the libc++ C++ standard library, the LLD linker, and more.

Getting the Source Code and Building LLVM

Consult the Getting Started with LLVM page for information on building and running LLVM.

For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.

Getting in touch

Join the LLVM Discourse forums, Discord chat, or #llvm IRC channel on OFTC.

The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.