[PATCH] D29284: [AMDGPU] Lower null pointers in static variable initializer

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 15:28:34 PST 2017


arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.

LGTM except for minor detail



================
Comment at: lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:225-233
+uint64_t AMDGPUTargetMachine::getNullPointerValue(unsigned AddrSpace) const {
+  switch(AddrSpace) {
+  case AMDGPUAS::PRIVATE_ADDRESS:
+  case AMDGPUAS::LOCAL_ADDRESS:
+    return -1;
+  default:
+    return 0;
----------------
Body of the function should go in the header


================
Comment at: lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:228
+  case AMDGPUAS::PRIVATE_ADDRESS:
+  case AMDGPUAS::LOCAL_ADDRESS:
+    return -1;
----------------
Might as well handle REGION as well


https://reviews.llvm.org/D29284





More information about the llvm-commits mailing list