[PATCH] D55303: [RISCV, WIP] Add lowering of addressing sequences for PIC

James Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 11 08:52:14 PST 2018


jrtc27 added a comment.

Almost there now from my point of view, but we'll see what the others say (especially Alex).



================
Comment at: lib/Target/RISCV/RISCVISelLowering.cpp:353
+template <class NodeTy>
+SDValue RISCVTargetLowering::getAddrPIC(NodeTy *N, SelectionDAG &DAG,
+                                        bool UseGOT, unsigned Flags) const {
----------------
Can we combine this with `getAddr`, pushing the common `isPositionIndependent()` check inside `getAddr`? Then the `UseGOT` flag becomes `NonLocal` or similar (or alternatively invert it and make it an `IsLocal` flag), and happens to only influence code generation for PIC. This should simplify all its uses.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55303





More information about the llvm-commits mailing list