HomePhabricator

[RISCV] Prefer to lower MC_GlobalAddress operands to .Lfoo$local

Authored by MaskRay on May 11 2021, 11:29 AM.

Description

[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

Details

Committed
MaskRayMay 11 2021, 11:29 AM
Reviewer
jrtc27
Differential Revision
D101875: [RISCV] Prefer to lower MC_GlobalAddress operands to .Lfoo$local
Parents
rG61cbbba7a645: [ArgumentPromotion] Fix byval alignment handling.
Branches
Unknown
Tags
Unknown