[PATCH] D107280: [RISCV] Lower extern_weak symbols using the GOT for the medany model
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 2 09:45:12 PDT 2021
MaskRay added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2759
+ bool IsExternWeak = GV->hasExternalWeakLinkage();
+ SDValue Addr = getAddr(N, DAG, IsLocal, IsExternWeak);
----------------
jrtc27 wrote:
> MaskRay wrote:
> > jrtc27 wrote:
> > > MaskRay wrote:
> > > > IsExternWeak can be omitted
> > > What do you mean? If it's omitted then it defaults to false and we get the old codegen
> > Change the argument. The variable can be removed.
> Well you could say the same about Ty and IsLocal, they're both used exactly once so could be inlined, but IMO this keeps it more readable; nested function calls can get rather messy.
IsExternWeak is a good candidate. Its expr isn't very long. IsLocal is long and leaving it as is is fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107280/new/
https://reviews.llvm.org/D107280
More information about the llvm-commits
mailing list