15 #ifndef MLIR_DIALECT_UTILS_STATICVALUEUTILS_H 16 #define MLIR_DIALECT_UTILS_STATICVALUEUTILS_H 20 #include "llvm/ADT/SmallVector.h" 31 SmallVectorImpl<Value> &dynamicVec,
32 SmallVectorImpl<int64_t> &staticVec,
38 SmallVectorImpl<Value> &dynamicVec,
39 SmallVectorImpl<int64_t> &staticVec,
70 #endif // MLIR_DIALECT_UTILS_STATICVALUEUTILS_H Include the generated interface declarations.
void dispatchIndexOpFoldResults(ArrayRef< OpFoldResult > ofrs, SmallVectorImpl< Value > &dynamicVec, SmallVectorImpl< int64_t > &staticVec, int64_t sentinel)
Helper function to dispatch multiple OpFoldResults according to the behavior of dispatchIndexOpFoldRe...
static constexpr const bool value
bool isConstantIntValue(OpFoldResult ofr, int64_t value)
Return true if ofr is constant integer equal to value.
void dispatchIndexOpFoldResult(OpFoldResult ofr, SmallVectorImpl< Value > &dynamicVec, SmallVectorImpl< int64_t > &staticVec, int64_t sentinel)
Helper function to dispatch an OpFoldResult into staticVec if: a) it is an IntegerAttr In other cases...
OpFoldResult getAsOpFoldResult(Value val)
Given a value, try to extract a constant Attribute.
SmallVector< int64_t, 4 > extractFromI64ArrayAttr(Attribute attr)
Extract int64_t values from the assumed ArrayAttr of IntegerAttr.
Optional< int64_t > getConstantIntValue(OpFoldResult ofr)
If ofr is a constant integer or an IntegerAttr, return the integer.
bool isEqualConstantIntOrValue(OpFoldResult ofr1, OpFoldResult ofr2)
Return true if ofr1 and ofr2 are the same integer constant attribute values or the same SSA value...