CIRCT  19.0.0git
Classes | Functions
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. More...
 
void printModuleSignature (OpAsmPrinter &p, Operation *op, ArrayRef< Type > argTypes, bool isVariadic, ArrayRef< Type > resultTypes, bool &needArgNamesAttr)
 Print a module signature with named results. More...
 
ParseResult parseModuleSignature (OpAsmParser &parser, SmallVectorImpl< PortParse > &args, TypeAttr &modType)
 New Style parsing. More...
 
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. More...
 
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 456 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 circt::calyx::direction::get(), circt::parsing_util::getNameFromSSA(), and parseFunctionResultList().

◆ parseModuleSignature()

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

New Style parsing.

Definition at line 358 of file ModuleImplementation.cpp.

References circt::calyx::direction::get(), circt::hw::ModulePort::InOut, and parsePortList().

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 401 of file ModuleImplementation.cpp.

References directionAsString(), and Output.

Referenced by printModuleOp().