[llvm-branch-commits] MC: Refactor FT_Align fragments when linker relaxation is enabled (PR #149465)
Fangrui Song via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jul 18 00:01:20 PDT 2025
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/149465
Previously, two MCAsmBackend hooks were used, with
shouldInsertFixupForCodeAlign calling getWriter().recordRelocation
directly, bypassing generic code.
This patch:
* Introduces MCAsmBackend::relaxAlign to replace the two hooks.
* Tracks padding size using VarContentStart and VarContentEnd (content is arbitrary).
* Move setLinkerRelaxable from MCObjectStreamer::emitCodeAlignment to the backends.
More information about the llvm-branch-commits
mailing list