11 using namespace circt;
15 llvm::SmallVector<OpAsmParser::Argument> &inputArguments,
16 llvm::SmallVector<OpAsmParser::UnresolvedOperand> &inputOperands,
17 llvm::SmallVector<Type> &inputTypes, ArrayAttr &inputNames) {
18 llvm::SmallVector<Attribute> names;
19 if (failed(parser.parseCommaSeparatedList(
20 OpAsmParser::Delimiter::Paren, [&]() -> ParseResult {
21 OpAsmParser::UnresolvedOperand inputOperand;
23 auto &arg = inputArguments.emplace_back();
24 if (parser.parseArgument(arg) || parser.parseColonType(type) ||
25 parser.parseEqual() || parser.parseOperand(inputOperand))
28 inputOperands.push_back(inputOperand);
29 inputTypes.push_back(type);
31 names.push_back(StringAttr::get(
33 arg.ssaName.name.drop_front()));
43 ArrayRef<BlockArgument> args) {
45 llvm::interleaveComma(llvm::zip(ins, args), p, [&](
auto it) {
47 p << arg <<
" : " << in.getType() <<
" = " << in;
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)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.