===================================================================
@@ -613,18 +613,7 @@ gimple_value_profile_transformations (vo
}
if (changed)
- {
- counts_to_freqs ();
- /* Value profile transformations may change inline parameters
- a lot (e.g., indirect call promotion introduces new direct calls).
- The update is also needed to avoid compiler ICE -- when MULTI
- target icall promotion happens, the caller's size may become
- negative when the promoted direct calls get promoted. */
- /* Guard this for LIPO for now. */
- if (L_IPO_COMP_MODE)
- compute_inline_parameters (cgraph_get_node (current_function_decl),
- false);
- }
+ counts_to_freqs ();
return changed;
}
===================================================================
@@ -1531,7 +1531,8 @@ cgraph_mark_functions_to_output (void)
gcc_assert (node->global.inlined_to
|| !gimple_has_body_p (decl)
|| node->in_other_partition
- || DECL_EXTERNAL (decl));
+ || DECL_EXTERNAL (decl)
+ || cgraph_is_auxiliary (node->decl));
}
===================================================================
@@ -26,7 +26,7 @@ main ()
/* { dg-final-use { scan-ipa-dump "Mod power of 2 transformation on insn" "profile" } } */
/* This is part of code checking that n is power of 2, so we are sure that the transformation
didn't get optimized out. */
-/* { dg-final-use { scan-tree-dump "n_\[0-9\]* \\+ 0xffff" "optimized"} } */
+/* { dg-final-use { scan-tree-dump "n_\[0-9\]* \\+ (4294967295|0x0*ffffffff)" "optimized"} } */
/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
/* { dg-final-use { cleanup-tree-dump "optimized" } } */
/* { dg-final-use { cleanup-ipa-dump "profile" } } */
===================================================================
@@ -2008,6 +2008,9 @@ early_inliner (void)
for (edge = node->callees; edge; edge = edge->next_callee)
{
struct inline_edge_summary *es = inline_edge_summary (edge);
+
+ if (!edge->call_stmt)
+ continue;
es->call_stmt_size
= estimate_num_insns (edge->call_stmt, &eni_size_weights);
es->call_stmt_time
===================================================================
@@ -390,6 +390,7 @@ pop_module_scope (void)
primary_module_last_loc = input_location;
at_eof = 1;
+ cgraph_process_same_body_aliases ();
lang_hooks.l_ipo.process_pending_decls (input_location);
lang_hooks.l_ipo.clear_deferred_fns ();
at_eof = 0;
@@ -1067,7 +1068,8 @@ cgraph_unify_type_alias_sets (void)
{
push_cfun (DECL_STRUCT_FUNCTION (node->decl));
current_function_decl = node->decl;
- cgraph_collect_type_referenced ();
+ if (gimple_has_body_p (current_function_decl))
+ cgraph_collect_type_referenced ();
current_function_decl = NULL;
pop_cfun ();
}