13 #ifndef CIRCT_SUPPORT_PARSINGUTILS_H
14 #define CIRCT_SUPPORT_PARSINGUTILS_H
17 #include "mlir/IR/BuiltinAttributes.h"
18 #include "mlir/IR/OpImplementation.h"
21 namespace parsing_util {
25 static inline StringAttr
getNameFromSSA(MLIRContext *context, StringRef name) {
28 assert(name.size() > 1 && name[0] ==
'%' &&
"Unknown MLIR name");
32 name = name.drop_front();
45 mlir::OpAsmParser &parser,
46 llvm::SmallVector<mlir::OpAsmParser::Argument> &inputArguments,
47 llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand> &inputOperands,
48 llvm::SmallVector<Type> &inputTypes, ArrayAttr &inputNames);
52 ArrayRef<BlockArgument> args);
assert(baseType &&"element must be base type")
Direction get(bool isOutput)
Returns an output direction if isOutput is true, otherwise returns an input direction.
ParseResult parseInitializerList(mlir::OpAsmParser &parser, llvm::SmallVector< mlir::OpAsmParser::Argument > &inputArguments, llvm::SmallVector< mlir::OpAsmParser::UnresolvedOperand > &inputOperands, llvm::SmallVector< Type > &inputTypes, ArrayAttr &inputNames)
Parses an initializer.
void printInitializerList(OpAsmPrinter &p, ValueRange ins, ArrayRef< BlockArgument > args)
static StringAttr getNameFromSSA(MLIRContext *context, StringRef name)
Get a name from an SSA value string, if said value name is not a number.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.