static void make_goto_expr_edges (basic_block);
static edge tree_redirect_edge_and_branch (edge, basic_block);
static edge tree_try_redirect_by_replacing_jump (edge, basic_block);
-static void split_critical_edges (void);
+static unsigned int split_critical_edges (void);
/* Various helpers. */
static inline bool stmt_starts_bb_p (tree, tree);
/* Write the flowgraph to a VCG file. */
{
int local_dump_flags;
- FILE *dump_file = dump_begin (TDI_vcg, &local_dump_flags);
- if (dump_file)
+ FILE *vcg_file = dump_begin (TDI_vcg, &local_dump_flags);
+ if (vcg_file)
{
- tree_cfg2vcg (dump_file);
- dump_end (TDI_vcg, dump_file);
+ tree_cfg2vcg (vcg_file);
+ dump_end (TDI_vcg, vcg_file);
}
}
dump_tree_cfg (dump_file, dump_flags);
}
-static void
+static unsigned int
execute_build_cfg (void)
{
build_tree_cfg (&DECL_SAVED_TREE (current_function_decl));
+ return 0;
}
struct tree_opt_pass pass_build_cfg =
for_each_eh_region (update_eh_label);
/* Finally, purge dead labels. All user-defined labels and labels that
- can be the target of non-local gotos are preserved. */
+ can be the target of non-local gotos and labels which have their
+ address taken are preserved. */
FOR_EACH_BB (bb)
{
block_stmt_iterator i;
if (label == label_for_this_bb
|| ! DECL_ARTIFICIAL (label)
- || DECL_NONLOCAL (label))
+ || DECL_NONLOCAL (label)
+ || FORCED_LABEL (label))
bsi_next (&i);
else
bsi_remove (&i, true);
if (TREE_CODE (rhs) == ADDR_EXPR)
recompute_tree_invariant_for_addr_expr (rhs);
- /* If the statement could throw and now cannot, we need to prune cfg. */
- if (maybe_clean_or_replace_eh_stmt (stmt, stmt))
- tree_purge_dead_eh_edges (bb_for_stmt (stmt));
-
+ maybe_clean_or_replace_eh_stmt (stmt, stmt);
mark_new_vars_to_rename (stmt);
}
}
}
-static void
+static unsigned int
remove_useless_stmts (void)
{
struct rus_data data;
remove_useless_stmts_1 (&DECL_SAVED_TREE (current_function_decl), &data);
}
while (data.repeat);
+ return 0;
}
/* Split all critical edges. */
-static void
+static unsigned int
split_critical_edges (void)
{
basic_block bb;
}
}
end_recording_case_labels ();
+ return 0;
}
struct tree_opt_pass pass_split_crit_edges =
\f
/* Emit return warnings. */
-static void
+static unsigned int
execute_warn_function_return (void)
{
#ifdef USE_MAPPED_LOCATION
}
}
}
+ return 0;
}
/* Emit noreturn warnings. */
-static void
+static unsigned int
execute_warn_function_noreturn (void)
{
if (warn_missing_noreturn
warning (OPT_Wmissing_noreturn, "%Jfunction might be possible candidate "
"for attribute %<noreturn%>",
cfun->decl);
+ return 0;
}
struct tree_opt_pass pass_warn_function_noreturn =