mirror of
https://github.com/Z3Prover/z3
synced 2026-06-19 07:06:28 +00:00
Remove redundant check for reference count in cache
This commit is contained in:
parent
eb775b2206
commit
c48a4aa56a
1 changed files with 2 additions and 2 deletions
|
|
@ -261,13 +261,13 @@ struct goal2sat::imp : public sat::sat_internalizer {
|
|||
|
||||
void cache(app* t, sat::literal l) override {
|
||||
force_push();
|
||||
if (t->get_ref_count() <= 1)
|
||||
return;
|
||||
m_cache_trail.push_back(t);
|
||||
// Only memoize nodes that can be revisited: a singly-referenced
|
||||
// node appears once in the goal, so it never produces a cache hit.
|
||||
// Skipping it keeps m_app2lit and m_lit2app in sync (both empty for
|
||||
// such nodes) so pop()/uncache() clean up consistently.
|
||||
if (t->get_ref_count() <= 1)
|
||||
return;
|
||||
SASSERT(!m_app2lit.contains(t));
|
||||
SASSERT(!m_lit2app.contains(l.index()));
|
||||
m_app2lit.insert(t, l);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue