diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-05-03 00:35:24 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-05-02 22:35:24 +0000 |
commit | 0e8d6eb79458dbf590d4464496f8a55663813c79 (patch) | |
tree | 63cf6af2b63764cce5dd29ebe5e6d982318d44eb /gcc | |
parent | c3b73151139abea8b5ee98e3f057138f53924c08 (diff) | |
download | gcc-0e8d6eb79458dbf590d4464496f8a55663813c79.zip gcc-0e8d6eb79458dbf590d4464496f8a55663813c79.tar.gz gcc-0e8d6eb79458dbf590d4464496f8a55663813c79.tar.bz2 |
ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff errors when comparing specialized and unspecialized times.
* ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
errors when comparing specialized and unspecialized times.
From-SVN: r247528
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/ipa-inline-analysis.c | 10 |
2 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b6dfb3..61a3321 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-02 Jan Hubicka <hubicka@ucw.cz> + + * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff + errors when comparing specialized and unspecialized times. + 2017-05-02 David Malcolm <dmalcolm@redhat.com> * diagnostic-show-locus.c @@ -356,6 +361,11 @@ 2017-04-29 Jan Hubicka <hubicka@ucw.cz> + * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary + overflow check. + +2017-04-29 Jan Hubicka <hubicka@ucw.cz> + PR ipa/79224 * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL. (account_size_time): Use two predicates - exec_pred and diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 81183cf..929de8e 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -3422,7 +3422,15 @@ estimate_node_size_and_time (struct cgraph_node *node, min_size = (*info->entry)[0].size; gcc_checking_assert (size >= 0); gcc_checking_assert (time >= 0); - gcc_checking_assert (nonspecialized_time >= time); + /* nonspecialized_time should be always bigger than specialized time. + Roundoff issues however may get into the way. */ + gcc_checking_assert ((nonspecialized_time - time) >= -1); + + /* Roundoff issues may make specialized time bigger than nonspecialized + time. We do not really want that to happen because some heurstics + may get confused by seeing negative speedups. */ + if (time > nonspecialized_time) + time = nonspecialized_time; if (info->loop_iterations && !evaluate_predicate (info->loop_iterations, possible_truths)) |