[all-commits] [llvm/llvm-project] b754e4: MC: Remove redundant relocations for label differe...

Fangrui Song via All-commits all-commits at lists.llvm.org
Sat May 24 17:41:22 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b754e4085541df750c51677e522dd939e2aa9e2d
      https://github.com/llvm/llvm-project/commit/b754e4085541df750c51677e522dd939e2aa9e2d
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-05-24 (Sat, 24 May 2025)

  Changed paths:
    M llvm/include/llvm/MC/MCAsmBackend.h
    M llvm/lib/MC/MCAsmBackend.cpp
    M llvm/lib/MC/MCExpr.cpp
    M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
    M llvm/test/MC/RISCV/Relocations/align-non-executable.s
    M llvm/test/MC/RISCV/Relocations/leb128.s
    M llvm/test/MC/RISCV/cfi-advance.s

  Log Message:
  -----------
  MC: Remove redundant relocations for label differences

For the label difference A-B where A and B are in the same section,
if the section contains no linker-relaxable instruction, we can disable
the framnent walk code path (https://reviews.llvm.org/D155357), removing
redundant relocations. This optimization is available since we now track
per-section linker-relaxable instructions (#140692).

lld/test/ELF/loongarch-reloc-leb128.s , introduced in #81133, has been
updated in 9662a6039c0320eb4473d87b47f0ed891a0f111c to prevent coverage
loss.



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