[all-commits] [llvm/llvm-project] dd8623: AsmPrinter: Remove ELF's special lowerRelativeRefe...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Mar 31 20:44:50 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dd862356e20d2d7e0d0356dff5bd80623c14febc
https://github.com/llvm/llvm-project/commit/dd862356e20d2d7e0d0356dff5bd80623c14febc
Author: Fangrui Song <i at maskray.me>
Date: 2025-03-31 (Mon, 31 Mar 2025)
Changed paths:
M llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
R llvm/test/CodeGen/ARM/plt-relative-reloc.ll
A llvm/test/CodeGen/ARM/relative-reloc.ll
R llvm/test/CodeGen/RISCV/plt-relative-reloc.ll
A llvm/test/CodeGen/RISCV/relative-reloc.ll
A llvm/test/CodeGen/X86/relative-reloc-32.ll
A llvm/test/CodeGen/X86/relative-reloc-64.ll
R llvm/test/CodeGen/X86/x86-64-plt-relative-reloc.ll
R llvm/test/CodeGen/X86/x86-plt-relative-reloc.ll
Log Message:
-----------
AsmPrinter: Remove ELF's special lowerRelativeReference for unnamed_addr function
https://reviews.llvm.org/D17938 introduced lowerRelativeReference to
give ConstantExpr sub (A-B) special semantics in ELF: when `A` is an
`unnamed_addr` function, create a PLT-generating relocation. This was
intended for C++ relative vtables, but C++ relative vtable ended up
using DSOLocalEquivalent (lowerDSOLocalEquivalent).
This special treatment of `unnamed_addr` seems unusual.
Let's remove it. Only COFF needs an overload to generate a @IMGREL32
relocation specifier (llvm/test/MC/COFF/cross-section-relative.ll).
Pull Request: https://github.com/llvm/llvm-project/pull/132684
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