17 void SMTDialect::initialize() {
22 #include "mlir/Dialect/SMT/IR/SMT.cpp.inc"
29 if (
auto bvType = dyn_cast<BitVectorType>(type)) {
30 if (
auto attrValue = dyn_cast<BitVectorAttr>(value)) {
31 assert(bvType == attrValue.getType() &&
32 "attribute and desired result types have to match");
33 return BVConstantOp::create(builder, loc, attrValue);
38 if (
auto boolType = dyn_cast<BoolType>(type)) {
39 if (
auto attrValue = dyn_cast<BoolAttr>(value))
40 return BoolConstantOp::create(builder, loc, attrValue);
46 #include "mlir/Dialect/SMT/IR/SMTDialect.cpp.inc"
47 #include "mlir/Dialect/SMT/IR/SMTEnums.cpp.inc"
static Operation * materializeConstant(Dialect *dialect, OpBuilder &builder, Attribute value, Type type, Location loc)
A utility function used to materialize a constant for a given attribute and type.
Attributes are known-constant values of operations.
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
This class helps build Operations.
Operation is the basic unit of execution within MLIR.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
Include the generated interface declarations.