[PATCH] D107280: [RISCV] Lower extern_weak symbols using the GOT for the medany model

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 2 09:42:03 PDT 2021


jrtc27 marked an inline comment as done.
jrtc27 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2759
+  bool IsExternWeak = GV->hasExternalWeakLinkage();
+  SDValue Addr = getAddr(N, DAG, IsLocal, IsExternWeak);
 
----------------
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.


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