[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 Eric Botcazou changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #14 from Eric Botcazou --- .
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #13 from Eric Botcazou --- Author: ebotcazou Date: Sat Jun 18 11:10:10 2016 New Revision: 237571 URL: https://gcc.gnu.org/viewcvs?rev=237571&root=gcc&view=rev Log: PR bootstrap/71435 * reload1.c (reload): Pass 0 to finish_spills when called because update_eliminables_and_spill returns true and remove did_spill. (finish_spills): Adjust comment and document GLOBAL parameter. Modified: trunk/gcc/ChangeLog trunk/gcc/reload1.c
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #12 from Eric Botcazou --- > The tentative fix restored bootstrap on sparc-linux. Test results look > OK-ish. Thanks, I'll post it tomorrow morning.
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #11 from Mikael Pettersson --- (In reply to Mikael Pettersson from comment #10) > (In reply to Eric Botcazou from comment #9) > > > Created attachment 38699 [details] > > > Tentative fix. > > > > It successfully passed a full bootstrap/test cycle on SPARC/Solaris. > > I can test it on SPARC/Linux on Friday. The tentative fix restored bootstrap on sparc-linux. Test results look OK-ish.
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #10 from Mikael Pettersson --- (In reply to Eric Botcazou from comment #9) > > Created attachment 38699 [details] > > Tentative fix. > > It successfully passed a full bootstrap/test cycle on SPARC/Solaris. I can test it on SPARC/Linux on Friday.
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #9 from Eric Botcazou --- > Created attachment 38699 [details] > Tentative fix. It successfully passed a full bootstrap/test cycle on SPARC/Solaris.
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 Eric Botcazou changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org --- Comment #8 from Eric Botcazou --- Created attachment 38699 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38699&action=edit Tentative fix.
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #7 from Eric Botcazou --- > Maybe we need an arg for that function to say whether to look at individual > insn chains? That, or just fiddle with the existing one, its only purpose in the function is to guard the problematic global register allocation. Maybe: /* If we allocated another stack slot, redo elimination bookkeeping. */ if (something_was_spilled || starting_frame_size != get_frame_size ()) { if (update_eliminables_and_spill ()) finish_spills (0); continue; } [...] if (update_eliminables_and_spill ()) { finish_spills (0); something_changed = 1; } else { select_reload_regs (); if (failure) goto failed; if (insns_need_reload) something_changed |= finish_spills (global); } and did_spill can go.
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #6 from Bernd Schmidt --- Not calling finish_spills however could miss cases where pseudos got spilled by update_eliminables_and_spill->spill_hard_reg. Maybe we need an arg for that function to say whether to look at individual insn chains?
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #5 from Eric Botcazou --- I think that calling finish_spills before select_reload_regs is incorrect: static void select_reload_regs (void) { struct insn_chain *chain; /* Try to satisfy the needs for each insn. */ for (chain = insns_need_reload; chain != 0; chain = chain->next_need_reload) find_reload_regs (chain); } /* After find_reload_regs has been run for all insn that need reloads, and/or spill_hard_regs was called, this function is used to actually spill pseudo registers and try to reallocate them. It also sets up the spill_regs array for use by choose_reload_regs. */ static int finish_spills (int global) because finish_spills works globally, in particular: /* Retry global register allocation if possible. */ if (global && ira_conflicts_p) { unsigned int n; memset (pseudo_forbidden_regs, 0, max_regno * sizeof (HARD_REG_SET)); /* For every insn that needs reloads, set the registers used as spill regs in pseudo_forbidden_regs for every pseudo live across the insn. */ for (chain = insns_need_reload; chain; chain = chain->next_need_reload) { EXECUTE_IF_SET_IN_REG_SET (&chain->live_throughout, FIRST_PSEUDO_REGISTER, i, rsi) { IOR_HARD_REG_SET (pseudo_forbidden_regs[i], chain->used_spill_regs); } EXECUTE_IF_SET_IN_REG_SET (&chain->dead_or_set, FIRST_PSEUDO_REGISTER, i, rsi) { IOR_HARD_REG_SET (pseudo_forbidden_regs[i], chain->used_spill_regs); } } i.e. chain->used_spill_regs might be uninitialized for some insns here. Index: reload1.c === --- reload1.c (revision 237323) +++ reload1.c (working copy) @@ -498,6 +498,7 @@ new_insn_chain (void) c->need_operand_change = 0; c->need_reload = 0; c->need_elim = 0; + CLEAR_HARD_REG_SET (c->used_spill_regs); return c; } fixes the comparison failure, but it is still incorrect to access the regsets at this point as they may not have been computed for some insns yet.
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #4 from Eric Botcazou --- > I can (partially) reproduce on Solaris: The problem looks volatile, unrelated switches change code generation.
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #3 from Eric Botcazou --- I can (partially) reproduce on Solaris: Comparing stages 2 and 3 Bootstrap comparison failure! gcc/double-int.o differs make[2]: *** [compare] Error 1
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 Eric Botcazou changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-06-07 CC||ebotcazou at gcc dot gnu.org Ever confirmed|0 |1
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #2 from Bernd Schmidt --- Oops, sorry, wrong bug.
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 --- Comment #1 from Bernd Schmidt --- Most likely a dup of 71413.
[Bug bootstrap/71435] [7 regression] sparc bootstrap failure since r235625
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71435 Richard Biener changed: What|Removed |Added Target||sparc-linux CC||bernds at gcc dot gnu.org Target Milestone|--- |7.0