[all-commits] [llvm/llvm-project] ec27c5: [RISCV] Prefer to lower MC_GlobalAddress operands ...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue May 11 11:30:11 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ec27c5f170441ab54295830aa9f7d376406c6a0f
https://github.com/llvm/llvm-project/commit/ec27c5f170441ab54295830aa9f7d376406c6a0f
Author: Fangrui Song <i at maskray.me>
Date: 2021-05-11 (Tue, 11 May 2021)
Changed paths:
M llvm/lib/Target/RISCV/RISCVMCInstLower.cpp
A llvm/test/CodeGen/RISCV/elf-preemption.ll
Log Message:
-----------
[RISCV] Prefer to lower MC_GlobalAddress operands to .Lfoo$local
Similar to X86 D73230 and AArch64 D101872
With this change, we can set dso_local in clang's -fpic -fno-semantic-interposition mode,
for default visibility external linkage non-ifunc-non-COMDAT definitions.
For such dso_local definitions, variable access/taking the address of a
function/calling a function will go through a local alias to avoid GOT/PLT.
Reviewed By: jrtc27, luismarques
Differential Revision: https://reviews.llvm.org/D101875
More information about the All-commits
mailing list