/* Wrapper function to invoke early inliner. */
-static void
+static unsigned int
early_inline ()
{
compute_fn_summary (cgraph_node::get (current_function_decl), true);
- unsigned todo = early_inliner (cfun);
+ unsigned int todo = early_inliner (cfun);
if (todo & TODO_update_ssa_any)
update_ssa (TODO_update_ssa);
+ return todo;
}
/* Use AutoFDO profile to annoate the control flow graph.
function before annotation, so the profile inside bar@loc_foo2
will be useful. */
autofdo::stmt_set promoted_stmts;
+ unsigned int todo = 0;
for (int i = 0; i < 10; i++)
{
- if (!flag_value_profile_transformations
- || !autofdo::afdo_vpt_for_early_inline (&promoted_stmts))
- break;
- early_inline ();
+ if (!flag_value_profile_transformations
+ || !autofdo::afdo_vpt_for_early_inline (&promoted_stmts))
+ break;
+ todo |= early_inline ();
}
- early_inline ();
+ todo |= early_inline ();
autofdo::afdo_annotate_cfg (promoted_stmts);
compute_function_frequency ();
/* Local pure-const may imply need to fixup the cfg. */
- if (execute_fixup_cfg () & TODO_cleanup_cfg)
+ todo |= execute_fixup_cfg ();
+ if (todo & TODO_cleanup_cfg)
cleanup_tree_cfg ();
free_dominance_info (CDI_DOMINATORS);
pop_cfun ();
}
- return TODO_rebuild_cgraph_edges;
+ return 0;
}
} /* namespace autofdo. */