[PATCH] D66340: [RISCV] Support NonLazyBind

James Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 09:48:36 PDT 2019


jrtc27 requested changes to this revision.
jrtc27 added a comment.
This revision now requires changes to proceed.

A couple of minor remaining points.



================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2192
   // TargetGlobalAddress/TargetExternalSymbol node so that legalize won't
   // split it and then direct call can be matched by PseudoCALL.
   if (GlobalAddressSDNode *S = dyn_cast<GlobalAddressSDNode>(Callee)) {
----------------
jrtc27 wrote:
> This comment probably needs updating to reflect the fact that GlobalAddress/ExternalSymbol may now become a normal node and indirectly called if using NonLazyBind.
Actually I should have been more accurate; only GlobalAddress nodes will become indirect calls, ExternalSymbols will always be direct calls through TargetExternalSymbol nodes, since this only changes the GlobalAddress branch (as you need the function to get its attributes).


================
Comment at: llvm/test/CodeGen/RISCV/no-plt.ll:1
+; RUN: llc -mtriple=riscv64-linux-gnu --relocation-model=pic < %s | FileCheck %s
+
----------------
jrtc27 wrote:
> Please do this for `-mtriple=riscv32` and `-mtriple=riscv64` (no `-linux-gnu` is generally used in the CodeGen tests unless it's necessary), and use a single `-` for `-relocation-model`.
Still missing a `-mtriple=riscv32` line.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66340/new/

https://reviews.llvm.org/D66340





More information about the llvm-commits mailing list