18 Operation *op, gpu::Dimension dim, std::optional<uint32_t> opUpperBound,
27 std::optional<uint32_t> upperBound =
32 *upperBound < std::numeric_limits<uint32_t>::max())
33 return LLVM::ConstantRangeAttr::get(op->
getContext(), bitWidth, *upperBound,
37 upperBound = *opUpperBound;
44 llvm::SaturatingAdd(*upperBound, (intrType ==
IntrType::Id ? 0u : 1u));
static Value max(ImplicitLocOpBuilder &builder, Value value, Value bound)
static Value min(ImplicitLocOpBuilder &builder, Value value, Value bound)
Operation is the basic unit of execution within MLIR.
MLIRContext * getContext()
Return the context this operation is associated with.
gpu::DimensionKind IndexKind
LLVM::ConstantRangeAttr getIndexOpRange(Operation *op, gpu::Dimension dim, std::optional< uint32_t > opUpperBound, IndexKind indexKind, IntrType intrType, unsigned bitWidth)
Returns a ConstantRangeAttr for a GPU index op, or nullptr if no bounds are found.
std::optional< uint32_t > getKnownDimensionSizeAround(Operation *op, DimensionKind kind, Dimension dim)
Retrieve the constant bounds for a given dimension and dimension kind from the context surrounding op...
Include the generated interface declarations.