Skip to content

Commit 985f1a7

Browse files
author
Daniel Kroening
authored
Merge pull request #741 from tautschnig/fct-ptr-stats
Provide statistics of function-pointer removal
2 parents e88df0b + ff0088f commit 985f1a7

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/goto-programs/remove_function_pointers.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,11 @@ void remove_function_pointerst::remove_function_pointer(
503503
code_expression.expression()=function;
504504
target->code.swap(code_expression);
505505
target->type=OTHER;
506+
507+
// report statistics
508+
statistics().source_location=target->source_location;
509+
statistics() << "replacing function pointer by "
510+
<< functions.size() << " possible targets" << eom;
506511
}
507512

508513
/*******************************************************************\

src/musketeer/musketeer_parse_options.cpp

+5-8
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,11 @@ void goto_fence_inserter_parse_optionst::instrument_goto_program(
244244
// return;
245245
#if 0
246246
status() << "Function Pointer Removal" << eom;
247-
remove_function_pointers(symbol_table, goto_functions,
248-
cmdline.isset("pointer-check"));
249-
#endif
250-
251-
#if 0
252-
// do partial inlining
253-
status() << "Partial Inlining" << eom;
254-
goto_partial_inline(goto_functions, ns, ui_message_handler);
247+
remove_function_pointers(
248+
get_message_handler(),
249+
symbol_table,
250+
goto_functions,
251+
cmdline.isset("pointer-check");
255252
#endif
256253

257254
status() << "Pointer Analysis" << eom;

0 commit comments

Comments
 (0)