[PATCH] D21484: AMDGPU/SI: Add support for R_AMDGPU_GOTPCREL

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 17 22:19:16 PDT 2016


arsenm added inline comments.

================
Comment at: lib/Target/AMDGPU/SIISelLowering.cpp:1478-1483
@@ +1477,8 @@
+
+  // FIXME: Most targets use MachinePointerInfo::getGOT() here, but the address
+  // space for MachinePointerInfo with a PseudoSourceValue is hard-coded to 0,
+  // and we want the GOT to go in the constant address space.
+  Type *Ty = PtrVT.getTypeForEVT(*DAG.getContext());
+  PointerType *PtrTy = PointerType::get(Ty, AMDGPUAS::CONSTANT_ADDRESS);
+  const DataLayout &DataLayout = DAG.getDataLayout();
+  unsigned Align = DataLayout.getABITypeAlignment(PtrTy);
----------------
I think that's more of a problem with the MachinePointerInfo rather than PseudoSourceValue.

Actually there's already a GOT type. PseudoSourceValueManager needs an address space argument added through it.


http://reviews.llvm.org/D21484





More information about the llvm-commits mailing list