public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/42204]  New: update_eliminables should be called in reload after something changes
@ 2009-11-28  2:22 hutchinsonandy at gcc dot gnu dot org
  2010-09-20  2:45 ` [Bug middle-end/42204] " eric dot weddington at atmel dot com
  0 siblings, 1 reply; 2+ messages in thread
From: hutchinsonandy at gcc dot gnu dot org @ 2009-11-28  2:22 UTC (permalink / raw)
  To: gcc-bugs

This bug was previously mentioned in email from Denis. I have confirmed this on
4.5 (after long but educational tour of reload)

http://gcc.gnu.org/ml/gcc/2006-03/msg00783.html

When stacks slots increase from zero in reload() (in my case due to
setup_save_areas() ) the register elimination conditions can change. For
example the AVR port has:

get_frame_size () > 0 

as part of frame_pointer_required_p thus FP->SP elimination can change.

New slots do restart the spill and reload loop :

      /* If we allocated another stack slot, redo elimination bookkeeping.  */
      if (starting_frame_size != get_frame_size ())
        continue;

BUT update_eliminables is never called before calculate_needs_all_insns(), so
the wrong reloads are calculated (in my case marking the FP to be spilled in
the just added caller save insn !)

As a consequence, a spill and reload failure occurs.

The solution would seem to be to add update_eliminables before
calculate_needs_all_insns (global);


-- 
           Summary: update_eliminables should be called in reload after
                    something changes
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hutchinsonandy at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: avr-unknown-none


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42204


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

* [Bug middle-end/42204] update_eliminables should be called in reload after something changes
  2009-11-28  2:22 [Bug c/42204] New: update_eliminables should be called in reload after something changes hutchinsonandy at gcc dot gnu dot org
@ 2010-09-20  2:45 ` eric dot weddington at atmel dot com
  0 siblings, 0 replies; 2+ messages in thread
From: eric dot weddington at atmel dot com @ 2010-09-20  2:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from eric dot weddington at atmel dot com  2010-09-20 02:45 -------
Andy, do you have a test case for this bug?


-- 

eric dot weddington at atmel dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42204


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

end of thread, other threads:[~2010-09-20  2:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-28  2:22 [Bug c/42204] New: update_eliminables should be called in reload after something changes hutchinsonandy at gcc dot gnu dot org
2010-09-20  2:45 ` [Bug middle-end/42204] " eric dot weddington at atmel dot com

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).