[PATCH] D22428: [NVPTX] Force minimum alignment of 4 for byval arguments of device-side functions.

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 10:23:50 PDT 2016


tra added inline comments.

================
Comment at: lib/Target/NVPTX/NVPTXAsmPrinter.cpp:1601
@@ +1600,3 @@
+      // TODO: this will need to be undone when we get to support multi-TU
+      // device-side compilation. Hopefully ptxas bug is fixed by then.
+      if (!isKernelFunc && align < 4)
----------------
jlebar wrote:
> I think the condition is when we support cross-TU linking with nvcc, because this breaks ABI compatibility with nvcc?  We should be able to do multi-TU compilations just fine, if all of the object files come from clang.
That's correct. I've updated the comment.

================
Comment at: lib/Target/NVPTX/NVPTXISelLowering.cpp:1344
@@ +1343,3 @@
+    // for sm_50+. See corresponding change in emitFunctionParamList()
+    // for details.
+    if (!isKernel && ArgAlign < 4)
----------------
jlebar wrote:
> Maybe s/change/condition/?
'alignment adjustment' ?


https://reviews.llvm.org/D22428





More information about the llvm-commits mailing list