MLIR  16.0.0git
Namespaces | Functions
StaticValueUtils.cpp File Reference
#include "mlir/Dialect/Utils/StaticValueUtils.h"
#include "mlir/IR/Matchers.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/APSInt.h"
+ Include dependency graph for StaticValueUtils.cpp:

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 

Functions

void mlir::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, the OpFoldResult is dispached to the dynamicVec. More...
 
void mlir::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 dispatchIndexOpFoldResult(OpFoldResult ofr for a single OpFoldResult. More...
 
SmallVector< int64_t, 4 > mlir::extractFromI64ArrayAttr (Attribute attr)
 Extract int64_t values from the assumed ArrayAttr of IntegerAttr. More...
 
OpFoldResult mlir::getAsOpFoldResult (Value val)
 Given a value, try to extract a constant Attribute. More...
 
SmallVector< OpFoldResult > mlir::getAsOpFoldResult (ValueRange values)
 Given an array of values, try to extract a constant Attribute from each value. More...
 
SmallVector< OpFoldResult > mlir::getAsOpFoldResult (ArrayAttr arrayAttr)
 Convert arrayAttr to a vector of OpFoldResult. More...
 
Optional< int64_t > mlir::getConstantIntValue (OpFoldResult ofr)
 If ofr is a constant integer or an IntegerAttr, return the integer. More...
 
bool mlir::isConstantIntValue (OpFoldResult ofr, int64_t value)
 Return true if ofr is constant integer equal to value. More...
 
bool mlir::isEqualConstantIntOrValue (OpFoldResult ofr1, OpFoldResult ofr2)
 Return true if ofr1 and ofr2 are the same integer constant attribute values or the same SSA value. More...