[PATCH] D50634: [RISCV] Add support for local PIC addressing

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 01:36:57 PDT 2018


rogfer01 added inline comments.
Herald added a subscriber: jocewei.


================
Comment at: lib/Target/RISCV/RISCVISelLowering.cpp:387
 
   if (isPositionIndependent() || Subtarget.is64Bit())
     report_fatal_error("Unable to lowerExternalSymbol");
----------------
efriedma wrote:
> rogfer01 wrote:
> > I'm not sure how `ExternalSymbol` must be dealt. Like `GlobalAddress` or they should always use the GOT?
> An ExternalSymbol is basically a global which doesn't have a corresponding IR symbol, so treat it the same way as any other extern global.  They're mostly used for runtime library calls (memcpy, soft-float math, etc.).
> 
> That said, I'm not sure you can actually trigger this codepath given that LowerCall lowers the callee of calls itself.
Certainly. On a closer look, this function is not called anywhere (it is private and is not a virtual override) so looks to me as dead code and I think it can be removed.


https://reviews.llvm.org/D50634





More information about the llvm-commits mailing list