MLIR  18.0.0git
Namespaces | Typedefs | Enumerations | Functions | Variables
InferIntRangeCommon.h File Reference
#include "mlir/Interfaces/InferIntRangeInterface.h"
#include "llvm/ADT/ArrayRef.h"
#include <optional>

Go to the source code of this file.


 Include the generated interface declarations.


using mlir::intrange::InferRangeFn = function_ref< ConstantIntRanges(ArrayRef< ConstantIntRanges >)>
 Function that performs inference on an array of ConstantIntRanges, abstracted away here to permit writing the function that handles both 64- and 32-bit index types. More...


enum class  mlir::intrange::CmpMode : uint32_t { mlir::intrange::Both , mlir::intrange::Signed , mlir::intrange::Unsigned }
enum class  mlir::intrange::CmpPredicate : uint64_t {
  mlir::intrange::eq , mlir::intrange::ne , mlir::intrange::slt , mlir::intrange::sle ,
  mlir::intrange::sgt , mlir::intrange::sge , mlir::intrange::ult , mlir::intrange::ule ,
  mlir::intrange::ugt , mlir::intrange::uge
 Copy of the enum from arith and index to allow the common integer range infrastructure to not depend on either dialect. More...


ConstantIntRanges mlir::intrange::inferIndexOp (InferRangeFn inferFn, ArrayRef< ConstantIntRanges > argRanges, CmpMode mode)
 Compute inferFn on ranges, whose size should be the index storage bitwidth. More...
ConstantIntRanges mlir::intrange::extRange (const ConstantIntRanges &range, unsigned destWidth)
 Independently zero-extend the unsigned values and sign-extend the signed values in range to destWidth bits, returning the resulting range. More...
ConstantIntRanges mlir::intrange::extUIRange (const ConstantIntRanges &range, unsigned destWidth)
 Use the unsigned values in range to zero-extend it to destWidth. More...
ConstantIntRanges mlir::intrange::extSIRange (const ConstantIntRanges &range, unsigned destWidth)
 Use the signed values in range to sign-extend it to destWidth. More...
ConstantIntRanges mlir::intrange::truncRange (const ConstantIntRanges &range, unsigned destWidth)
 Truncate range to destWidth bits, taking care to handle cases such as the truncation of [255, 256] to i8 not being a uniform range. More...
ConstantIntRanges mlir::intrange::inferAdd (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferSub (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferMul (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferDivS (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferDivU (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferCeilDivS (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferCeilDivU (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferFloorDivS (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferRemS (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferRemU (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferMaxS (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferMaxU (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferMinS (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferMinU (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferAnd (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferOr (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferXor (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferShl (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferShrS (ArrayRef< ConstantIntRanges > argRanges)
ConstantIntRanges mlir::intrange::inferShrU (ArrayRef< ConstantIntRanges > argRanges)
std::optional< bool > mlir::intrange::evaluatePred (CmpPredicate pred, const ConstantIntRanges &lhs, const ConstantIntRanges &rhs)
 Returns a boolean value if pred is statically true or false for anypossible inputs falling within lhs and rhs, and std::nullopt if the value of the predicate cannot be determined. More...


static constexpr unsigned mlir::intrange::indexMinWidth = 32
static constexpr unsigned mlir::intrange::indexMaxWidth = 64