public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* .bad_compare in bootstrap of head
@ 2017-05-04  2:59 Daniel Santos
  2017-05-04  6:59 ` Andreas Schwab
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Santos @ 2017-05-04  2:59 UTC (permalink / raw)
  To: gcc

Anybody else getting bootstrap failures from the head?

gcc/tree-outof-ssa.o differs
gcc/insn-output.o differs
gcc/tree-chrec.o differs
gcc/cp/semantics.o differs
gcc/lto-cgraph.o differs
gcc/builtins.o differs
gcc/i386.o differs
gcc/dwarf2out.o differs

I built from this commit:

commit 8d05cc6f387aec6099ea0589f45a22edeb1475fd
Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed May 3 18:50:25 2017 +0000

             * doc/invoke.texi: Note that -faligned-new is on by default
             for C++17.

     git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247564 
138bc75d-0d04-0410-961f-82ee72b054a4

Daniel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-04  2:59 .bad_compare in bootstrap of head Daniel Santos
@ 2017-05-04  6:59 ` Andreas Schwab
  2017-05-04 13:05   ` Jeff Law
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2017-05-04  6:59 UTC (permalink / raw)
  To: Daniel Santos; +Cc: gcc

On Mai 03 2017, Daniel Santos <daniel.santos@pobox.com> wrote:

> Anybody else getting bootstrap failures from the head?
>
> gcc/tree-outof-ssa.o differs
> gcc/insn-output.o differs
> gcc/tree-chrec.o differs
> gcc/cp/semantics.o differs
> gcc/lto-cgraph.o differs
> gcc/builtins.o differs
> gcc/i386.o differs
> gcc/dwarf2out.o differs

I see a similar failure on ia64.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-04  6:59 ` Andreas Schwab
@ 2017-05-04 13:05   ` Jeff Law
  2017-05-04 13:27     ` Дмитрий Дьяченко
  0 siblings, 1 reply; 12+ messages in thread
From: Jeff Law @ 2017-05-04 13:05 UTC (permalink / raw)
  To: Andreas Schwab, Daniel Santos; +Cc: gcc

On 05/04/2017 12:59 AM, Andreas Schwab wrote:
> On Mai 03 2017, Daniel Santos <daniel.santos@pobox.com> wrote:
> 
>> Anybody else getting bootstrap failures from the head?
>>
>> gcc/tree-outof-ssa.o differs
>> gcc/insn-output.o differs
>> gcc/tree-chrec.o differs
>> gcc/cp/semantics.o differs
>> gcc/lto-cgraph.o differs
>> gcc/builtins.o differs
>> gcc/i386.o differs
>> gcc/dwarf2out.o differs
> 
> I see a similar failure on ia64.
My x86_64 builds ran fine.

jeff

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-04 13:05   ` Jeff Law
@ 2017-05-04 13:27     ` Дмитрий Дьяченко
  2017-05-04 14:31       ` Jeff Law
  0 siblings, 1 reply; 12+ messages in thread
From: Дмитрий Дьяченко @ 2017-05-04 13:27 UTC (permalink / raw)
  To: Jeff Law; +Cc: Andreas Schwab, Daniel Santos, gcc

Fedora 26 x86_64
r247595

~/src/gcc_current/configure --prefix=/usr/local/gcc_current
--enable-static --enable-checking=no --enable-languages=c,c++,lto
--enable-plugin --disable-multilib

make[3]: Leaving directory '/home/dimhen/build/gcc_current'
Comparing stages 2 and 3
Bootstrap comparison failure!
gcc/build/genmatch.o differs
gcc/build/gentarget-def.o differs
gcc/cp/pt.o differs
gcc/c-family/c-attribs.o differs
gcc/symtab.o differs
gcc/emit-rtl.o differs
gcc/function.o differs
gcc/dwarf2out.o differs
gcc/graphite-isl-ast-to-gimple.o differs
gcc/haifa-sched.o differs
gcc/hsa-gen.o differs
gcc/ipa-devirt.o differs
gcc/ipa-inline-analysis.o differs
gcc/ipa-icf-gimple.o differs
gcc/lto-streamer-out.o differs
gcc/tree-cfg.o differs
gcc/tree-eh.o differs
gcc/tree-inline.o differs
gcc/tree-ssa-loop-ivopts.o differs
gcc/tree-ssa-sccvn.o differs
gcc/tree-vectorizer.o differs

2017-05-04 16:04 GMT+03:00 Jeff Law <law@redhat.com>:
> On 05/04/2017 12:59 AM, Andreas Schwab wrote:
>>
>> On Mai 03 2017, Daniel Santos <daniel.santos@pobox.com> wrote:
>>
>>> Anybody else getting bootstrap failures from the head?
>>>
>>> gcc/tree-outof-ssa.o differs
>>> gcc/insn-output.o differs
>>> gcc/tree-chrec.o differs
>>> gcc/cp/semantics.o differs
>>> gcc/lto-cgraph.o differs
>>> gcc/builtins.o differs
>>> gcc/i386.o differs
>>> gcc/dwarf2out.o differs
>>
>>
>> I see a similar failure on ia64.
>
> My x86_64 builds ran fine.
>
> jeff

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-04 13:27     ` Дмитрий Дьяченко
@ 2017-05-04 14:31       ` Jeff Law
  2017-05-04 17:49         ` Jeff Law
  0 siblings, 1 reply; 12+ messages in thread
