//===- ValueBoundsOpInterface.h - Value Bounds ------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef MLIR_INTERFACES_VALUEBOUNDSOPINTERFACE_H_ #define MLIR_INTERFACES_VALUEBOUNDSOPINTERFACE_H_ #include "mlir/Analysis/FlatLinearValueConstraints.h" #include "mlir/IR/Builders.h" #include "mlir/IR/OpDefinition.h" #include "mlir/IR/Value.h" #include "mlir/Interfaces/DestinationStyleOpInterface.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/ExtensibleRTTI.h" #include <queue> namespace mlir { class OffsetSizeAndStrideOpInterface; /// A hyperrectangular slice, represented as a list of offsets, sizes and /// strides. class HyperrectangularSlice { … }; ValueDimList; /// A helper class to be used with `ValueBoundsOpInterface`. This class stores a /// constraint system and mapping of constrained variables to index-typed /// values or dimension sizes of shaped values. /// /// Interface implementations of `ValueBoundsOpInterface` use `addBounds` to /// insert constraints about their results and/or region block arguments into /// the constraint set in the form of an AffineExpr. When a bound should be /// expressed in terms of another value/dimension, `getExpr` can be used to /// retrieve an AffineExpr that represents the specified value/dimension. /// /// When a value/dimension is retrieved for the first time through `getExpr`, /// it is added to an internal worklist. See `computeBound` for more details. /// /// Note: Any modification of existing IR invalides the data stored in this /// class. Adding new operations is allowed. class ValueBoundsConstraintSet : public llvm::RTTIExtends<ValueBoundsConstraintSet, llvm::RTTIRoot> { … }; } // namespace mlir #include "mlir/Interfaces/ValueBoundsOpInterface.h.inc" #endif // MLIR_INTERFACES_VALUEBOUNDSOPINTERFACE_H_