9 #ifndef CIRCT_SUPPORT_FOLDUTILS_H
10 #define CIRCT_SUPPORT_FOLDUTILS_H
12 #include "mlir/IR/BuiltinAttributes.h"
13 #include "llvm/ADT/APInt.h"
21 if (
auto attr = dyn_cast<IntegerAttr>(operand))
22 return attr.getValue();
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
static std::optional< APInt > getConstantInt(Attribute operand)
Determine the integer value of a constant operand.
static bool isConstantZero(Attribute operand)
Determine whether a constant operand is a zero value.
static bool isConstantOne(Attribute operand)
Determine whether a constant operand is a one value.