CIRCT
20.0.0git
|
The target of an inner symbol, the entity the symbol is a handle for. More...
#include <InnerSymbolTable.h>
Public Member Functions | |
InnerSymTarget () | |
Default constructor, invalid. More... | |
InnerSymTarget (Operation *op) | |
Target an operation. More... | |
InnerSymTarget (Operation *op, size_t fieldID) | |
Target an operation and a field (=0 means the op itself). More... | |
InnerSymTarget (size_t portIdx, Operation *op, size_t fieldID=0) | |
Target a port, and optionally a field (=0 means the port itself). More... | |
InnerSymTarget (const InnerSymTarget &)=default | |
InnerSymTarget (InnerSymTarget &&)=default | |
auto | getField () const |
Return the target's fieldID. More... | |
Operation * | getOp () const |
Return the target's base operation. For ports, this is the module. More... | |
auto | getPort () const |
Return the target's port, if valid. Check "isPort()". More... | |
bool | isField () const |
Return if this targets a field (nonzero fieldID). More... | |
bool | isPort () const |
Return if this targets a port. More... | |
bool | isOpOnly () const |
Returns if this targets an operation only (not port or field). More... | |
bool | operator== (const InnerSymTarget &rhs) const |
InnerSymTarget & | operator= (InnerSymTarget &&)=default |
InnerSymTarget & | operator= (const InnerSymTarget &)=default |
operator bool () const | |
Check if this target is valid. More... | |
Static Public Member Functions | |
static InnerSymTarget | getTargetForSubfield (const InnerSymTarget &base, size_t fieldID) |
Return a target to the specified field within the given base. More... | |
Private Member Functions | |
auto | asTuple () const |
Private Attributes | |
Operation * | op = nullptr |
size_t | portIdx = 0 |
size_t | fieldID = 0 |
Static Private Attributes | |
static constexpr size_t | invalidPort = ~size_t{0} |
The target of an inner symbol, the entity the symbol is a handle for.
Definition at line 27 of file InnerSymbolTable.h.
|
inline |
Default constructor, invalid.
Definition at line 30 of file InnerSymbolTable.h.
References assert().
Referenced by getTargetForSubfield().
|
inlineexplicit |
Target an operation.
Definition at line 33 of file InnerSymbolTable.h.
|
inline |
Target an operation and a field (=0 means the op itself).
Definition at line 36 of file InnerSymbolTable.h.
|
inline |
Target a port, and optionally a field (=0 means the port itself).
Definition at line 40 of file InnerSymbolTable.h.
|
default |
|
default |
|
inlineprivate |
Definition at line 81 of file InnerSymbolTable.h.
References fieldID, op, and portIdx.
Referenced by operator==().
|
inline |
Return the target's fieldID.
Definition at line 49 of file InnerSymbolTable.h.
References fieldID.
Referenced by dropSymbol(), circt::firrtl::getFieldRefForTarget(), circt::hw::InnerSymbolTable::getInnerSymbol(), circt::firrtl::getOrAddInnerSym(), and circt::hw::operator<<().
|
inline |
Return the target's base operation. For ports, this is the module.
Definition at line 52 of file InnerSymbolTable.h.
References op.
Referenced by dropSymbol(), circt::hw::InnerSymbolTable::get(), circt::firrtl::getFieldRefForTarget(), circt::firrtl::getInnerRefTo(), circt::hw::InnerSymbolTable::getInnerSymbol(), circt::firrtl::getOrAddInnerSym(), and circt::hw::operator<<().
|
inline |
Return the target's port, if valid. Check "isPort()".
Definition at line 55 of file InnerSymbolTable.h.
References assert(), isPort(), and portIdx.
Referenced by dropSymbol(), circt::firrtl::getFieldRefForTarget(), circt::hw::InnerSymbolTable::getInnerSymbol(), circt::firrtl::getOrAddInnerSym(), and circt::hw::operator<<().
|
inlinestatic |
Return a target to the specified field within the given base.
FieldID is relative to the specified base target.
Definition at line 73 of file InnerSymbolTable.h.
References fieldID, InnerSymTarget(), isPort(), op, and portIdx.
Referenced by circt::hw::InnerSymbolTable::walkSymbols().
|
inline |
Return if this targets a field (nonzero fieldID).
Definition at line 63 of file InnerSymbolTable.h.
References fieldID.
Referenced by isOpOnly(), and circt::hw::operator<<().
|
inline |
Returns if this targets an operation only (not port or field).
Definition at line 69 of file InnerSymbolTable.h.
|
inline |
Return if this targets a port.
Definition at line 66 of file InnerSymbolTable.h.
References invalidPort, and portIdx.
Referenced by dropSymbol(), circt::firrtl::getFieldRefForTarget(), circt::firrtl::getInnerRefTo(), circt::hw::InnerSymbolTable::getInnerSymbol(), circt::firrtl::getOrAddInnerSym(), getPort(), getTargetForSubfield(), isOpOnly(), and circt::hw::operator<<().
|
inline |
|
default |
|
default |
|
inline |
Definition at line 91 of file InnerSymbolTable.h.
References asTuple().
|
private |
Definition at line 84 of file InnerSymbolTable.h.
Referenced by asTuple(), getField(), getTargetForSubfield(), and isField().
|
staticconstexprprivate |
Definition at line 85 of file InnerSymbolTable.h.
Referenced by isPort().
|
private |
Definition at line 82 of file InnerSymbolTable.h.
Referenced by asTuple(), getOp(), getTargetForSubfield(), and operator bool().
|
private |
Definition at line 83 of file InnerSymbolTable.h.
Referenced by asTuple(), getPort(), getTargetForSubfield(), and isPort().