CIRCT 22.0.0git
|
A helper struct that scans a root operation and all its nested operations for InnerRefAttr
s.
More...
#include <ReductionUtils.h>
Public Member Functions | |
InnerSymbolUses (Operation *root) | |
InnerSymbolUses ()=default | |
InnerSymbolUses (const InnerSymbolUses &)=default | |
InnerSymbolUses (InnerSymbolUses &&)=default | |
InnerSymbolUses & | operator= (const InnerSymbolUses &)=default |
InnerSymbolUses & | operator= (InnerSymbolUses &&)=default |
bool | hasInnerRef (Operation *op) const |
Check whether an op is targeted by an inner ref. | |
bool | hasInnerRef (hw::InnerRefAttr innerRef) const |
Check if the given inner ref is used. | |
bool | hasInnerRef (StringAttr symbol) const |
Check if the given symbol name is targeted by an inner ref. | |
bool | hasInnerRef (StringAttr symbol, StringAttr innerSym) const |
Check if the given symbol and inner symbol name pair is targeted by an inner ref. | |
bool | hasSymbolRef (Operation *op) const |
Check whether the given symbol is targeted by a symbol ref. | |
bool | hasSymbolRef (StringAttr symbol) const |
Check whether the given symbol name is targeted by a symbol ref. | |
bool | hasRef (Operation *op) const |
Check whether the given symbol is targeted by a symbol ref or inner ref. | |
bool | hasRef (StringAttr symbol) const |
Check whether the given symbol name is targeted by a symbol ref or inner ref. | |
Private Attributes | |
DenseSet< std::pair< StringAttr, StringAttr > > | innerRefs |
Symbol and inner symbol name pairs used in inner refs. | |
DenseSet< StringAttr > | innerRefModules |
Symbol names used in inner refs. | |
DenseSet< StringAttr > | symbolRefs |
Symbol names used in symbol or inner refs. | |
A helper struct that scans a root operation and all its nested operations for InnerRefAttr
s.
Definition at line 27 of file ReductionUtils.h.
InnerSymbolUses::InnerSymbolUses | ( | Operation * | root | ) |
Definition at line 43 of file ReductionUtils.cpp.
References innerRefModules, innerRefs, and symbolRefs.
|
default |
|
default |
|
default |
bool InnerSymbolUses::hasInnerRef | ( | hw::InnerRefAttr | innerRef | ) | const |
Check if the given inner ref is used.
Definition at line 81 of file ReductionUtils.cpp.
References innerRefs.
bool InnerSymbolUses::hasInnerRef | ( | Operation * | op | ) | const |
Check whether an op is targeted by an inner ref.
Considers both the sym_name
and the inner_sym
attributes on the given op.
Definition at line 65 of file ReductionUtils.cpp.
References circt::hw::InnerSymbolTable::getInnerSymbol(), getSymbolName(), and hasInnerRef().
Referenced by hasInnerRef(), hasRef(), and hasRef().
bool InnerSymbolUses::hasInnerRef | ( | StringAttr | symbol | ) | const |
Check if the given symbol name is targeted by an inner ref.
Definition at line 85 of file ReductionUtils.cpp.
References innerRefModules.
bool InnerSymbolUses::hasInnerRef | ( | StringAttr | symbol, |
StringAttr | innerSym | ||
) | const |
Check if the given symbol and inner symbol name pair is targeted by an inner ref.
Definition at line 89 of file ReductionUtils.cpp.
References innerRefs.
bool InnerSymbolUses::hasRef | ( | Operation * | op | ) | const |
Check whether the given symbol is targeted by a symbol ref or inner ref.
Definition at line 102 of file ReductionUtils.cpp.
References hasInnerRef(), and hasSymbolRef().
bool InnerSymbolUses::hasRef | ( | StringAttr | symbol | ) | const |
Check whether the given symbol name is targeted by a symbol ref or inner ref.
Definition at line 106 of file ReductionUtils.cpp.
References hasInnerRef(), and hasSymbolRef().
bool InnerSymbolUses::hasSymbolRef | ( | Operation * | op | ) | const |
Check whether the given symbol is targeted by a symbol ref.
Definition at line 94 of file ReductionUtils.cpp.
References getSymbolName(), and symbolRefs.
bool InnerSymbolUses::hasSymbolRef | ( | StringAttr | symbol | ) | const |
Check whether the given symbol name is targeted by a symbol ref.
Definition at line 98 of file ReductionUtils.cpp.
References symbolRefs.
|
default |
|
default |
|
private |
Symbol names used in inner refs.
Definition at line 63 of file ReductionUtils.h.
Referenced by hasInnerRef(), and InnerSymbolUses().
|
private |
Symbol and inner symbol name pairs used in inner refs.
Definition at line 61 of file ReductionUtils.h.
Referenced by hasInnerRef(), hasInnerRef(), and InnerSymbolUses().
|
private |
Symbol names used in symbol or inner refs.
Definition at line 65 of file ReductionUtils.h.
Referenced by hasSymbolRef(), hasSymbolRef(), and InnerSymbolUses().