From: Jeff Law @ 2017-05-04 14:31 UTC (permalink / raw)
  To: Дмитрий
	Дьяченко
  Cc: Andreas Schwab, Daniel Santos, gcc

On 05/04/2017 07:26 AM, Дмитрий Дьяченко wrote:
> Fedora 26 x86_64
> r247595
> 
> ~/src/gcc_current/configure --prefix=/usr/local/gcc_current
> --enable-static --enable-checking=no --enable-languages=c,c++,lto
> --enable-plugin --disable-multilib
And that may be the key, I've been able to get a similar failure.  Could 
easy be the checking flags.  I'll do some bisecting here.
jeff

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-04 14:31       ` Jeff Law
@ 2017-05-04 17:49         ` Jeff Law
  2017-05-05 10:37           ` Jan Hubicka
  0 siblings, 1 reply; 12+ messages in thread
From: Jeff Law @ 2017-05-04 17:49 UTC (permalink / raw)
  To: Дмитрий
	Дьяченко
  Cc: Andreas Schwab, Daniel Santos, gcc, Jan Hubicka

On 05/04/2017 08:31 AM, Jeff Law wrote:
> On 05/04/2017 07:26 AM, Дмитрий Дьяченко wrote:
>> Fedora 26 x86_64
>> r247595
>>
>> ~/src/gcc_current/configure --prefix=/usr/local/gcc_current
>> --enable-static --enable-checking=no --enable-languages=c,c++,lto
>> --enable-plugin --disable-multilib
> And that may be the key, I've been able to get a similar failure.  Could 
> easy be the checking flags.  I'll do some bisecting here.
> jeff

It's Jan's patch from April 30.

commit e062e35c7ff7743aa31868370bf5cb9f8da835dd
Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Sun Apr 30 15:02:11 2017 +0000

         PR ipa/79224
         * ipa-inline-analysis.c (dump_predicate): Add optional 
parameter NL.
         (account_size_time): Use two predicates - exec_pred and
         nonconst_pred_ptr.
         (evaluate_conditions_for_known_args): Compute both clause and
         nonspec_clause.
         (evaluate_properties_for_edge): Evaulate both clause and 
nonspec_clause.
         (inline_summary_t::duplicate): Update.
         (estimate_function_body_sizes): Caluculate exec and nonconst 
predicates
         separately.
         (compute_inline_parameters): Likewise.
         (estimate_edge_size_and_time): Update caluclation of time.
         (estimate_node_size_and_time): Compute both time and nonspecialized
         time.
         (estimate_ipcp_clone_size_and_time): Update.
         (inline_merge_summary): Update.
         (do_estimate_edge_time): Update.
         (do_estimate_edge_size): Update.
         (do_estimate_edge_hints): Update.
         (inline_read_section, inline_write_summary): Stream both new 
predicates.
         * ipa-inline.c (compute_uninlined_call_time): Take 
uninlined_call_time
         as argument.
         (compute_inlined_call_time): Cleanup.
         (big_speedup_p): Update.
         (edge_badness): Update.
         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
         (size_time_entry): Replace predicate by exec_predicate and
         nonconst_predicate.
         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
         (estimate_edge_time): Return also nonspec_time.
         (reset_edge_growth_cache): Update.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-04 17:49         ` Jeff Law
@ 2017-05-05 10:37           ` Jan Hubicka
  2017-05-05 10:40             ` Jan Hubicka
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Hubicka @ 2017-05-05 10:37 UTC (permalink / raw)
  To: Jeff Law
  Cc: Дмитрий
	Дьяченко,
	Andreas Schwab, Daniel Santos, gcc

