[all-commits] [llvm/llvm-project] 742ecf: [MC] Relax MCFillFragment and compute fragment off...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Jun 2 00:29:51 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 742ecfc13e8aa34cfff2900e31838f657fcafe30
https://github.com/llvm/llvm-project/commit/742ecfc13e8aa34cfff2900e31838f657fcafe30
Author: Fangrui Song <i at maskray.me>
Date: 2025-06-02 (Mon, 02 Jun 2025)
Changed paths:
M llvm/include/llvm/MC/MCAsmBackend.h
M llvm/include/llvm/MC/MCAssembler.h
M llvm/include/llvm/MC/MCFragment.h
M llvm/include/llvm/MC/MCSection.h
M llvm/lib/MC/MCAssembler.cpp
M llvm/lib/MC/MCSection.cpp
M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
M llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
M llvm/test/MC/AArch64/label-arithmetic-diags-elf.s
M llvm/test/MC/ELF/layout-interdependency3.s
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list