MLIR
20.0.0git
|
Classes | |
class | AttrConvertFastMathToLLVM |
class | AttrConvertOverflowToLLVM |
class | AttrConverterConstrainedFPToLLVM |
class | ConstantIntOp |
Specialization of arith.constant op that returns an integer value. More... | |
class | ConstantFloatOp |
Specialization of arith.constant op that returns a floating point value. More... | |
class | ConstantIndexOp |
Specialization of arith.constant op that returns an integer of index type. More... | |
class | NarrowTypeEmulationConverter |
Converts narrow integer or float types that are not supported by the target hardware to wider types. More... | |
class | WideIntEmulationConverter |
Converts integer types that are too wide for the target by splitting them in two halves and thus turning into supported ones, i.e., i2*N --> iN, where N is the widest integer bitwidth supported by the target. More... | |
Functions | |
LLVM::FastmathFlags | convertArithFastMathFlagsToLLVM (arith::FastMathFlags arithFMF) |
Maps arithmetic fastmath enum values to LLVM enum values. More... | |
LLVM::FastmathFlagsAttr | convertArithFastMathAttrToLLVM (arith::FastMathFlagsAttr fmfAttr) |
Creates an LLVM fastmath attribute from a given arithmetic fastmath attribute. More... | |
LLVM::IntegerOverflowFlags | convertArithOverflowFlagsToLLVM (arith::IntegerOverflowFlags arithFlags) |
Maps arithmetic overflow enum values to LLVM enum values. More... | |
LLVM::RoundingMode | convertArithRoundingModeToLLVM (arith::RoundingMode roundingMode) |
Creates an LLVM rounding mode enum value from a given arithmetic rounding mode enum value. More... | |
LLVM::RoundingModeAttr | convertArithRoundingModeAttrToLLVM (arith::RoundingModeAttr roundingModeAttr) |
Creates an LLVM rounding mode attribute from a given arithmetic rounding mode attribute. More... | |
LLVM::FPExceptionBehaviorAttr | getLLVMDefaultFPExceptionBehavior (MLIRContext &context) |
Returns an attribute for the default LLVM FP exception behavior. More... | |
void | populateArithToAMDGPUConversionPatterns (RewritePatternSet &patterns, bool convertFP8Arithmetic, bool saturateFP8Truncf, bool allowPackedF16Rtz, amdgpu::Chipset chipset) |
Add patterns for rewriting arith.extf and arith.truncf on FP8 types to wrappers around AMDGPU–specific intrinsics. More... | |
void | populateArithToArmSMEConversionPatterns (RewritePatternSet &patterns) |
void | populateArithToLLVMConversionPatterns (const LLVMTypeConverter &converter, RewritePatternSet &patterns) |
void | registerConvertArithToLLVMInterface (DialectRegistry ®istry) |
void | populateArithToSPIRVPatterns (const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns) |
std::unique_ptr< OperationPass<> > | createConvertArithToSPIRVPass () |
bool | applyCmpPredicate (arith::CmpIPredicate predicate, const APInt &lhs, const APInt &rhs) |
Compute lhs pred rhs , where pred is one of the known integer comparison predicates. More... | |
bool | applyCmpPredicate (arith::CmpFPredicate predicate, const APFloat &lhs, const APFloat &rhs) |
Compute lhs pred rhs , where pred is one of the known floating point comparison predicates. More... | |
TypedAttr | getIdentityValueAttr (AtomicRMWKind kind, Type resultType, OpBuilder &builder, Location loc, bool useOnlyFiniteValue=false) |
Returns the identity value attribute associated with an AtomicRMWKind op. More... | |
std::optional< TypedAttr > | getNeutralElement (Operation *op) |
Return the identity numeric value associated to the give op. More... | |
Value | getIdentityValue (AtomicRMWKind op, Type resultType, OpBuilder &builder, Location loc, bool useOnlyFiniteValue=false) |
Returns the identity value associated with an AtomicRMWKind op. More... | |
Value | getReductionOp (AtomicRMWKind op, OpBuilder &builder, Location loc, Value lhs, Value rhs) |
Returns the value obtained by applying the reduction operation kind associated with a binary AtomicRMWKind op to lhs and rhs . More... | |
arith::CmpIPredicate | invertPredicate (arith::CmpIPredicate pred) |
Invert an integer comparison predicate. More... | |
void | registerValueBoundsOpInterfaceExternalModels (DialectRegistry ®istry) |
void | registerBufferDeallocationOpInterfaceExternalModels (DialectRegistry ®istry) |
void | registerBufferizableOpInterfaceExternalModels (DialectRegistry ®istry) |
void | registerBufferViewFlowOpInterfaceExternalModels (DialectRegistry ®istry) |
void | populateArithWideIntEmulationPatterns (const WideIntEmulationConverter &typeConverter, RewritePatternSet &patterns) |
Adds patterns to emulate wide Arith and Function ops over integer types into supported ones. More... | |
void | populateArithNarrowTypeEmulationPatterns (const NarrowTypeEmulationConverter &typeConverter, RewritePatternSet &patterns) |
Adds patterns to emulate narrow Arith and Function ops into wide supported types. More... | |
void | populateEmulateUnsupportedFloatsConversions (TypeConverter &converter, ArrayRef< Type > sourceTypes, Type targetType) |
Populate the type conversions needed to emulate the unsupported sourceTypes with destType More... | |
void | populateEmulateUnsupportedFloatsPatterns (RewritePatternSet &patterns, const TypeConverter &converter) |
Add rewrite patterns for converting operations that use illegal float types to ones that use legal ones. More... | |
void | populateEmulateUnsupportedFloatsLegality (ConversionTarget &target, const TypeConverter &converter) |
Set up a dialect conversion to reject arithmetic operations on unsupported float types. More... | |
void | populateCeilFloorDivExpandOpsPatterns (RewritePatternSet &patterns) |
Add patterns to expand Arith ceil/floor division ops. More... | |
void | populateExpandBFloat16Patterns (RewritePatternSet &patterns) |
Add patterns to expand Arith bf16 patterns to lower level bitcasts/shifts. More... | |
void | populateArithExpandOpsPatterns (RewritePatternSet &patterns) |
Add patterns to expand Arith ops. More... | |
std::unique_ptr< Pass > | createArithUnsignedWhenEquivalentPass () |
Create a pass to replace signed ops with unsigned ones where they are proven equivalent. More... | |
void | populateIntRangeOptimizationsPatterns (RewritePatternSet &patterns, DataFlowSolver &solver) |
Add patterns for int range based optimizations. More... | |
void | populateUnsignedWhenEquivalentPatterns (RewritePatternSet &patterns, DataFlowSolver &solver) |
Replace signed ops with unsigned ones where they are proven equivalent. More... | |
std::unique_ptr< Pass > | createIntRangeOptimizationsPass () |
Create a pass which do optimizations based on integer range analysis. More... | |
void | populateIntRangeNarrowingPatterns (RewritePatternSet &patterns, DataFlowSolver &solver, ArrayRef< unsigned > bitwidthsSupported) |
Add patterns for int range based narrowing. More... | |
FailureOr< OpFoldResult > | reifyValueBound (OpBuilder &b, Location loc, presburger::BoundType type, const ValueBoundsConstraintSet::Variable &var, ValueBoundsConstraintSet::StopConditionFn stopCondition, bool closedUB=false) |
Reify a bound for the given variable in terms of SSA values for which stopCondition is met. More... | |
FailureOr< OpFoldResult > | reifyIndexValueBound (OpBuilder &b, Location loc, presburger::BoundType type, Value value, ValueBoundsConstraintSet::StopConditionFn stopCondition=nullptr, bool closedUB=false) |
Reify a bound for the given index-typed value in terms of SSA values for which stopCondition is met. More... | |
FailureOr< OpFoldResult > | reifyShapedValueDimBound (OpBuilder &b, Location loc, presburger::BoundType type, Value value, int64_t dim, ValueBoundsConstraintSet::StopConditionFn stopCondition=nullptr, bool closedUB=false) |
Reify a bound for the specified dimension of the given shaped value in terms of SSA values for which stopCondition is met. More... | |
Value | createProduct (OpBuilder &builder, Location loc, ArrayRef< Value > values) |
Value | createProduct (OpBuilder &builder, Location loc, ArrayRef< Value > values, Type resultType) |
std::optional< FloatType > | parseFloatType (MLIRContext *ctx, StringRef name) |
Map strings to float types. More... | |
bool mlir::arith::applyCmpPredicate | ( | arith::CmpFPredicate | predicate, |
const APFloat & | lhs, | ||
const APFloat & | rhs | ||
) |
Compute lhs
pred
rhs
, where pred
is one of the known floating point comparison predicates.
Definition at line 1897 of file ArithOps.cpp.
bool mlir::arith::applyCmpPredicate | ( | arith::CmpIPredicate | predicate, |
const APInt & | lhs, | ||
const APInt & | rhs | ||
) |
Compute lhs
pred
rhs
, where pred
is one of the known integer comparison predicates.
Definition at line 1766 of file ArithOps.cpp.
LLVM::FastmathFlagsAttr mlir::arith::convertArithFastMathAttrToLLVM | ( | arith::FastMathFlagsAttr | fmfAttr | ) |
Creates an LLVM fastmath attribute from a given arithmetic fastmath attribute.
Definition at line 32 of file AttrToLLVMConverter.cpp.
References convertArithFastMathFlagsToLLVM(), and mlir::get().
Referenced by mlir::arith::AttrConvertFastMathToLLVM< SourceOp, TargetOp >::AttrConvertFastMathToLLVM().
LLVM::FastmathFlags mlir::arith::convertArithFastMathFlagsToLLVM | ( | arith::FastMathFlags | arithFMF | ) |
Maps arithmetic fastmath enum values to LLVM enum values.
Definition at line 14 of file AttrToLLVMConverter.cpp.
References contract().
Referenced by convertArithFastMathAttrToLLVM().
LLVM::IntegerOverflowFlags mlir::arith::convertArithOverflowFlagsToLLVM | ( | arith::IntegerOverflowFlags | arithFlags | ) |
Maps arithmetic overflow enum values to LLVM enum values.
Definition at line 38 of file AttrToLLVMConverter.cpp.
Referenced by mlir::arith::AttrConvertOverflowToLLVM< SourceOp, TargetOp >::AttrConvertOverflowToLLVM().
LLVM::RoundingModeAttr mlir::arith::convertArithRoundingModeAttrToLLVM | ( | arith::RoundingModeAttr | roundingModeAttr | ) |
Creates an LLVM rounding mode attribute from a given arithmetic rounding mode attribute.
Definition at line 69 of file AttrToLLVMConverter.cpp.
References convertArithRoundingModeToLLVM(), and mlir::get().
Referenced by mlir::arith::AttrConverterConstrainedFPToLLVM< SourceOp, TargetOp >::AttrConverterConstrainedFPToLLVM().
LLVM::RoundingMode mlir::arith::convertArithRoundingModeToLLVM | ( | arith::RoundingMode | roundingMode | ) |
Creates an LLVM rounding mode enum value from a given arithmetic rounding mode enum value.
Definition at line 53 of file AttrToLLVMConverter.cpp.
Referenced by convertArithRoundingModeAttrToLLVM().
std::unique_ptr< Pass > mlir::arith::createArithUnsignedWhenEquivalentPass | ( | ) |
Create a pass to replace signed ops with unsigned ones where they are proven equivalent.
Definition at line 177 of file UnsignedWhenEquivalent.cpp.
std::unique_ptr< OperationPass<> > mlir::arith::createConvertArithToSPIRVPass | ( | ) |
Definition at line 1367 of file ArithToSPIRV.cpp.
std::unique_ptr< Pass > mlir::arith::createIntRangeOptimizationsPass | ( | ) |
Create a pass which do optimizations based on integer range analysis.
Definition at line 543 of file IntRangeOptimizations.cpp.
Definition at line 346 of file Utils.cpp.
Referenced by mlir::mesh::createCollectiveProcessGroupSize().
Value mlir::arith::createProduct | ( | OpBuilder & | builder, |
Location | loc, | ||
ArrayRef< Value > | values, | ||
Type | resultType | ||
) |
Definition at line 350 of file Utils.cpp.
References mlir::OpBuilder::create(), and mlir::Builder::getOneAttr().
Value mlir::arith::getIdentityValue | ( | AtomicRMWKind | op, |
Type | resultType, | ||
OpBuilder & | builder, | ||
Location | loc, | ||
bool | useOnlyFiniteValue = false |
||
) |
Returns the identity value associated with an AtomicRMWKind op.
useOnlyFiniteValue
does. Definition at line 2592 of file ArithOps.cpp.
References mlir::OpBuilder::create(), and getIdentityValueAttr().
TypedAttr mlir::arith::getIdentityValueAttr | ( | AtomicRMWKind | kind, |
Type | resultType, | ||
OpBuilder & | builder, | ||
Location | loc, | ||
bool | useOnlyFiniteValue = false |
||
) |
Returns the identity value attribute associated with an AtomicRMWKind op.
useOnlyFiniteValue
defines whether the identity value should steer away from infinity representations or anything that is not a proper finite number. E.g., The identity value for maxf is in theory -Inf
, but if we want to stay in the finite range, it would be BiggestRepresentableNegativeFloat
. The purpose of this boolean is to offer constants that will play nice with fast math related optimizations.
Definition at line 2483 of file ArithOps.cpp.
References mlir::emitOptionalError(), mlir::Builder::getFloatAttr(), mlir::Builder::getIntegerAttr(), and mlir::Builder::getZeroAttr().
Referenced by getIdentityValue(), and getNeutralElement().
LLVM::FPExceptionBehaviorAttr mlir::arith::getLLVMDefaultFPExceptionBehavior | ( | MLIRContext & | context | ) |
Returns an attribute for the default LLVM FP exception behavior.
Definition at line 78 of file AttrToLLVMConverter.cpp.
References mlir::get().
Referenced by mlir::arith::AttrConverterConstrainedFPToLLVM< SourceOp, TargetOp >::AttrConverterConstrainedFPToLLVM().
std::optional< TypedAttr > mlir::arith::getNeutralElement | ( | Operation * | op | ) |
Return the identity numeric value associated to the give op.
Return std::nullopt if there is no known neutral element. If op
has FastMathFlags::ninf
, only finite values will be used as neutral element.
Definition at line 2550 of file ArithOps.cpp.
References mlir::Operation::getContext(), getIdentityValueAttr(), mlir::Operation::getLoc(), mlir::Operation::getResult(), and mlir::Value::getType().
Referenced by mlir::linalg::splitReduction(), and mlir::linalg::splitReductionByScaling().
Value mlir::arith::getReductionOp | ( | AtomicRMWKind | op, |
OpBuilder & | builder, | ||
Location | loc, | ||
Value | lhs, | ||
Value | rhs | ||
) |
Returns the value obtained by applying the reduction operation kind associated with a binary AtomicRMWKind op to lhs
and rhs
.
Return the value obtained by applying the reduction operation kind associated with a binary AtomicRMWKind op to lhs
and rhs
.
Definition at line 2602 of file ArithOps.cpp.
References mlir::OpBuilder::create(), and mlir::emitOptionalError().
Referenced by mlir::affine::loopUnrollJamByFactor().
arith::CmpIPredicate mlir::arith::invertPredicate | ( | arith::CmpIPredicate | pred | ) |
Invert an integer comparison predicate.
Definition at line 76 of file ArithOps.cpp.
Referenced by invertPredicate().
std::optional< FloatType > mlir::arith::parseFloatType | ( | MLIRContext * | ctx, |
StringRef | name | ||
) |
Map strings to float types.
Definition at line 361 of file Utils.cpp.
References mlir::Builder::getBF16Type(), mlir::Builder::getF128Type(), mlir::Builder::getF16Type(), mlir::Builder::getF32Type(), mlir::Builder::getF64Type(), mlir::Builder::getF80Type(), mlir::Builder::getFloat4E2M1FNType(), mlir::Builder::getFloat6E2M3FNType(), mlir::Builder::getFloat6E3M2FNType(), mlir::Builder::getFloat8E3M4Type(), mlir::Builder::getFloat8E4M3FNType(), mlir::Builder::getFloat8E4M3FNUZType(), mlir::Builder::getFloat8E4M3Type(), mlir::Builder::getFloat8E5M2FNUZType(), mlir::Builder::getFloat8E5M2Type(), and mlir::Builder::getFloat8E8M0FNUType().
void mlir::arith::populateArithExpandOpsPatterns | ( | RewritePatternSet & | patterns | ) |
Add patterns to expand Arith ops.
Definition at line 402 of file ExpandOps.cpp.
References mlir::patterns, and populateCeilFloorDivExpandOpsPatterns().
void mlir::arith::populateArithNarrowTypeEmulationPatterns | ( | const NarrowTypeEmulationConverter & | typeConverter, |
RewritePatternSet & | patterns | ||
) |
Adds patterns to emulate narrow Arith and Function ops into wide supported types.
Users need to add conversions about the computation domain of narrow types.
Definition at line 53 of file EmulateNarrowType.cpp.
References mlir::patterns, mlir::populateCallOpTypeConversionPattern(), and mlir::populateReturnOpTypeConversionPattern().
void mlir::arith::populateArithToAMDGPUConversionPatterns | ( | RewritePatternSet & | patterns, |
bool | convertFP8Arithmetic, | ||
bool | saturateFP8Truncf, | ||
bool | allowPackedF16Rtz, | ||
amdgpu::Chipset | chipset | ||
) |
Add patterns for rewriting arith.extf
and arith.truncf
on FP8 types to wrappers around AMDGPU–specific intrinsics.
If saturateFP8TruncF
is set, values outside the range of the destination type are clamped to the largest value of that type instead of being rewritten to Inf (aka NaN).
Definition at line 360 of file ArithToAMDGPU.cpp.
References mlir::patterns.
void mlir::arith::populateArithToArmSMEConversionPatterns | ( | RewritePatternSet & | patterns | ) |
Definition at line 102 of file ArithToArmSME.cpp.
References mlir::patterns.
void mlir::arith::populateArithToLLVMConversionPatterns | ( | const LLVMTypeConverter & | converter, |
RewritePatternSet & | patterns | ||
) |
Definition at line 525 of file ArithToLLVM.cpp.
References mlir::patterns.
void mlir::arith::populateArithToSPIRVPatterns | ( | const SPIRVTypeConverter & | typeConverter, |
RewritePatternSet & | patterns | ||
) |
Definition at line 1264 of file ArithToSPIRV.cpp.
References mlir::patterns.
void mlir::arith::populateArithWideIntEmulationPatterns | ( | const WideIntEmulationConverter & | typeConverter, |
RewritePatternSet & | patterns | ||
) |
Adds patterns to emulate wide Arith and Function ops over integer types into supported ones.
This is done by splitting original power-of-two i2N integer types into two iN halves.
Definition at line 1124 of file EmulateWideInt.cpp.
References mlir::patterns, mlir::populateCallOpTypeConversionPattern(), and mlir::populateReturnOpTypeConversionPattern().
void mlir::arith::populateCeilFloorDivExpandOpsPatterns | ( | RewritePatternSet & | patterns | ) |
Add patterns to expand Arith ceil/floor division ops.
Definition at line 390 of file ExpandOps.cpp.
References mlir::patterns.
Referenced by populateArithExpandOpsPatterns().
void mlir::arith::populateEmulateUnsupportedFloatsConversions | ( | TypeConverter & | converter, |
ArrayRef< Type > | sourceTypes, | ||
Type | targetType | ||
) |
Populate the type conversions needed to emulate the unsupported sourceTypes
with destType
Definition at line 88 of file EmulateUnsupportedFloats.cpp.
References mlir::TypeConverter::addConversion(), mlir::TypeConverter::addTargetMaterialization(), contract(), and mlir::OpBuilder::create().
void mlir::arith::populateEmulateUnsupportedFloatsLegality | ( | ConversionTarget & | target, |
const TypeConverter & | converter | ||
) |
Set up a dialect conversion to reject arithmetic operations on unsupported float types.
Definition at line 113 of file EmulateUnsupportedFloats.cpp.
References mlir::ConversionTarget::addDynamicallyLegalDialect(), mlir::ConversionTarget::addDynamicallyLegalOp(), mlir::ConversionTarget::addLegalOp(), mlir::TypeConverter::isLegal(), and mlir::ConversionTarget::markUnknownOpDynamicallyLegal().
void mlir::arith::populateEmulateUnsupportedFloatsPatterns | ( | RewritePatternSet & | patterns, |
const TypeConverter & | converter | ||
) |
Add rewrite patterns for converting operations that use illegal float types to ones that use legal ones.
Definition at line 108 of file EmulateUnsupportedFloats.cpp.
References mlir::patterns.
void mlir::arith::populateExpandBFloat16Patterns | ( | RewritePatternSet & | patterns | ) |
Add patterns to expand Arith bf16 patterns to lower level bitcasts/shifts.
Definition at line 397 of file ExpandOps.cpp.
References mlir::patterns.
void mlir::arith::populateIntRangeNarrowingPatterns | ( | RewritePatternSet & | patterns, |
DataFlowSolver & | solver, | ||
ArrayRef< unsigned > | bitwidthsSupported | ||
) |
Add patterns for int range based narrowing.
Definition at line 533 of file IntRangeOptimizations.cpp.
References mlir::patterns.
void mlir::arith::populateIntRangeOptimizationsPatterns | ( | RewritePatternSet & | patterns, |
DataFlowSolver & | solver | ||
) |
Add patterns for int range based optimizations.
Definition at line 527 of file IntRangeOptimizations.cpp.
References mlir::patterns.
void mlir::arith::populateUnsignedWhenEquivalentPatterns | ( | RewritePatternSet & | patterns, |
DataFlowSolver & | solver | ||
) |
Replace signed ops with unsigned ones where they are proven equivalent.
Definition at line 165 of file UnsignedWhenEquivalent.cpp.
References mlir::patterns.
void mlir::arith::registerBufferDeallocationOpInterfaceExternalModels | ( | DialectRegistry & | registry | ) |
Definition at line 80 of file BufferDeallocationOpInterfaceImpl.cpp.
References mlir::DialectRegistry::addExtension().
Referenced by mlir::registerAllDialects().
void mlir::arith::registerBufferizableOpInterfaceExternalModels | ( | DialectRegistry & | registry | ) |
Definition at line 207 of file BufferizableOpInterfaceImpl.cpp.
References mlir::DialectRegistry::addExtension().
Referenced by mlir::linalg::registerAllDialectInterfaceImplementations(), and mlir::registerAllDialects().
void mlir::arith::registerBufferViewFlowOpInterfaceExternalModels | ( | DialectRegistry & | registry | ) |
Definition at line 39 of file BufferViewFlowOpInterfaceImpl.cpp.
References mlir::DialectRegistry::addExtension().
Referenced by mlir::registerAllDialects().
void mlir::arith::registerConvertArithToLLVMInterface | ( | DialectRegistry & | registry | ) |
Definition at line 514 of file ArithToLLVM.cpp.
References mlir::DialectRegistry::addExtension().
Referenced by mlir::registerAllExtensions().
void mlir::arith::registerValueBoundsOpInterfaceExternalModels | ( | DialectRegistry & | registry | ) |
Definition at line 153 of file ValueBoundsOpInterfaceImpl.cpp.
References mlir::DialectRegistry::addExtension().
Referenced by mlir::registerAllDialects().
FailureOr< OpFoldResult > mlir::arith::reifyIndexValueBound | ( | OpBuilder & | b, |
Location | loc, | ||
presburger::BoundType | type, | ||
Value | value, | ||
ValueBoundsConstraintSet::StopConditionFn | stopCondition = nullptr , |
||
bool | closedUB = false |
||
) |
Reify a bound for the given index-typed value in terms of SSA values for which stopCondition
is met.
If no stop condition is specified, reify in terms of the operands of the owner op.
By default, lower/equal bounds are closed and upper bounds are open. If closedUB
is set to "true", upper bounds are also closed.
Example: %0 = arith.addi a, b : index %1 = arith.addi %0, c : index
stopCondition
evaluates to "true" for %0 and c, "%0 + %c" is an EQ bound for %1.stopCondition
evaluates to "true" for a, b and c, "%a + %b + %c" is an EQ bound for %1.Definition at line 135 of file ReifyValueBounds.cpp.
References reifyValueBound().
FailureOr< OpFoldResult > mlir::arith::reifyShapedValueDimBound | ( | OpBuilder & | b, |
Location | loc, | ||
presburger::BoundType | type, | ||
Value | value, | ||
int64_t | dim, | ||
ValueBoundsConstraintSet::StopConditionFn | stopCondition = nullptr , |
||
bool | closedUB = false |
||
) |
Reify a bound for the specified dimension of the given shaped value in terms of SSA values for which stopCondition
is met.
If no stop condition is specified, reify in terms of the operands of the owner op.
By default, lower/equal bounds are closed and upper bounds are open. If closedUB
is set to "true", upper bounds are also closed.
Definition at line 117 of file ReifyValueBounds.cpp.
References reifyValueBound().
FailureOr< OpFoldResult > mlir::arith::reifyValueBound | ( | OpBuilder & | b, |
Location | loc, | ||
presburger::BoundType | type, | ||
const ValueBoundsConstraintSet::Variable & | var, | ||
ValueBoundsConstraintSet::StopConditionFn | stopCondition, | ||
bool | closedUB = false |
||
) |
Reify a bound for the given variable in terms of SSA values for which stopCondition
is met.
By default, lower/equal bounds are closed and upper bounds are open. If closedUB
is set to "true", upper bounds are also closed.
Definition at line 64 of file ReifyValueBounds.cpp.
References buildArithValue(), mlir::ValueBoundsConstraintSet::computeBound(), mlir::OpBuilder::create(), mlir::Builder::getIndexAttr(), mlir::AffineMap::getNumDims(), mlir::AffineMap::getResult(), mlir::AffineMap::getSingleConstantResult(), mlir::Value::getType(), mlir::Type::isIndex(), and mlir::AffineMap::isSingleConstant().
Referenced by reifyIndexValueBound(), and reifyShapedValueDimBound().