[Bug c/42204] New: update_eliminables should be called in reload after something changes
hutchinsonandy at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 28 02:22:00 GMT 2009
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
More information about the Gcc-bugs
mailing list