16 unsigned max_block_size)
19 typedef std::set<goto_programt::const_targett> targetst;
23 for(goto_programt::instructionst::iterator
28 for(
const auto &target : i_it->targets)
29 targets.insert(target);
32 for(goto_programt::instructionst::iterator
38 if(it->is_goto() || it->is_dead() ||
39 it->is_assert() || it->is_assume() ||
40 it->is_atomic_begin() || it->is_atomic_end() ||
41 it->is_end_thread() || it->is_start_thread() ||
42 it->is_end_function() || it->is_location() ||
43 it->is_skip() || it->is_function_call() ||
46 else if(it->is_other() || it->is_assign())
55 targetst::iterator t_it;
58 goto_programt::instructionst::iterator end_block = it;
64 t_it=targets.find(end_block);
66 if(max_block_size!=0 && count>=max_block_size)
70 (end_block->is_other() || end_block->is_assign()) &&
78 for(goto_programt::instructionst::iterator stmt = it;
81 if(!stmt->code.is_nil())
84 it->code.swap(new_block);
instructionst instructions
The list of instructions in the goto program.
void move_to_operands(exprt &expr)
Group Basic Blocks in Goto Program.
A specialization of goto_program_templatet over goto programs in which instructions have codet type...
void basic_blocks(goto_programt &goto_program, unsigned max_block_size)
convert basic blocks into single expressions of type "block"