> On 05/04/2017 08:31 AM, Jeff Law wrote:
> >On 05/04/2017 07:26 AM, Дмитрий Дьяченко wrote:
> >>Fedora 26 x86_64
> >>r247595
> >>
> >>~/src/gcc_current/configure --prefix=/usr/local/gcc_current
> >>--enable-static --enable-checking=no --enable-languages=c,c++,lto
> >>--enable-plugin --disable-multilib
> >And that may be the key, I've been able to get a similar failure.  Could
> >easy be the checking flags.  I'll do some bisecting here.
> >jeff
> 
> It's Jan's patch from April 30.
> 
> commit e062e35c7ff7743aa31868370bf5cb9f8da835dd
> Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date:   Sun Apr 30 15:02:11 2017 +0000

I wonder how that patch can cause mismatches. Does it reproduce on one of
compile farm machines (my x86-64 bootstrap works fine so does ia64 on terbium
after fixing the gcc 4.1 issue yeterday).
It would be great to have -fdump-ipa-inline-details dumps of the mismatching
run. Perhaps it will be easy to spot the problem.

Honza

> 
>         PR ipa/79224
>         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
>         (account_size_time): Use two predicates - exec_pred and
>         nonconst_pred_ptr.
>         (evaluate_conditions_for_known_args): Compute both clause and
>         nonspec_clause.
>         (evaluate_properties_for_edge): Evaulate both clause and
> nonspec_clause.
>         (inline_summary_t::duplicate): Update.
>         (estimate_function_body_sizes): Caluculate exec and nonconst
> predicates
>         separately.
>         (compute_inline_parameters): Likewise.
>         (estimate_edge_size_and_time): Update caluclation of time.
>         (estimate_node_size_and_time): Compute both time and nonspecialized
>         time.
>         (estimate_ipcp_clone_size_and_time): Update.
>         (inline_merge_summary): Update.
>         (do_estimate_edge_time): Update.
>         (do_estimate_edge_size): Update.
>         (do_estimate_edge_hints): Update.
>         (inline_read_section, inline_write_summary): Stream both new
> predicates.
>         * ipa-inline.c (compute_uninlined_call_time): Take
> uninlined_call_time
>         as argument.
>         (compute_inlined_call_time): Cleanup.
>         (big_speedup_p): Update.
>         (edge_badness): Update.
>         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
>         (size_time_entry): Replace predicate by exec_predicate and
>         nonconst_predicate.
>         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
>         (estimate_edge_time): Return also nonspec_time.
>         (reset_edge_growth_cache): Update.
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-05 10:37           ` Jan Hubicka
@ 2017-05-05 10:40             ` Jan Hubicka
  2017-05-05 13:03               ` Jan Hubicka
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Hubicka @ 2017-05-05 10:40 UTC (permalink / raw)
  To: Jeff Law
  Cc: Дмитрий
	Дьяченко,
	Andreas Schwab, Daniel Santos, gcc

> > On 05/04/2017 08:31 AM, Jeff Law wrote:
> > >On 05/04/2017 07:26 AM, Дмитрий Дьяченко wrote:
> > >>Fedora 26 x86_64
> > >>r247595
> > >>
> > >>~/src/gcc_current/configure --prefix=/usr/local/gcc_current
> > >>--enable-static --enable-checking=no --enable-languages=c,c++,lto
> > >>--enable-plugin --disable-multilib
> > >And that may be the key, I've been able to get a similar failure.  Could
> > >easy be the checking flags.  I'll do some bisecting here.
> > >jeff
> > 
> > It's Jan's patch from April 30.
> > 
> > commit e062e35c7ff7743aa31868370bf5cb9f8da835dd
> > Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
> > Date:   Sun Apr 30 15:02:11 2017 +0000
> 
> I wonder how that patch can cause mismatches. Does it reproduce on one of
> compile farm machines (my x86-64 bootstrap works fine so does ia64 on terbium
> after fixing the gcc 4.1 issue yeterday).
> It would be great to have -fdump-ipa-inline-details dumps of the mismatching
> run. Perhaps it will be easy to spot the problem.

Aha, --enable-checking=no. I will check what effect it have.

Honza

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-05 10:40             ` Jan Hubicka
@ 2017-05-05 13:03               ` Jan Hubicka
  2017-05-05 13:54                 ` Richard Biener
  0 siblings, 1 reply; 12+ messages in thread
From: Jan Hubicka @ 2017-05-05 13:03 UTC (permalink / raw)
  To: Jeff Law
  Cc: Дмитрий
	Дьяченко,
	Andreas Schwab, Daniel Santos, gcc

> > I wonder how that patch can cause mismatches. Does it reproduce on one of
> > compile farm machines (my x86-64 bootstrap works fine so does ia64 on terbium
> > after fixing the gcc 4.1 issue yeterday).
> > It would be great to have -fdump-ipa-inline-details dumps of the mismatching
> > run. Perhaps it will be easy to spot the problem.
> 
> Aha, --enable-checking=no. I will check what effect it have.

