diff options
author | Fangrui Song <i@maskray.me> | 2025-06-02 00:29:27 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-06-02 00:29:27 -0700 |
commit | 742ecfc13e8aa34cfff2900e31838f657fcafe30 (patch) | |
tree | 61b6b62f609c4e677c065c70f371c732859aa83d /clang/lib/CodeGen/ModuleBuilder.cpp | |
parent | af2f8a8c14e3bf8c4af8f814c58913e2798b05ef (diff) | |
download | llvm-742ecfc13e8aa34cfff2900e31838f657fcafe30.zip llvm-742ecfc13e8aa34cfff2900e31838f657fcafe30.tar.gz llvm-742ecfc13e8aa34cfff2900e31838f657fcafe30.tar.bz2 |
[MC] Relax MCFillFragment and compute fragment offsets eagerly
This builds on top of commit 9d0754ada5dbbc0c009bcc2f7824488419cc5530
("[MC] Relax fragments eagerly") and relaxes fragments eagerly to
eliminate MCSection::HasLayout and `getFragmentOffset` overhead.
Relands 1a47f3f3db66589c11f8ddacfeaecc03fb80c510
Builds with many text sections (e.g. full LTO) shall observe a decrease
in compile time.
---
In addition, ensure `.fill` and `.space` directives with expressions are
re-evaluated during fragment relaxation, as their sizes may change.
Continue iteration to prevent stale, incorrect sizes.
This change has to be coupled with the fragment algorithm change
as otherwise the test test/MC/ELF/layout-interdependency.s would not
converge.
Fixes #123402 and resolves the root cause of #100283, building on error
postponing from commit 38b12d4a7c219b46d1cb52580cbacbdb931262f2.
For AArch64/label-arithmetic-diags-elf.s, the extra iteration
reports a .fill error early and suppresses the fixup/relocation errors.
Just split the tests.
Diffstat (limited to 'clang/lib/CodeGen/ModuleBuilder.cpp')
0 files changed, 0 insertions, 0 deletions