Skip to content

Commit bc2c0cd

Browse files
committed
Inliner fixes
1 parent 0003d8a commit bc2c0cd

File tree

3 files changed

+7
-23
lines changed

3 files changed

+7
-23
lines changed

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ void goto_instrument_parse_optionst::instrument_goto_program()
992992
// now do full inlining, if requested
993993
if(cmdline.isset("inline"))
994994
{
995-
do_indirect_call_and_rtti_removal();
995+
do_indirect_call_and_rtti_removal(/*force=*/true);
996996

997997
if(cmdline.isset("show-custom-bitvector-analysis") ||
998998
cmdline.isset("custom-bitvector-analysis"))
@@ -1003,7 +1003,7 @@ void goto_instrument_parse_optionst::instrument_goto_program()
10031003
}
10041004

10051005
status() << "Performing full inlining" << eom;
1006-
goto_inline(goto_model, get_message_handler());
1006+
goto_inline(goto_model, get_message_handler(), true);
10071007
}
10081008

10091009
if(cmdline.isset("show-custom-bitvector-analysis") ||
@@ -1111,27 +1111,12 @@ void goto_instrument_parse_optionst::instrument_goto_program()
11111111
if(cmdline.isset("partial-inline"))
11121112
{
11131113
do_indirect_call_and_rtti_removal();
1114-
do_partial_inlining();
11151114

1116-
goto_model.goto_functions.update();
1117-
goto_model.goto_functions.compute_loop_numbers();
1118-
}
1119-
1120-
// now do full inlining, if requested
1121-
if(cmdline.isset("inline"))
1122-
{
1123-
do_indirect_call_and_rtti_removal(/*force=*/true);
1115+
status() << "Partial inlining" << eom;
1116+
goto_partial_inline(goto_functions, ns, ui_message_handler, 0, true);
11241117

1125-
if(cmdline.isset("show-custom-bitvector-analysis") ||
1126-
cmdline.isset("custom-bitvector-analysis"))
1127-
{
1128-
do_remove_returns();
1129-
thread_exit_instrumentation(goto_model);
1130-
mutex_init_instrumentation(goto_model);
1131-
}
1132-
1133-
status() << "Performing full inlining" << eom;
1134-
goto_inline(goto_model, get_message_handler(), true);
1118+
goto_functions.update();
1119+
goto_functions.compute_loop_numbers();
11351120
}
11361121

11371122
if(cmdline.isset("constant-propagator"))

src/goto-programs/goto_inline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void goto_inline(
7979

8080
Forall_goto_program_instructions(i_it, goto_program)
8181
{
82-
if(!i_it->is_function_call())
82+
if(!goto_inlinet::is_call(i_it))
8383
continue;
8484

8585
call_list.push_back(goto_inlinet::callt(i_it, false));

src/goto-programs/goto_inline_class.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9-
109
#ifndef CPROVER_GOTO_PROGRAMS_GOTO_INLINE_CLASS_H
1110
#define CPROVER_GOTO_PROGRAMS_GOTO_INLINE_CLASS_H
1211

0 commit comments

Comments
 (0)