Skip to content

Commit 1a6002c

Browse files
committed
Needs more profiling: Do not sort operands as part of simplification
1 parent a695814 commit 1a6002c

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/util/simplify_expr.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2233,7 +2233,7 @@ bool simplify_exprt::simplify_node(exprt &expr)
22332233

22342234
bool result=true;
22352235

2236-
result=sort_and_join(expr) && result;
2236+
result = sort_and_join(expr, false) && result;
22372237

22382238
if(expr.id()==ID_typecast)
22392239
result=simplify_typecast(expr) && result;

src/util/simplify_utils.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static const struct saj_tablet &sort_and_join(
119119
return saj_table[i];
120120
}
121121

122-
bool sort_and_join(exprt &expr)
122+
bool sort_and_join(exprt &expr, bool do_sort)
123123
{
124124
bool result=true;
125125

@@ -158,8 +158,9 @@ bool sort_and_join(exprt &expr)
158158
}
159159

160160
// sort it
161+
if(do_sort)
162+
result = sort_operands(new_ops) && result;
161163

162-
result=sort_operands(new_ops) && result;
163164
expr.operands().swap(new_ops);
164165

165166
return result;

src/util/simplify_utils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ Author: Daniel Kroening, [email protected]
1414

1515
bool sort_operands(exprt::operandst &operands);
1616

17-
bool sort_and_join(exprt &expr);
17+
bool sort_and_join(exprt &expr, bool do_sort=true);
1818

1919
#endif // CPROVER_UTIL_SIMPLIFY_UTILS_H

0 commit comments

Comments
 (0)