CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::hw::module_like_impl Namespace Reference

Classes

struct  PortParse

Functions

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 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.
void printModuleSignatureNew (OpAsmPrinter &p, Region &body, hw::ModuleType modType, ArrayRef< Attribute > portAttrs, ArrayRef< Location > locAttrs)
void printModuleSignatureNew (OpAsmPrinter &p, HWModuleLike op)
void getAsmBlockArgumentNamesImpl (mlir::Region &region, OpAsmSetValueNameFn setNameFn)
 Get a special name to use when printing the entry block arguments of the region contained by an operation in this dialect.
SmallVector< Location > getAllPortLocsImpl (hw::ModuleType modType)

Function Documentation

◆ getAllPortLocsImpl()

SmallVector< Location > circt::hw::module_like_impl::getAllPortLocsImpl ( hw::ModuleType modType)

◆ getAsmBlockArgumentNamesImpl()

void circt::hw::module_like_impl::getAsmBlockArgumentNamesImpl ( mlir::Region & region,
OpAsmSetValueNameFn setNameFn )

Get a special name to use when printing the entry block arguments of the region contained by an operation in this dialect.

Definition at line 450 of file ModuleImplementation.cpp.

◆ parseModuleFunctionSignature()

ParseResult circt::hw::module_like_impl::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.

Definition at line 202 of file ModuleImplementation.cpp.

References context, failure(), circt::parsing_util::getNameFromSSA(), parseFunctionResultList(), and success().

◆ parseModuleSignature()

ParseResult circt::hw::module_like_impl::parseModuleSignature ( OpAsmParser & parser,
SmallVectorImpl< PortParse > & args,
TypeAttr & modType )

New Style parsing.

Definition at line 356 of file ModuleImplementation.cpp.

References context, failure(), parsePortList(), and success().

Referenced by parseHWModuleOp().

◆ printModuleSignature()

void circt::hw::module_like_impl::printModuleSignature ( OpAsmPrinter & p,
Operation * op,
ArrayRef< Type > argTypes,
bool isVariadic,
ArrayRef< Type > resultTypes,
bool & needArgNamesAttr )

Print a module signature with named results.

Definition at line 98 of file ModuleImplementation.cpp.

References getModuleArgumentName(), and getModuleResultName().

◆ printModuleSignatureNew() [1/2]

void circt::hw::module_like_impl::printModuleSignatureNew ( OpAsmPrinter & p,
HWModuleLike op )

◆ printModuleSignatureNew() [2/2]

void circt::hw::module_like_impl::printModuleSignatureNew ( OpAsmPrinter & p,
Region & body,
hw::ModuleType modType,
ArrayRef< Attribute > portAttrs,
ArrayRef< Location > locAttrs )

Definition at line 395 of file ModuleImplementation.cpp.

References directionAsString(), and circt::hw::ModulePort::Output.

Referenced by printModuleOp().