diff options
author | Jan Hubicka <jh@suse.cz> | 2012-11-15 00:03:22 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2012-11-14 23:03:22 +0000 |
commit | 7153ca970bac312f5e52af870560669ffd438b3b (patch) | |
tree | 2ca8d6822f2eb68fd86bf8d038aed3e503976ad6 | |
parent | 8335a6439ddb66aa9ebc67ee47aa2e6e317e3ef9 (diff) | |
download | gcc-7153ca970bac312f5e52af870560669ffd438b3b.zip gcc-7153ca970bac312f5e52af870560669ffd438b3b.tar.gz gcc-7153ca970bac312f5e52af870560669ffd438b3b.tar.bz2 |
re PR bootstrap/55051 (profiledbootstrap failed)
PR bootstrap/55051
* ipa-inline.c (edge_badness): Improve dumping; fix overflow.
From-SVN: r193512
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ipa-inline.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f520ddc..109ad26 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-11-14 Jan Hubicka <jh@suse.cz> + + PR bootstrap/55051 + * ipa-inline.c (edge_badness): Improve dumping; fix overflow. + 2012-11-14 Matthias Klose <doko@ubuntu.com> * config/sparc/t-linux64: Add multiarch names in MULTILIB_OSDIRNAMES. diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 9f792ff..dd25ae3 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -850,9 +850,11 @@ edge_badness (struct cgraph_edge *edge, bool dump) if (dump) { - fprintf (dump_file, " Badness calculation for %s -> %s\n", + fprintf (dump_file, " Badness calculation for %s/%i -> %s/%i\n", xstrdup (cgraph_node_name (edge->caller)), - xstrdup (cgraph_node_name (callee))); + edge->caller->uid, + xstrdup (cgraph_node_name (callee)), + edge->callee->uid); fprintf (dump_file, " size growth %i, time %i ", growth, edge_time); @@ -917,7 +919,7 @@ edge_badness (struct cgraph_edge *edge, bool dump) { badness = (relative_time_benefit (callee_info, edge, edge_time) * (INT_MIN / 16 / RELATIVE_TIME_BENEFIT_RANGE)); - badness /= (growth * MAX (1, callee_info->growth)); + badness /= (MIN (65536/2, growth) * MIN (65536/2, MAX (1, callee_info->growth))); gcc_checking_assert (badness <=0 && badness >= INT_MIN / 16); if ((hints & (INLINE_HINT_indirect_call | INLINE_HINT_loop_iterations |