[llvm] RISCV: Remove shouldForceRelocation and unneeded relocations (PR #140692)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri May 23 09:37:22 PDT 2025


MaskRay wrote:

* Renamed `MCFixup::NeedsRelax` to `LinkerRelaxable` (which populates the parent MCFragment::LinkerRelaxable). I don't remember why I picked `NeedsRelax`, but since we have both assembler relaxation and linker relaxation, we need a clearer name.
* Introduced `MCSection::LinkerRelaxable` to prevent pessimization when linker relaxation is disabled. We need a reliably way to prevent relocations within a section for no-relax code.

https://github.com/llvm/llvm-project/pull/140692


More information about the llvm-commits mailing list