Files
gps/tools/local/circt/include/mlir/Dialect/SMT/IR/SMTAttributes.h.inc
T
2026-07-12 11:01:51 +03:00

77 lines
3.5 KiB
C++

/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|* AttrDef Declarations *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
#ifdef GET_ATTRDEF_CLASSES
#undef GET_ATTRDEF_CLASSES
namespace mlir {
class AsmParser;
class AsmPrinter;
} // namespace mlir
namespace mlir::smt {
/// This attribute represents a constant value of the `(_ BitVec width)` sort as
/// described in the [SMT bit-vector
/// theory](https://smtlib.cs.uiowa.edu/theories-FixedSizeBitVectors.shtml).
///
/// The constant is as #bX (binary) or #xX (hexadecimal) in SMT-LIB
/// where X is the value in the corresponding format without any further
/// prefixing. Here, the bit-vector constant is given as a regular non-negative
/// integer literal and the associated bit-vector type indicating the bit-width.
///
/// Examples:
/// ```mlir
/// #smt.bv<5> : !smt.bv<4>
/// #smt.bv<92> : !smt.bv<8>
/// ```
///
/// The explicit type-suffix is mandatory to uniquely represent the attribute,
/// i.e., this attribute should always be used in the extended form (using the
/// `quantified` keyword in the operation assembly format string).
///
/// The bit-width must be greater than zero (i.e., at least one digit has to be
/// present).
class BitVectorAttr;
namespace detail {
struct BitVectorAttrStorage;
} // namespace detail
class BitVectorAttr : public ::mlir::Attribute::AttrBase<BitVectorAttr, ::mlir::Attribute, detail::BitVectorAttrStorage, ::mlir::TypedAttr::Trait> {
public:
using Base::Base;
/// Return the bit-vector constant as a SMT-LIB formatted string.
std::string getValueAsString(bool prefix = true) const;
static constexpr ::llvm::StringLiteral name = "smt.bv";
static constexpr ::llvm::StringLiteral dialectName = "smt";
using Base::getChecked;
static BitVectorAttr get(::mlir::MLIRContext *context, ::llvm::APInt value);
static BitVectorAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::llvm::APInt value);
static BitVectorAttr get(::mlir::MLIRContext *context, llvm::StringRef value);
static BitVectorAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, llvm::StringRef value);
static BitVectorAttr get(::mlir::MLIRContext *context, uint64_t value, unsigned width);
static BitVectorAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, uint64_t value, unsigned width);
static ::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::llvm::APInt value);
static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::llvm::APInt value);
static constexpr ::llvm::StringLiteral getMnemonic() {
return {"bv"};
}
static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType);
void print(::mlir::AsmPrinter &odsPrinter) const;
const ::llvm::APInt &getValue() const;
::mlir::Type getType() const;
};
} // namespace mlir::smt
MLIR_DECLARE_EXPLICIT_TYPE_ID(mlir::smt::BitVectorAttr)
#endif // GET_ATTRDEF_CLASSES