Internals: Simplify DfgPeephole replacement scheme

Always only replace the currently iterated node. This ensures it is not
on the work list, which simplifies upcoming work.

No functional of performance change intended.
This commit is contained in:
Geza Lore 2026-03-23 09:09:47 +00:00
parent 24918b83be
commit 855884f748
2 changed files with 266 additions and 346 deletions

View File

@ -339,7 +339,7 @@ public:
for (DfgVertex& vtx : m_dfg.opVertices()) cache(&vtx);
}
// Add an existing vertex to the cache. If an equivalent already exists,
// Add an existing vertex to the cache. If an equivalent (but different) already exists,
// it is returned and the cache is not updated.
DfgVertex* cache(DfgVertex* vtxp) { return m_vtxType2Cachep[vtxp->type()]->cache(vtxp); }

File diff suppressed because it is too large Load Diff