[all-commits] [llvm/llvm-project] 11ebe3: [RISCV] relaxDwarfCallFrameFragment: remove unneed...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Jun 15 23:26:38 PDT 2023


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

  Changed paths:
    M llvm/lib/MC/MCAssembler.cpp
    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 two evaluateKnownAbsolute calls (subtle; avoid if possible)
with evaluateAsAbsolute.




More information about the All-commits mailing list