@@ -52,6 +52,7 @@ Author: Daniel Kroening, kroening@kroening.com
5252#include < analyses/reaching_definitions.h>
5353#include < analyses/dependence_graph.h>
5454#include < analyses/constant_propagator.h>
55+ #include < analyses/is_threaded.h>
5556
5657#include < cbmc/version.h>
5758
@@ -246,6 +247,31 @@ int goto_instrument_parse_optionst::doit()
246247 }
247248 }
248249
250+ if (cmdline.isset (" show-threaded" ))
251+ {
252+ namespacet ns (symbol_table);
253+
254+ is_threadedt is_threaded (goto_functions);
255+
256+ forall_goto_functions (f_it, goto_functions)
257+ {
258+ std::cout << " ////" << std::endl;
259+ std::cout << " //// Function: " << f_it->first << std::endl;
260+ std::cout << " ////" << std::endl;
261+ std::cout << std::endl;
262+
263+ const goto_programt &goto_program=f_it->second .body ;
264+
265+ forall_goto_program_instructions (i_it, goto_program)
266+ {
267+ goto_program.output_instruction (ns, " " , std::cout, i_it);
268+ std::cout << " Is threaded: " << (is_threaded (i_it)?" True" :" False" )
269+ << std::endl;
270+ std::cout << std::endl;
271+ }
272+ }
273+ }
274+
249275 if (cmdline.isset (" show-value-sets" ))
250276 {
251277 do_indirect_call_and_rtti_removal ();
0 commit comments