15 #ifndef CIRCT_DIALECT_FIRRTL_FIELDREFCACHE_H
16 #define CIRCT_DIALECT_FIRRTL_FIELDREFCACHE_H
27 using Key = llvm::PointerIntPair<Value, 1, bool>;
28 DenseMap<Key, FieldRef>
refs;
44 void addToTotals(
size_t &totalHits,
size_t &totalComputed,
45 size_t &totalQueries)
const;
This class represents a reference to a specific field or element of an aggregate value.
Caching version of getFieldRefFromValue.
llvm::PointerIntPair< Value, 1, bool > Key
void clear()
Drop all cached entries.
void addToTotals(size_t &totalHits, size_t &totalComputed, size_t &totalQueries) const
void printStats(llvm::raw_ostream &os) const
void verify() const
Verify cached fieldRefs against firrtl::getFieldRefFromValue.
FieldRef getFieldRefFromValue(Value value, bool lookThroughCasts=false)
Caching version of getFieldRefFromValue.
DenseMap< Key, FieldRef > refs
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.