Rename const pool cache rebuild (#7845)
This commit is contained in:
parent
3b97c7fd4d
commit
88147b01cf
|
|
@ -1000,8 +1000,8 @@ public:
|
||||||
// this matters, the caller must handle the dtype difference as appropriate. If 'mergeDType' is
|
// this matters, the caller must handle the dtype difference as appropriate. If 'mergeDType' is
|
||||||
// false, the returned VarScope will have _->dtypep()->sameTree(initp->dtypep()) return true.
|
// false, the returned VarScope will have _->dtypep()->sameTree(initp->dtypep()) return true.
|
||||||
AstVarScope* findConst(AstConst* initp, bool mergeDType);
|
AstVarScope* findConst(AstConst* initp, bool mergeDType);
|
||||||
// Rebuild hashes after potential removals
|
// Rebuild hashes and missing variable scopes after potential removals
|
||||||
void reCache();
|
void rebuildVarScopesAndCache();
|
||||||
};
|
};
|
||||||
class AstConstraint final : public AstNode {
|
class AstConstraint final : public AstNode {
|
||||||
// Constraint
|
// Constraint
|
||||||
|
|
|
||||||
|
|
@ -1780,7 +1780,7 @@ AstVarScope* AstConstPool::findConst(AstConst* initp, bool mergeDType) {
|
||||||
return varScopep;
|
return varScopep;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AstConstPool::reCache() {
|
void AstConstPool::rebuildVarScopesAndCache() {
|
||||||
m_tables.clear();
|
m_tables.clear();
|
||||||
m_consts.clear();
|
m_consts.clear();
|
||||||
std::unordered_map<const AstVar*, AstVarScope*> varScopeps;
|
std::unordered_map<const AstVar*, AstVarScope*> varScopeps;
|
||||||
|
|
|
||||||
|
|
@ -597,7 +597,7 @@ public:
|
||||||
// We may have removed some datatypes, cleanup
|
// We may have removed some datatypes, cleanup
|
||||||
nodep->typeTablep()->repairCache();
|
nodep->typeTablep()->repairCache();
|
||||||
VIsCached::clearCacheTree(); // Removing assignments may affect isPure
|
VIsCached::clearCacheTree(); // Removing assignments may affect isPure
|
||||||
nodep->constPoolp()->reCache();
|
nodep->constPoolp()->rebuildVarScopesAndCache();
|
||||||
}
|
}
|
||||||
~DeadVisitor() override {
|
~DeadVisitor() override {
|
||||||
V3Stats::addStatSum("Optimizations, deadified FTasks", m_statFTasksDeadified);
|
V3Stats::addStatSum("Optimizations, deadified FTasks", m_statFTasksDeadified);
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ module t;
|
||||||
assign idx = cyc[3:0];
|
assign idx = cyc[3:0];
|
||||||
|
|
||||||
// V3Case lowers this to a 512-bit constant-pool lookup table before V3Dead
|
// V3Case lowers this to a 512-bit constant-pool lookup table before V3Dead
|
||||||
// calls AstConstPool::reCache().
|
// calls AstConstPool::rebuildVarScopesAndCache().
|
||||||
logic [31:0] case_word;
|
logic [31:0] case_word;
|
||||||
always_comb
|
always_comb
|
||||||
case (idx)
|
case (idx)
|
||||||
Loading…
Reference in New Issue