[PATCH] D11774: [NVPTX] Use LDG for pointer induction variables

Jingyue Wu jingyue at google.com
Wed Aug 5 15:36:52 PDT 2015


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

LGTM


================
Comment at: lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp:552
@@ -551,1 +551,3 @@
+  if (!Subtarget.hasLDG() || CodeAddrSpace != NVPTX::PTXLdStInstCode::GLOBAL ||
+      !isKernelFunction(*F->getFunction())) {
     return false;
----------------
I'd copy some comments at load-with-non-coherent-cache.ll:216 here too, so that people reading source code will quickly understand why we only do this for kernel functions. 

================
Comment at: test/CodeGen/NVPTX/load-with-non-coherent-cache.ll:216
@@ +215,3 @@
+
+; Without interprocedural analysis, we can only know that the parameter is
+; global and never written to (for the duration of the kernel) from a kernel
----------------
Thanks. Makes sense now. 


http://reviews.llvm.org/D11774





More information about the llvm-commits mailing list