[PATCH] D20644: [NVPTX] Added NVVMIntrRange pass

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 16:09:36 PDT 2016


tra marked an inline comment as done.

================
Comment at: lib/Target/NVPTX/NVVMIntrRange.cpp:61
@@ +60,3 @@
+// passed-in call instruction.
+static bool addRangeMetadata(int Low, int High, CallInst *C) {
+  LLVMContext &Context = C->getParent()->getContext();
----------------
jlebar wrote:
> MaxGridSize.x is INT_MAX for sm_30+.  Then we add 1 to it, and store in a signed int...
Changed arg type to uint64_t.
As for the range itself, it apparently allows wrapping, so exclusive high boundary wrapped to negative value should be OK. In any case we don't have any other way to encode it considering that range values must be the same as return type which is i32 in this case.


http://reviews.llvm.org/D20644





More information about the llvm-commits mailing list