9#ifndef CIRCT_REDUCE_REDUCTIONUTILS_H
10#define CIRCT_REDUCE_REDUCTIONUTILS_H
47 constexpr static const char *
names[48] = {
48 "Foo",
"Bar",
"Baz",
"Qux",
"Quux",
"Quuux",
"Quuuux",
49 "Quz",
"Corge",
"Grault",
"Bazola",
"Ztesch",
"Thud",
"Grunt",
50 "Bletch",
"Fum",
"Fred",
"Jim",
"Sheila",
"Barney",
"Flarp",
51 "Zxc",
"Spqr",
"Wombat",
"Shme",
"Bongo",
"Spam",
"Eggs",
52 "Snork",
"Zot",
"Blarg",
"Wibble",
"Toto",
"Titi",
"Tata",
53 "Tutu",
"Pippo",
"Pluto",
"Paperino",
"Aap",
"Noot",
"Mies",
54 "Oogle",
"Foogle",
"Boogle",
"Zork",
"Gork",
"Bork"};
78 bool hasInnerRef(StringAttr symbol, StringAttr innerSym)
const;
86 bool hasRef(Operation *op)
const;
89 bool hasRef(StringAttr symbol)
const;
93 DenseSet<std::pair<StringAttr, StringAttr>>
innerRefs;
void pruneUnusedOps(SmallVectorImpl< Operation * > &worklist, Reduction &reduction)
Starting from an initial worklist of operations, traverse through it and its operands and erase opera...
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.