Skip to content

Commit 3d302ba

Browse files
author
Daniel Kroening
committed
letify: use irep_hash_mapt when hashing is expensive
Fixes: #344 und Fixes: #1944
1 parent 9a0ffae commit 3d302ba

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/solvers/smt2/smt2_conv.h

+9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Author: Daniel Kroening, [email protected]
1616
#include <util/std_expr.h>
1717
#include <util/byte_operators.h>
1818

19+
#ifndef HASH_CODE
20+
#include <util/irep_hash_container.h>
21+
#endif
22+
1923
#include <solvers/prop/prop_conv.h>
2024
#include <solvers/flattening/boolbv_width.h>
2125
#include <solvers/flattening/pointer_logic.h>
@@ -181,7 +185,12 @@ class smt2_convt:public prop_convt
181185
symbol_exprt let_symbol;
182186
};
183187

188+
#ifdef HASH_CODE
184189
typedef std::unordered_map<exprt, let_count_idt, irep_hash> seen_expressionst;
190+
#else
191+
typedef irep_hash_mapt<exprt, let_count_idt> seen_expressionst;
192+
#endif
193+
185194
std::size_t let_id_count;
186195
static const std::size_t LET_COUNT = 2;
187196

0 commit comments

Comments
 (0)