@@ -578,6 +578,19 @@ int goto_instrument_parse_optionst::doit()
578
578
return 0 ;
579
579
}
580
580
581
+ if (cmdline.isset (" print-internal-representation" ))
582
+ {
583
+ for (auto const &pair : goto_functions.function_map )
584
+ for (auto const &ins : pair.second .body .instructions )
585
+ {
586
+ if (ins.code .is_not_nil ())
587
+ status () << ins.code .pretty () << eom;
588
+ if (ins.guard .is_not_nil ())
589
+ status () << " [guard] " << ins.guard .pretty () << eom;
590
+ }
591
+ return 0 ;
592
+ }
593
+
581
594
if (cmdline.isset (" show-goto-functions" ))
582
595
{
583
596
namespacet ns (symbol_table);
@@ -770,6 +783,7 @@ int goto_instrument_parse_optionst::doit()
770
783
error () << " Out of memory" << eom;
771
784
return 11 ;
772
785
}
786
+ // NOLINTNEXTLINE(readability/fn_size)
773
787
}
774
788
775
789
void goto_instrument_parse_optionst::do_indirect_call_and_rtti_removal (
@@ -1451,6 +1465,8 @@ void goto_instrument_parse_optionst::help()
1451
1465
" --show-symbol-table show symbol table\n "
1452
1466
" --list-symbols list symbols with type information\n "
1453
1467
HELP_SHOW_GOTO_FUNCTIONS
1468
+ " --print-internal-representation\n " // NOLINTNEXTLINE(*)
1469
+ " show verbose internal representation of the program\n "
1454
1470
" --list-undefined-functions list functions without body\n "
1455
1471
" --show-struct-alignment show struct members that might be concurrently accessed\n " // NOLINT(*)
1456
1472
" --show-natural-loops show natural loop heads\n "
@@ -1478,7 +1494,8 @@ void goto_instrument_parse_optionst::help()
1478
1494
" --nondet-static add nondeterministic initialization of variables with static lifetime\n " // NOLINT(*)
1479
1495
" --check-invariant function instruments invariant checking function\n "
1480
1496
" --remove-pointers converts pointer arithmetic to base+offset expressions\n " // NOLINT(*)
1481
- " --undefined-function-is-assume-false\n "
1497
+ // NOLINTNEXTLINE(whitespace/line_length)
1498
+ " --undefined-function-is-assume-false\n " // NOLINTNEXTLINE(whitespace/line_length)
1482
1499
" convert each call to an undefined function to assume(false)\n "
1483
1500
" \n "
1484
1501
" Loop transformations:\n "
0 commit comments