[PATCH] D20644: [NVPTX] Added NVVMIntrRange pass

Jingyue Wu via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 14:50:16 PDT 2016


jingyue added a comment.

Have you considered letting Clang (instead of a late-stage IR pass) add these ranges? These ranges are useful for some target-independent IR passes, e.g. those using ValueTracking (http://reviews.llvm.org/D4150).


================
Comment at: lib/Target/NVPTX/NVVMIntrRange.cpp:36
@@ +35,3 @@
+     unsigned x, y, z;
+   } block, grid;
+
----------------
Maybe name them BlockDim and GridDim

================
Comment at: lib/Target/NVPTX/NVVMIntrRange.cpp:61
@@ +60,3 @@
+// call instruction.
+static bool addRangeMetadata(int Low, int High, CallInst *C) {
+  llvm::LLVMContext &Context = C->getParent()->getContext();
----------------
Can you comment on whether the range is [Low, High) or [Low, High]? 


http://reviews.llvm.org/D20644





More information about the llvm-commits mailing list