| commit | abfe556c46f7c055cacc79f3aa322bb2c05d92f5 | [log] [tgz] |
|---|---|---|
| author | Aleksandr Popov <42888396+aleks-tmb@users.noreply.github.com> | Thu Aug 28 11:03:41 2025 +0200 |
| committer | GitHub <noreply@github.com> | Thu Aug 28 11:03:41 2025 +0200 |
| tree | 3e49c594ccd08ca090eec5252a2b46d1aa1f269e | |
| parent | 4fc8bffbaafec55a43e50ff5888163aa2cd5c744 [diff] |
MC: Fix NOP insertion between fused instructions that breaks macro fusion (#155784) In the https://github.com/llvm/llvm-project/commit/39c8cfb70d203439e3296dfdfe3d41f1cb2ec551 patch, getOrCreateDataFragment was optimized by eagerly allocating an empty fragment when adding a fragment with a variable-size tail. This means that in this case the current MC fragment is no longer the one where the instruction was inserted, and the check `PendingBA && PendingBA->getNext() == OS.getCurrentFragment()` fails, since CurrentFragment is now the empty fragment instead of the fragment containing the instruction. `PendingBA -> Fragment with a variable-size tail (contains previous instruction) -> CurrentFragment (newly allocated empty fragment)` This breaks the macro-fusion logic because it incorrectly assumes another fragment has been inserted between the fused instructions. Fixes https://github.com/llvm/llvm-project/issues/155045 #155316 Reland
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.