13#ifndef CIRCT_SUPPORT_PARSINGUTILS_H
14#define CIRCT_SUPPORT_PARSINGUTILS_H
17#include "mlir/IR/BuiltinAttributes.h"
18#include "mlir/IR/OpImplementation.h"
21namespace parsing_util {
25static inline StringAttr
getNameFromSSA(MLIRContext *context, StringRef name) {
28 assert(name.size() > 1 && name[0] ==
'%' &&
"Unknown MLIR name");
32 name = name.drop_front();
34 return StringAttr::get(context, name);
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")
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.