@@ -436,19 +436,19 @@ bool instrumentert::cfg_visitort::contains_shared_array(
436
436
instrumenter.message .debug () << " Writes: " <<rw_set.w_entries .size ()
437
437
<<" ; Reads:" <<rw_set.r_entries .size () << messaget::eom;
438
438
439
- forall_rw_set_r_entries (r_it, rw_set)
439
+ for ( const auto &r_entry : rw_set. r_entries )
440
440
{
441
- const irep_idt var=r_it-> second .object ;
441
+ const irep_idt var = r_entry. second .object ;
442
442
instrumenter.message .debug () << " Is " <<var<<" an array?"
443
443
<< messaget::eom;
444
444
if (id2string (var).find (" []" )!=std::string::npos
445
445
&& !instrumenter.local (var))
446
446
return true ;
447
447
}
448
448
449
- forall_rw_set_w_entries (w_it, rw_set)
449
+ for ( const auto &w_entry : rw_set. w_entries )
450
450
{
451
- const irep_idt var=w_it-> second .object ;
451
+ const irep_idt var = w_entry. second .object ;
452
452
instrumenter.message .debug ()<<" Is " <<var<<" an array?" <<messaget::eom;
453
453
if (id2string (var).find (" []" )!=std::string::npos
454
454
&& !instrumenter.local (var))
@@ -874,13 +874,13 @@ void instrumentert::cfg_visitort::visit_cfg_assign(
874
874
continue; // return;
875
875
#endif
876
876
877
- forall_rw_set_r_entries (r_it, rw_set)
877
+ for ( const auto &r_entry : rw_set. r_entries )
878
878
{
879
879
/* creates Read:
880
880
read is the irep_id of the read in the code;
881
881
new_read_event is the corresponding abstract event;
882
882
new_read_node is the node in the graph */
883
- const irep_idt &read =r_it-> second .object ;
883
+ const irep_idt &read = r_entry. second .object ;
884
884
885
885
/* skip local variables */
886
886
if (local (read ))
@@ -976,13 +976,13 @@ void instrumentert::cfg_visitort::visit_cfg_assign(
976
976
}
977
977
978
978
/* Write (Wa) */
979
- forall_rw_set_w_entries (w_it, rw_set)
979
+ for ( const auto &w_entry : rw_set. w_entries )
980
980
{
981
981
/* creates Write:
982
982
write is the irep_id in the code;
983
983
new_write_event is the corresponding abstract event;
984
984
new_write_node is the node in the graph */
985
- const irep_idt &write =w_it-> second .object ;
985
+ const irep_idt &write = w_entry. second .object ;
986
986
987
987
instrumenter.message .debug () << " WRITE: " << write << messaget::eom;
988
988
@@ -1142,30 +1142,34 @@ void instrumentert::cfg_visitort::visit_cfg_assign(
1142
1142
/* data dependency analysis */
1143
1143
if (!no_dependencies)
1144
1144
{
1145
- forall_rw_set_w_entries (write_it, rw_set)
1146
- forall_rw_set_r_entries (read_it, rw_set)
1145
+ for (const auto &w_entry : rw_set.w_entries )
1146
+ {
1147
+ for (const auto &r_entry : rw_set.r_entries )
1147
1148
{
1148
- const irep_idt &write =write_it-> second .object ;
1149
- const irep_idt &read =read_it-> second .object ;
1149
+ const irep_idt &write = w_entry. second .object ;
1150
+ const irep_idt &read = r_entry. second .object ;
1150
1151
instrumenter.message .debug () << " dp: Write:" <<write <<" ; Read:" <<read
1151
1152
<< messaget::eom;
1152
1153
const datat read_p (read , instruction.source_location );
1153
1154
const datat write_p (write , instruction.source_location );
1154
1155
data_dp.dp_analysis (read_p, local (read ), write_p, local (write ));
1155
1156
}
1157
+ }
1156
1158
data_dp.dp_merge ();
1157
1159
1158
- forall_rw_set_r_entries (read2_it, rw_set)
1159
- forall_rw_set_r_entries (read_it, rw_set)
1160
+ for (const auto &r_entry : rw_set.r_entries )
1161
+ {
1162
+ for (const auto &r_entry2 : rw_set.r_entries )
1160
1163
{
1161
- const irep_idt &read2=read2_it-> second .object ;
1162
- const irep_idt &read =read_it-> second .object ;
1164
+ const irep_idt &read2 = r_entry2. second .object ;
1165
+ const irep_idt &read = r_entry. second .object ;
1163
1166
if (read2==read )
1164
1167
continue ;
1165
1168
const datat read_p (read , instruction.source_location );
1166
1169
const datat read2_p (read2, instruction.source_location );
1167
1170
data_dp.dp_analysis (read_p, local (read ), read2_p, local (read2));
1168
1171
}
1172
+ }
1169
1173
data_dp.dp_merge ();
1170
1174
}
1171
1175
}
0 commit comments