3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-08 00:05:46 +00:00

#5259 - the Ranjit 2s shave

shave a couple of seconds from the Ranjit regression
This commit is contained in:
Nikolaj Bjorner 2021-05-12 10:43:16 -07:00
parent cd82205b06
commit 7869cdbbc8
4 changed files with 31 additions and 9 deletions

View file

@ -22,6 +22,9 @@ Revision History:
void used_vars::process(expr * n, unsigned delta) {
unsigned j, idx;
if (m_num_found_vars == m_num_decls)
return;
m_cache.reset();
m_todo.reset();
m_todo.push_back(expr_delta_pair(n, delta));
@ -58,8 +61,16 @@ void used_vars::process(expr * n, unsigned delta) {
if (idx >= delta) {
idx = idx - delta;
if (idx >= m_found_vars.size())
m_found_vars.resize(idx + 1);
m_found_vars[idx] = to_var(n)->get_sort();
m_found_vars.resize(idx + 1, nullptr);
if (!m_found_vars[idx]) {
m_found_vars[idx] = to_var(n)->get_sort();
if (idx < m_num_decls)
m_num_found_vars++;
if (m_num_found_vars == m_num_decls) {
m_todo.reset();
return;
}
}
}
break;
case AST_QUANTIFIER: