Skip to content

Commit e7b1780

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

10 files changed

+2
-16
lines changed

src/goto-analyzer/static_simplifier.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,13 @@ bool static_simplifier(
157157
m.status() << "Removing unreachable instructions" << messaget::eom;
158158

159159
// Removes goto false
160-
remove_skip(goto_model.goto_functions);
161-
goto_model.goto_functions.update();
160+
remove_skip(goto_model);
162161

163162
// Convert unreachable to skips
164163
remove_unreachable(goto_model.goto_functions);
165-
goto_model.goto_functions.update();
166164

167165
// Remove all of the new skips
168-
remove_skip(goto_model.goto_functions);
169-
goto_model.goto_functions.update();
166+
remove_skip(goto_model);
170167
}
171168

172169
m.status() << "Writing goto binary" << messaget::eom;

src/goto-diff/change_impact.cpp

-1
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

-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ bool goto_diff_parse_optionst::process_goto_program(
471471

472472
// remove any skips introduced since coverage instrumentation
473473
remove_skip(goto_model);
474-
goto_model.goto_functions.update();
475474
}
476475

477476
catch(const char *e)

src/goto-instrument/accelerate/scratch_program.cpp

-1
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

-1
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

-1
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,6 @@ int goto_instrument_parse_optionst::doit()
736736
accelerate_functions(
737737
goto_model, get_message_handler(), cmdline.isset("z3"));
738738
remove_skip(goto_model);
739-
goto_model.goto_functions.update();
740739
}
741740

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

src/goto-instrument/reachability_slicer.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ void reachability_slicert::slice(goto_functionst &goto_functions)
103103

104104
// remove the skips
105105
remove_skip(goto_functions);
106-
goto_functions.update();
107106
}
108107

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

src/goto-programs/remove_function_pointers.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,7 @@ bool remove_function_pointerst::remove_function_pointers(
450450
}
451451

452452
if(did_something)
453-
{
454453
remove_skip(goto_program);
455-
goto_program.update();
456-
}
457454

458455
return did_something;
459456
}

src/goto-programs/slice_global_inits.cpp

-1
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
}

src/jbmc/jbmc_parse_options.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,6 @@ bool jbmc_parse_optionst::process_goto_functions(
966966

967967
// remove any skips introduced since coverage instrumentation
968968
remove_skip(goto_model);
969-
goto_model.goto_functions.update();
970969
}
971970

972971
catch(const char *e)

0 commit comments

Comments
 (0)