mirror of
https://github.com/Z3Prover/z3
synced 2025-10-03 14:33:56 +00:00
cache is_shared information in the enode
observed perf overhead for QF_NIA is that assume_eqs in theory_lra incurs significant overhead when calling is_relevant_and_shared. The call to context::is_shared and the loop checking for beta redexes is a main bottleneck. The bottleneck is avoided by caching the result if is_shared inside the enode. It is invalidated for every merge/unmerge.
This commit is contained in:
parent
eea9c0bec6
commit
61319ffd85
6 changed files with 58 additions and 6 deletions
|
@ -52,6 +52,7 @@ namespace euf {
|
|||
bool m_merge_tf_enabled = false;
|
||||
bool m_is_equality = false; // Does the expression represent an equality
|
||||
bool m_is_relevant = false;
|
||||
lbool m_is_shared = l_undef;
|
||||
lbool m_value = l_undef; // Assignment by SAT solver for Boolean node
|
||||
sat::bool_var m_bool_var = sat::null_bool_var; // SAT solver variable associated with Boolean node
|
||||
unsigned m_class_size = 1; // Size of the equivalence class if the enode is the root.
|
||||
|
@ -181,6 +182,9 @@ namespace euf {
|
|||
void unmark3() { m_mark3 = false; }
|
||||
bool is_marked3() { return m_mark3; }
|
||||
|
||||
lbool is_shared() const { return m_is_shared; }
|
||||
void set_is_shared(lbool s) { m_is_shared = s; }
|
||||
|
||||
template<bool m> void mark1_targets() {
|
||||
enode* n = this;
|
||||
while (n) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue