[PATCH] D29671: [DebugInfo] Add address space when creating DIDerivedTypes

Tony Tye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 14:27:19 PST 2017


tony-tye added inline comments.


================
Comment at: lib/CodeGen/CGDebugInfo.cpp:1612
   unsigned Size = Context.getTypeSize(Context.VoidPtrTy);
+  unsigned AddressSpace = CGM.getTarget().getGlobalAddressSpace();
+  Optional<unsigned> DWARFAddressSpace =
----------------
Should this be using the Constant address space since presumably a vtable will be in constant memory and not change during the execution of the program? This allows better code generation as constant data can be loaded by scalar operations on GPU hardware.


================
Comment at: lib/CodeGen/CGDebugInfo.cpp:1657
     unsigned VTableWidth = PtrWidth * VSlotCount;
+    unsigned AddressSpace = CGM.getTarget().getGlobalAddressSpace();
+    Optional<unsigned> DWARFAddressSpace =
----------------
Same comment as above.


https://reviews.llvm.org/D29671





More information about the llvm-commits mailing list