14#ifndef MLIR_INTERFACES_INFERSTRIDEDMETADATAINTERFACE_H
15#define MLIR_INTERFACES_INFERSTRIDEDMETADATAINTERFACE_H
40 int32_t stridedRank) {
76 return offsets == other.offsets && sizes == other.sizes &&
77 strides == other.strides;
87 if (
lhs.isUninitialized())
89 if (
rhs.isUninitialized())
94 +[](
const std::tuple<ConstantIntRanges, ConstantIntRanges> &lhsRhs)
96 return std::get<0>(lhsRhs).rangeUnion(std::get<1>(lhsRhs));
102 llvm::zip_equal(*
lhs.offsets, *
rhs.offsets), rangeUnion);
104 llvm::map_to_vector(llvm::zip_equal(
lhs.sizes,
rhs.sizes), rangeUnion);
106 llvm::zip_equal(
lhs.strides,
rhs.strides), rangeUnion);
118 : offsets(std::move(offsets)), sizes(std::move(sizes)),
119 strides(std::move(strides)) {}
122 std::optional<SmallVector<ConstantIntRanges>> offsets;
143#include "mlir/Interfaces/InferStridedMetadataInterface.h.inc"
A set of arbitrary-precision integers representing bounds on a given integer value.
static ConstantIntRanges maxRange(unsigned bitwidth)
Create a ConstantIntRanges with the maximum bounds for the width bitwidth, that is - [0,...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Include the generated interface declarations.
raw_ostream & operator<<(raw_ostream &os, const AliasResult &result)
function_ref< void(Value, const StridedMetadataRange &)> SetStridedMetadataRangeFn
Callback function type for setting the strided metadata of a value.
llvm::function_ref< Fn > function_ref