[all-commits] [llvm/llvm-project] 2ef56d: [RISCV] relaxDwarfCallFrameFragment: remove unneed...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Jun 16 12:15:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ef56d16adbe888a7e8c20684aa98d3f07c0eb98
      https://github.com/llvm/llvm-project/commit/2ef56d16adbe888a7e8c20684aa98d3f07c0eb98
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-06-16 (Fri, 16 Jun 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
    M llvm/test/DebugInfo/RISCV/relax-debug-frame.ll
    M llvm/test/MC/ELF/RISCV/gen-dwarf.s

  Log Message:
  -----------
  [RISCV] relaxDwarfCallFrameFragment: remove unneeded relocations for relaxation

If `evaluateAsAbsolute(Value, Layout.getAssembler())` returns true, we
know the address delta is a constant and can suppress relocations
(usually SET6/SUB6).

While here, replace one evaluateKnownAbsolute call (subtle for Mach-O
workarounds; avoid if possible) with evaluateAsAbsolute.




More information about the All-commits mailing list