|
52 | 52 | #include <analyses/reaching_definitions.h> |
53 | 53 | #include <analyses/dependence_graph.h> |
54 | 54 | #include <analyses/constant_propagator.h> |
| 55 | +#include <analyses/is_threaded.h> |
55 | 56 |
|
56 | 57 | #include <cbmc/version.h> |
57 | 58 |
|
@@ -246,6 +247,31 @@ int goto_instrument_parse_optionst::doit() |
246 | 247 | } |
247 | 248 | } |
248 | 249 |
|
| 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 | + |
249 | 275 | if(cmdline.isset("show-value-sets")) |
250 | 276 | { |
251 | 277 | do_indirect_call_and_rtti_removal(); |
|
0 commit comments