Lines Matching +full:high +full:- +full:z
1 //===- NVVMIntrRange.cpp - Set range attributes for NVVM intrinsics -------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
27 #define DEBUG_TYPE "nvvm-intr-range"
47 INITIALIZE_PASS(NVVMIntrRange, "nvvm-intr-range",
50 // Adds the passed-in [Low,High) range information as metadata to the
51 // passed-in call instruction.
52 static bool addRangeAttr(uint64_t Low, uint64_t High, IntrinsicInst *II) { in addRangeAttr() argument
53 if (II->getMetadata(LLVMContext::MD_range)) in addRangeAttr()
56 const uint64_t BitWidth = II->getType()->getIntegerBitWidth(); in addRangeAttr()
57 ConstantRange Range(APInt(BitWidth, Low), APInt(BitWidth, High)); in addRangeAttr()
59 if (auto CurrentRange = II->getRange()) in addRangeAttr()
62 II->addRangeRetAttr(Range); in addRangeAttr()
68 unsigned x, y, z; in runNVVMIntrRange() member
76 MaxBlockSize.z = std::min(64u, MetadataNTID); in runNVVMIntrRange()
80 MaxGridSize.z = 0xffff; in runNVVMIntrRange()
89 switch (II->getIntrinsicID()) { in runNVVMIntrRange()
98 Changed |= addRangeAttr(0, MaxBlockSize.z, II); in runNVVMIntrRange()
109 Changed |= addRangeAttr(1, MaxBlockSize.z + 1, II); in runNVVMIntrRange()
120 Changed |= addRangeAttr(0, MaxGridSize.z, II); in runNVVMIntrRange()
131 Changed |= addRangeAttr(1, MaxGridSize.z + 1, II); in runNVVMIntrRange()