* Fix ICE caused by rounoff error in ipa-inline-analysis
@ 2017-05-02 22:41 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2017-05-02 22:41 UTC (permalink / raw)
To: gcc-patches
Hi,
the following patch silence overactive sanity check which now fires due to roundoff
errors of sreals. Because this affects some bootstraps I am commiting it tonight.
I will add testcase tomorrow. My apologizes for the breakage.
Bootstrapped/regtested x86_64-linux.
Honza
* ipa-inline-analysis.c (estimate_node_size_and_time): Allow rondoff
errors when comparing specialized and unspecialized times.
Index: ipa-inline-analysis.c
===================================================================
--- ipa-inline-analysis.c (revision 247436)
+++ ipa-inline-analysis.c (working copy)
@@ -3422,7 +3422,15 @@ estimate_node_size_and_time (struct cgra
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))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-02 22:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-02 22:41 Fix ICE caused by rounoff error in ipa-inline-analysis Jan Hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).