| commit | a82b97c524e851b0807b95c34a2154a2cbce9bdf | [log] [tgz] |
|---|---|---|
| author | Fabian Parzefall <parzefall@meta.com> | Wed Dec 03 18:29:24 2025 -0800 |
| committer | GitHub <noreply@github.com> | Thu Dec 04 10:29:24 2025 +0800 |
| tree | 5a99c8e8f3999ebe50e2daa5fc63aff5f01cb8a4 | |
| parent | 5b30750893ce3e005c5b1f7da963ab0adcf4cb61 [diff] |
[CodeGen] Fix lpad padding at section start after empty block (#112595) If a landing pad is at the very start of a split section, it has to be padded by a nop instruction. Otherwise its offset is marked as zero in the LSDA, which means no landing pad (leading it to be skipped). LLVM already handles this. If a landing pad is the first machine block in a section, a nop is inserted to ensure a non-zero offset. However, if the landing pad is preceeded by an empty block, the nop would be omitted. To fix this, this patch adds a field to machine blocks indicating whether this block contains the first instruction in its section. This variable is then used to determine whether to emit the padding. Co-authored-by: Jinjie Huang <huangjinjie@bytedance.com>
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.
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.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.