/* Transformations based on profile information for values.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
Foundation, Inc.
This file is part of GCC.
}
else
{
- error ("%HCorrupted value profile: %s profiler overall count (%d) "
- "does not match BB count (%d)", &locus, name, (int)*all,
- (int)bb_count);
+ error_at (locus, "Corrupted value profile: %s "
+ "profiler overall count (%d) does not match BB count (%d)",
+ name, (int)*all, (int)bb_count);
return true;
}
}
at least 50% of time (and 75% gives the guarantee of usage). */
if (simple_cst_equal (gimple_assign_rhs2 (stmt), value) != 1
|| 2 * count < all
- || !maybe_hot_bb_p (gimple_bb (stmt)))
+ || optimize_bb_for_size_p (gimple_bb (stmt)))
return false;
if (check_counter (stmt, "value", &count, &all, gimple_bb (stmt)->count))
/* We require that we hit a power of 2 at least half of all evaluations. */
if (simple_cst_equal (gimple_assign_rhs2 (stmt), value) != 1
|| count < wrong_values
- || !maybe_hot_bb_p (gimple_bb (stmt)))
+ || optimize_bb_for_size_p (gimple_bb (stmt)))
return false;
if (dump_file)
break;
}
if (i == steps
- || !maybe_hot_bb_p (gimple_bb (stmt)))
+ || optimize_bb_for_size_p (gimple_bb (stmt)))
return false;
gimple_remove_histogram_value (cfun, stmt, histogram);
if (pid_map != NULL)
return;
- pid_map
- = (struct cgraph_node**) xmalloc (sizeof (struct cgraph_node*) * cgraph_max_pid);
+ pid_map = XCNEWVEC (struct cgraph_node*, cgraph_max_pid);
for (n = cgraph_nodes; n; n = n->next)
{
bb1end = stmt3;
stmt1 = gimple_copy (stmt);
- gimple_call_set_fn (stmt,
- build_addr (direct_call->decl, current_function_decl));
+ gimple_call_set_fndecl (stmt1, direct_call->decl);
gsi_insert_before (&gsi, stmt1, GSI_SAME_STMT);
bb2end = stmt1;
bb3end = stmt;
{
edge_iterator ei;
for (ei = ei_start (bb->succs); (e34 = ei_safe_edge (ei)); )
- if (!e34->flags & EDGE_ABNORMAL)
+ if (!(e34->flags & EDGE_ABNORMAL))
break;
}
else
/* We require that count is at least half of all; this means
that for the transformation to fire the value must be constant
at least 80% of time. */
- if ((6 * count / 5) < all || !maybe_hot_bb_p (gimple_bb (stmt)))
+ if ((6 * count / 5) < all || optimize_bb_for_size_p (gimple_bb (stmt)))
return false;
if (check_counter (stmt, "value", &count, &all, gimple_bb (stmt)->count))
return false;