[all-commits] [llvm/llvm-project] 32f83d: MCFixup: Remove FK_PCRel_

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Jul 4 22:57:45 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 32f83d38bd624885a782cb8816ae42081a3fb1a0
      https://github.com/llvm/llvm-project/commit/32f83d38bd624885a782cb8816ae42081a3fb1a0
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-07-04 (Fri, 04 Jul 2025)

  Changed paths:
    M llvm/include/llvm/MC/MCFixup.h
    M llvm/lib/MC/MCAsmBackend.cpp
    M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
    M llvm/test/CodeGen/Mips/llvm-ir/load.ll
    M llvm/test/CodeGen/Mips/llvm-ir/store.ll

  Log Message:
  -----------
  MCFixup: Remove FK_PCRel_

The generic FK_Data_ fixup kinds handle both absolute and PC-relative
fixups. ELFObjectWriter sets IsPCRel to true for `.long foo-.`, so the
backend has to handle PC-relative FK_Data_.

However, the existence of FK_PCRel_ encouraged backends to implement it
as a separate fixup type, leading to redundant and error-prone code.

Removing FK_PCRel_ simplifies the overall fixup mechanism.



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