Skip to content

Commit 88e52cf

Browse files
committed
Use ID_C_expr_simplified
1 parent 7c9c513 commit 88e52cf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/util/simplify_expr.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -2334,20 +2334,22 @@ bool simplify_exprt::simplify_rec(exprt &expr)
23342334
exprt tmp=expr;
23352335
bool result=true;
23362336

2337+
if(!tmp.get_bool(ID_C_expr_simplified))
2338+
{
23372339
result=simplify_node_preorder(tmp);
23382340

23392341
if(!simplify_node(tmp))
23402342
result=false;
23412343

2342-
#if 1
23432344
replace_mapt::const_iterator it=local_replace_map.find(tmp);
23442345
if(it!=local_replace_map.end())
23452346
{
23462347
tmp=it->second;
23472348
result=false;
23482349
}
2349-
#else
2350-
if(!local_replace_map.empty() &&
2350+
}
2351+
#if 0
2352+
else if(!local_replace_map.empty() &&
23512353
!replace_expr(local_replace_map, tmp))
23522354
{
23532355
simplify_rec(tmp);
@@ -2357,6 +2359,7 @@ bool simplify_exprt::simplify_rec(exprt &expr)
23572359

23582360
if(!result)
23592361
{
2362+
tmp.set(ID_C_expr_simplified, true);
23602363
expr.swap(tmp);
23612364

23622365
#ifdef USE_CACHE

0 commit comments

Comments
 (0)