File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -301,8 +301,9 @@ void local_value_sett::get_value_set_rec(
301
301
bool loop_found=new_ext_set.extend_access_path (
302
302
new_entry, external_value_set_typet::PRECISE);
303
303
304
- // TODO: handle loops properly
305
- if (!loop_found)
304
+ if (loop_found)
305
+ precise_evs_curtailed_because_of_loop = true ;
306
+ else
306
307
{
307
308
new_ext_set.type ()=field_type.subtype ();
308
309
@@ -605,8 +606,9 @@ void local_value_sett::assign_rec(
605
606
bool loop_found=new_ext_set.extend_access_path (
606
607
new_entry, external_value_set_typet::PRECISE);
607
608
608
- // TODO: handle loops properly
609
- if (!loop_found)
609
+ if (loop_found)
610
+ precise_evs_curtailed_because_of_loop = true ;
611
+ else
610
612
{
611
613
const std::string basename=
612
614
new_ext_set.get_access_path_basename (declared_on_type);
@@ -668,4 +670,6 @@ void local_value_sett::make_union_bookkeeping_data_structures(
668
670
other.num_reads_of_field_of_external_object ;
669
671
num_writes_to_field_of_external_object+=
670
672
other.num_writes_to_field_of_external_object ;
673
+ precise_evs_curtailed_because_of_loop &=
674
+ other.precise_evs_curtailed_because_of_loop ;
671
675
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class local_value_sett:public value_sett
20
20
21
21
mutable unsigned int num_reads_of_field_of_external_object=0 ;
22
22
mutable unsigned int num_writes_to_field_of_external_object=0 ;
23
- mutable bool no_merges= true ;
23
+ mutable bool precise_evs_curtailed_because_of_loop= false ;
24
24
25
25
// / Determines whether we should export precise or per_field external value
26
26
// / sets in function summaries.
@@ -30,8 +30,10 @@ class local_value_sett:public value_sett
30
30
#ifdef DO_NOT_USE_PRECISE_EXTERNAL_VALUE_SETS
31
31
return false ;
32
32
#else
33
- return no_merges && (num_reads_of_field_of_external_object
34
- +num_writes_to_field_of_external_object<=1 );
33
+ return !precise_evs_curtailed_because_of_loop &&
34
+ (num_reads_of_field_of_external_object +
35
+ num_writes_to_field_of_external_object <=
36
+ 1 );
35
37
#endif
36
38
}
37
39
You can’t perform that action at this time.
0 commit comments