CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::hw::ModulePortLookupInfo Struct Reference

#include <PortImplementation.h>

Collaboration diagram for circt::hw::ModulePortLookupInfo:

Public Member Functions

FailureOr< unsigned > lookupPortIndex (const llvm::DenseMap< StringAttr, unsigned > &portMap, StringAttr name) const
 ModulePortLookupInfo (MLIRContext *ctx, const ModulePortInfo &portInfo)
 ModulePortLookupInfo (MLIRContext *ctx, const SmallVector< PortInfo > &portInfo)
FailureOr< unsigned > getInputPortIndex (StringAttr name) const
FailureOr< unsigned > getOutputPortIndex (StringAttr name) const
FailureOr< unsigned > getInputPortIndex (StringRef name) const
FailureOr< unsigned > getOutputPortIndex (StringRef name) const

Private Attributes

llvm::DenseMap< StringAttr, unsigned > inputPortMap
llvm::DenseMap< StringAttr, unsigned > outputPortMap
MLIRContext * ctx

Detailed Description

Definition at line 173 of file PortImplementation.h.

Constructor & Destructor Documentation

◆ ModulePortLookupInfo() [1/2]

circt::hw::ModulePortLookupInfo::ModulePortLookupInfo ( MLIRContext * ctx,
const ModulePortInfo & portInfo )
inlineexplicit

◆ ModulePortLookupInfo() [2/2]

circt::hw::ModulePortLookupInfo::ModulePortLookupInfo ( MLIRContext * ctx,
const SmallVector< PortInfo > & portInfo )
inlineexplicit

Definition at line 194 of file PortImplementation.h.

References ctx, and ModulePortLookupInfo().

Member Function Documentation

◆ getInputPortIndex() [1/2]

FailureOr< unsigned > circt::hw::ModulePortLookupInfo::getInputPortIndex ( StringAttr name) const
inline

Definition at line 199 of file PortImplementation.h.

References inputPortMap, and lookupPortIndex().

Referenced by getInputPortIndex().

◆ getInputPortIndex() [2/2]

FailureOr< unsigned > circt::hw::ModulePortLookupInfo::getInputPortIndex ( StringRef name) const
inline

Definition at line 208 of file PortImplementation.h.

References ctx, and getInputPortIndex().

◆ getOutputPortIndex() [1/2]

FailureOr< unsigned > circt::hw::ModulePortLookupInfo::getOutputPortIndex ( StringAttr name) const
inline

Definition at line 204 of file PortImplementation.h.

References lookupPortIndex(), and outputPortMap.

Referenced by getOutputPortIndex().

◆ getOutputPortIndex() [2/2]

FailureOr< unsigned > circt::hw::ModulePortLookupInfo::getOutputPortIndex ( StringRef name) const
inline

Definition at line 212 of file PortImplementation.h.

References ctx, and getOutputPortIndex().

◆ lookupPortIndex()

FailureOr< unsigned > circt::hw::ModulePortLookupInfo::lookupPortIndex ( const llvm::DenseMap< StringAttr, unsigned > & portMap,
StringAttr name ) const
inline

Definition at line 175 of file PortImplementation.h.

References failure().

Referenced by getInputPortIndex(), and getOutputPortIndex().

Member Data Documentation

◆ ctx

MLIRContext* circt::hw::ModulePortLookupInfo::ctx
private

◆ inputPortMap

llvm::DenseMap<StringAttr, unsigned> circt::hw::ModulePortLookupInfo::inputPortMap
private

Definition at line 217 of file PortImplementation.h.

Referenced by getInputPortIndex(), and ModulePortLookupInfo().

◆ outputPortMap

llvm::DenseMap<StringAttr, unsigned> circt::hw::ModulePortLookupInfo::outputPortMap
private

Definition at line 218 of file PortImplementation.h.

Referenced by getOutputPortIndex(), and ModulePortLookupInfo().


The documentation for this struct was generated from the following file: