Skip to content

Commit e9cdffd

Browse files
committed
remove_skip includes goto_{program,functions}.update(), avoid redundant calls
1 parent cfb733a commit e9cdffd

File tree

11 files changed

+2
-18
lines changed

11 files changed

+2
-18
lines changed

jbmc/src/jbmc/jbmc_parse_options.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,6 @@ bool jbmc_parse_optionst::process_goto_functions(
983983

984984
// remove any skips introduced since coverage instrumentation
985985
remove_skip(goto_model);
986-
goto_model.goto_functions.update();
987986
}
988987

989988
catch(const char *e)

src/goto-analyzer/static_simplifier.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,13 @@ bool static_simplifier(
158158
m.status() << "Removing unreachable instructions" << messaget::eom;
159159

160160
// Removes goto false
161-
remove_skip(goto_model.goto_functions);
162-
goto_model.goto_functions.update();
161+
remove_skip(goto_model);
163162

164163
// Convert unreachable to skips
165164
remove_unreachable(goto_model.goto_functions);
166-
goto_model.goto_functions.update();
167165

168166
// Remove all of the new skips
169-
remove_skip(goto_model.goto_functions);
170-
goto_model.goto_functions.update();
167+
remove_skip(goto_model);
171168
}
172169

173170
// restore return types before writing the binary

src/goto-diff/change_impact.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ void full_slicert::operator()(
132132

133133
// remove the skips
134134
remove_skip(goto_functions);
135-
goto_functions.update();
136135
}
137136

138137

src/goto-diff/goto_diff_parse_options.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ bool goto_diff_parse_optionst::process_goto_program(
445445

446446
// remove any skips introduced since coverage instrumentation
447447
remove_skip(goto_model);
448-
goto_model.goto_functions.update();
449448
}
450449

451450
catch(const char *e)

src/goto-instrument/accelerate/scratch_program.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ bool scratch_programt::check_sat(bool do_slice)
2929
add_instruction(END_FUNCTION);
3030

3131
remove_skip(*this);
32-
update();
3332

3433
#ifdef DEBUG
3534
std::cout << "Checking following program for satness:\n";

src/goto-instrument/full_slicer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ void full_slicert::operator()(
364364

365365
// remove the skips
366366
remove_skip(goto_functions);
367-
goto_functions.update();
368367
}
369368

370369
void full_slicer(

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,6 @@ int goto_instrument_parse_optionst::doit()
707707
accelerate_functions(
708708
goto_model, get_message_handler(), cmdline.isset("z3"));
709709
remove_skip(goto_model);
710-
goto_model.goto_functions.update();
711710
}
712711

713712
if(cmdline.isset("horn-encoding"))

src/goto-instrument/model_argc_argv.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,6 @@ bool model_argc_argv(
182182

183183
// update counters etc.
184184
remove_skip(start);
185-
start.compute_loop_numbers();
186-
goto_model.goto_functions.update();
187185

188186
return false;
189187
}

src/goto-instrument/reachability_slicer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ void reachability_slicert::slice(goto_functionst &goto_functions)
206206

207207
// remove the skips
208208
remove_skip(goto_functions);
209-
goto_functions.update();
210209
}
211210

212211
/// Perform reachability slicing on goto_model, with respect to the

src/goto-programs/remove_function_pointers.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,7 @@ bool remove_function_pointerst::remove_function_pointers(
451451
}
452452

453453
if(did_something)
454-
{
455454
remove_skip(goto_program);
456-
goto_program.update();
457-
}
458455

459456
return did_something;
460457
}

src/goto-programs/slice_global_inits.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,4 @@ void slice_global_inits(goto_modelt &goto_model)
8888
}
8989

9090
remove_skip(goto_functions);
91-
goto_functions.update();
9291
}

0 commit comments

Comments
 (0)