It does reproduce for me.  Time estimates are very slightly different between
checking and non-checking build.  I am investigating why.

Honza
> 
> Honza

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-05 13:03               ` Jan Hubicka
@ 2017-05-05 13:54                 ` Richard Biener
  2017-05-05 23:13                   ` Daniel Santos
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Biener @ 2017-05-05 13:54 UTC (permalink / raw)
  To: gcc, Jan Hubicka, Jeff Law
  Cc: Дмитрий
	Дьяченко,
	Andreas Schwab, Daniel Santos, gcc

On May 5, 2017 3:03:43 PM GMT+02:00, Jan Hubicka <hubicka@ucw.cz> wrote:
>> > I wonder how that patch can cause mismatches. Does it reproduce on
>one of
>> > compile farm machines (my x86-64 bootstrap works fine so does ia64
>on terbium
>> > after fixing the gcc 4.1 issue yeterday).
>> > It would be great to have -fdump-ipa-inline-details dumps of the
>mismatching
>> > run. Perhaps it will be easy to spot the problem.
>> 
>> Aha, --enable-checking=no. I will check what effect it have.
>
>It does reproduce for me.  Time estimates are very slightly different
>between
>checking and non-checking build.  I am investigating why.

You mean debugging and non-debugging build?

Richard.

>Honza
>> 
>> Honza

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-05 13:54                 ` Richard Biener
@ 2017-05-05 23:13                   ` Daniel Santos
  2017-05-07 22:33                     ` Jan Hubicka
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Santos @ 2017-05-05 23:13 UTC (permalink / raw)
  To: Richard Biener, gcc, Jan Hubicka, Jeff Law
  Cc: Дмитрий
	Дьяченко,
	Andreas Schwab


On 05/05/2017 08:53 AM, Richard Biener wrote:
> On May 5, 2017 3:03:43 PM GMT+02:00, Jan Hubicka <hubicka@ucw.cz> wrote:
>>
>>> Aha, --enable-checking=no. I will check what effect it have.
>> It does reproduce for me.  Time estimates are very slightly different
>> between
>> checking and non-checking build.  I am investigating why.
> You mean debugging and non-debugging build?
>
> Richard.

I got the problem when I built with --enable-checking=yes,rtl.  I 
haven't tested any other combinations.  My first guess would be a 
gcc_checking_assert () with side-effects?

Daniel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: .bad_compare in bootstrap of head
  2017-05-05 23:13                   ` Daniel Santos
@ 2017-05-07 22:33                     ` Jan Hubicka
  0 siblings, 0 replies; 12+ messages in thread
From: Jan Hubicka @ 2017-05-07 22:33 UTC (permalink / raw)
  To: Daniel Santos
  Cc: Richard Biener, gcc, Jeff Law,
	Дмитрий
	Дьяченко,
	Andreas Schwab

Hi,
I found the problem. It was pretty obvious - we compute sum of times twice.
Once when computing statement sizes and second time by summing the summaries.
because sreal is not distributive, it leads to different results.

I have comitted the following patch.  Incrementally I will drop the
code duplication.

Bootstrapped/regtested x86_64-linux

Honza

--- trunk/gcc/ipa-inline-analysis.c	2017/05/07 19:41:09	247728
+++ trunk/gcc/ipa-inline-analysis.c	2017/05/07 22:21:05	247729
@@ -3119,12 +3120,13 @@
   info->size = info->self_size;
   info->stack_frame_offset = 0;
   info->estimated_stack_size = info->estimated_self_stack_size;
-  if (flag_checking)
-    {
-      inline_update_overall_summary (node);
-      gcc_assert (!(info->time - info->self_time).to_int ()
-		  && info->size == info->self_size);
-    }
+
+  /* Code above should compute exactly the same result as
+     inline_update_overall_summary but because computation happens in
+     different order the roundoff errors result in slight changes.  */
+  inline_update_overall_summary (node);
+  gcc_assert (!(info->time - info->self_time).to_int ()
+	      && info->size == info->self_size);
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-05-07 22:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04  2:59 .bad_compare in bootstrap of head Daniel Santos
2017-05-04  6:59 ` Andreas Schwab
2017-05-04 13:05   ` Jeff Law
2017-05-04 13:27     ` Дмитрий Дьяченко
2017-05-04 14:31       ` Jeff Law
2017-05-04 17:49         ` Jeff Law
2017-05-05 10:37           ` Jan Hubicka
2017-05-05 10:40             ` Jan Hubicka
2017-05-05 13:03               ` Jan Hubicka
2017-05-05 13:54                 ` Richard Biener
2017-05-05 23:13                   ` Daniel Santos
2017-05-07 22:33                     ` 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).