[all-commits] [llvm/llvm-project] 7117de: AsmPrinter: Remove ELF's special lowerRelativeRefe...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Apr 8 10:11:42 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7117dea043d39912dc41aaeba9c3186486b9b867
https://github.com/llvm/llvm-project/commit/7117dea043d39912dc41aaeba9c3186486b9b867
Author: Fangrui Song <i at maskray.me>
Date: 2025-04-08 (Tue, 08 Apr 2025)
Changed paths:
M llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
R llvm/test/CodeGen/ARM/plt-relative-reloc.ll
A llvm/test/CodeGen/ARM/relative-reloc.ll
M llvm/test/CodeGen/RISCV/dso_local_equivalent.ll
R llvm/test/CodeGen/RISCV/plt-relative-reloc.ll
A llvm/test/CodeGen/RISCV/relative-reloc.ll
M llvm/test/CodeGen/X86/dso_local_equivalent.ll
A llvm/test/CodeGen/X86/relative-reloc-32.ll
A llvm/test/CodeGen/X86/relative-reloc-64.ll
M llvm/test/CodeGen/X86/relptr-rodata.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; use lowerDSOLocalEquivalent in more cases
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/134781
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