@@ -45,10 +45,7 @@ bool local_bitvector_analysist::merge(points_tot &a, points_tot &b)
45
45
std::max (a.size (), b.size ());
46
46
47
47
for (std::size_t i=0 ; i<max_index; i++)
48
- {
49
- if (a[i].merge (b[i]))
50
- result=true ;
51
- }
48
+ result |= a[i].merge (b[i]);
52
49
53
50
return result;
54
51
}
@@ -73,7 +70,7 @@ void local_bitvector_analysist::assign_lhs(
73
70
74
71
if (is_tracked (identifier))
75
72
{
76
- unsigned dest_pointer= pointers.number (identifier);
73
+ const auto dest_pointer = pointers.number (identifier);
77
74
flagst rhs_flags=get_rec (rhs, loc_info_src);
78
75
loc_info_dest[dest_pointer]=rhs_flags;
79
76
}
@@ -128,7 +125,7 @@ local_bitvector_analysist::flagst local_bitvector_analysist::get_rec(
128
125
const irep_idt &identifier=to_symbol_expr (rhs).get_identifier ();
129
126
if (is_tracked (identifier))
130
127
{
131
- unsigned src_pointer= pointers.number (identifier);
128
+ const auto src_pointer = pointers.number (identifier);
132
129
return loc_info_src[src_pointer];
133
130
}
134
131
else
@@ -242,8 +239,8 @@ void local_bitvector_analysist::build()
242
239
if (cfg.nodes .empty ())
243
240
return ;
244
241
245
- work_queuet work_queue;
246
- work_queue.push (0 );
242
+ std::set<local_cfgt::node_nrt> work_queue;
243
+ work_queue.insert (0 );
247
244
248
245
loc_infos.resize (cfg.nodes .size ());
249
246
@@ -258,10 +255,10 @@ void local_bitvector_analysist::build()
258
255
259
256
while (!work_queue.empty ())
260
257
{
261
- unsigned loc_nr= work_queue.top ();
258
+ const auto loc_nr = * work_queue.begin ();
262
259
const local_cfgt::nodet &node=cfg.nodes [loc_nr];
263
260
const goto_programt::instructiont &instruction=*node.t ;
264
- work_queue.pop ( );
261
+ work_queue.erase (work_queue. begin () );
265
262
266
263
auto &loc_info_src=loc_infos[loc_nr];
267
264
auto loc_info_dest=loc_infos[loc_nr];
@@ -338,7 +335,7 @@ void local_bitvector_analysist::build()
338
335
{
339
336
assert (succ<loc_infos.size ());
340
337
if (merge (loc_infos[succ], (loc_info_dest)))
341
- work_queue.push (succ);
338
+ work_queue.insert (succ);
342
339
}
343
340
}
344
341
}
@@ -348,7 +345,7 @@ void local_bitvector_analysist::output(
348
345
const goto_functiont &goto_function,
349
346
const namespacet &ns) const
350
347
{
351
- unsigned l= 0 ;
348
+ std:: size_t l = 0 ;
352
349
353
350
for (const auto &instruction : goto_function.body .instructions )
354
351
{
0 commit comments