32 if(!ignore_labels && !it->labels.empty())
36 return !it->code().get_bool(ID_explicit);
40 if(it->condition().is_false())
51 return it->condition().is_true() && it->get_target() == next_it;
56 if(it->get_other().is_nil())
59 const irep_idt &statement = it->get_other().get_statement();
61 if(statement==ID_skip)
63 else if(statement==ID_expression)
67 if(expr.
id()==ID_typecast &&
68 expr.
type().
id()==ID_empty &&
101 typedef std::map<goto_programt::targett, goto_programt::targett>
103 new_targetst new_targets;
107 for(goto_programt::instructionst::iterator it = begin; it != end;)
112 std::list<irep_idt> labels;
114 while(
is_skip(goto_program, it,
true))
119 it == std::prev(end) ||
120 (std::next(it)->is_end_function() &&
121 (!labels.empty() || !it->labels.empty())))
127 labels.splice(labels.end(), it->labels);
134 it->labels.splice(it->labels.begin(), labels);
136 if(new_target!=old_target)
138 for(; old_target!=new_target; ++old_target)
139 new_targets[old_target]=new_target;
148 if(ins.is_goto() || ins.is_start_thread() || ins.is_catch())
150 for(
auto &target : ins.targets)
152 new_targetst::const_iterator result = new_targets.find(target);
154 if(result!=new_targets.end())
155 target = result->second;
160 while(new_targets.find(begin) != new_targets.end())
165 for(
const auto &new_target : new_targets)
177 if(
is_skip(goto_program, last) && !last->is_target())
201 gf_entry.second.body,
202 gf_entry.second.body.instructions.begin(),
203 gf_entry.second.body.instructions.end());