15 #ifndef CIRCT_DIALECT_HW_MODULEIMPLEMENTATION_H
16 #define CIRCT_DIALECT_HW_MODULEIMPLEMENTATION_H
20 #include "mlir/IR/DialectImplementation.h"
27 namespace module_like_impl {
37 OpAsmParser &parser,
bool &isVariadic,
38 SmallVectorImpl<OpAsmParser::Argument> &args,
39 SmallVectorImpl<Attribute> &argNames, SmallVectorImpl<Attribute> &argLocs,
40 SmallVectorImpl<Attribute> &resultNames,
41 SmallVectorImpl<DictionaryAttr> &resultAttrs,
42 SmallVectorImpl<Attribute> &resultLocs, TypeAttr &type);
46 ArrayRef<Type> argTypes,
bool isVariadic,
47 ArrayRef<Type> resultTypes,
bool &needArgNamesAttr);
51 SmallVectorImpl<PortParse> &args,
55 hw::ModuleType modType,
56 ArrayRef<Attribute> portAttrs,
57 ArrayRef<Location> locAttrs);
void printModuleSignature(OpAsmPrinter &p, Operation *op, ArrayRef< Type > argTypes, bool isVariadic, ArrayRef< Type > resultTypes, bool &needArgNamesAttr)
Print a module signature with named results.
ParseResult parseModuleSignature(OpAsmParser &parser, SmallVectorImpl< PortParse > &args, TypeAttr &modType)
New Style parsing.
ParseResult parseModuleFunctionSignature(OpAsmParser &parser, bool &isVariadic, SmallVectorImpl< OpAsmParser::Argument > &args, SmallVectorImpl< Attribute > &argNames, SmallVectorImpl< Attribute > &argLocs, SmallVectorImpl< Attribute > &resultNames, SmallVectorImpl< DictionaryAttr > &resultAttrs, SmallVectorImpl< Attribute > &resultLocs, TypeAttr &type)
This is a variant of mlir::parseFunctionSignature that allows names on result arguments.
void getAsmBlockArgumentNamesImpl(mlir::Region ®ion, OpAsmSetValueNameFn setNameFn)
Get a special name to use when printing the entry block arguments of the region contained by an opera...
void printModuleSignatureNew(OpAsmPrinter &p, Region &body, hw::ModuleType modType, ArrayRef< Attribute > portAttrs, ArrayRef< Location > locAttrs)
SmallVector< Location > getAllPortLocsImpl(hw::ModuleType modType)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
function_ref< void(Value, StringRef)> OpAsmSetValueNameFn
ModulePort::Direction direction