9#ifndef CIRCT_REDUCE_REDUCTIONUTILS_H
10#define CIRCT_REDUCE_REDUCTIONUTILS_H
46 bool hasInnerRef(StringAttr symbol, StringAttr innerSym)
const;
54 bool hasRef(Operation *op)
const;
57 bool hasRef(StringAttr symbol)
const;
61 DenseSet<std::pair<StringAttr, StringAttr>>
innerRefs;
void pruneUnusedOps(Operation *initialOp, Reduction &reduction)
Starting at the given op, traverse through it and its operands and erase operations that have no more...
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
An abstract reduction pattern.
A helper struct that scans a root operation and all its nested operations for InnerRefAttrs.
DenseSet< StringAttr > innerRefModules
Symbol names used in inner refs.
bool hasSymbolRef(Operation *op) const
Check whether the given symbol is targeted by a symbol ref.
bool hasInnerRef(Operation *op) const
Check whether an op is targeted by an inner ref.
DenseSet< StringAttr > symbolRefs
Symbol names used in symbol or inner refs.
InnerSymbolUses()=default
InnerSymbolUses & operator=(InnerSymbolUses &&)=default
bool hasRef(Operation *op) const
Check whether the given symbol is targeted by a symbol ref or inner ref.
InnerSymbolUses & operator=(const InnerSymbolUses &)=default
InnerSymbolUses(const InnerSymbolUses &)=default
InnerSymbolUses(InnerSymbolUses &&)=default
DenseSet< std::pair< StringAttr, StringAttr > > innerRefs
Symbol and inner symbol name pairs used in inner refs.