Commit 080cbf9e by Vladimir Makarov Committed by Vladimir Makarov

re PR rtl-optimization/58438 (ICE: in check_rtl, at lra.c:2036)

2013-09-18  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/58438
	* lra.c (lra): Clear lra_optional_reload_pseudos in upper loop.
	* lra-constraints.c (undo_optional_reloads): Keep optional reloads
	from previous subpasses.

2013-09-18  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/58438
	* g++.dg/pr58438.C: New test.

From-SVN: r202714
parent 83ba23b7
2013-09-18 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/58438
* lra.c (lra): Clear lra_optional_reload_pseudos in upper loop.
* lra-constraints.c (undo_optional_reloads): Keep optional reloads
from previous subpasses.
2013-09-18 Richard Earnshaw <rearnsha@arm.com> 2013-09-18 Richard Earnshaw <rearnsha@arm.com>
* arm.c (arm_get_frame_offsets): Validate architecture supports * arm.c (arm_get_frame_offsets): Validate architecture supports
......
...@@ -5456,10 +5456,12 @@ undo_optional_reloads (void) ...@@ -5456,10 +5456,12 @@ undo_optional_reloads (void)
EXECUTE_IF_SET_IN_BITMAP (&lra_optional_reload_pseudos, 0, regno, bi) EXECUTE_IF_SET_IN_BITMAP (&lra_optional_reload_pseudos, 0, regno, bi)
{ {
keep_p = false; keep_p = false;
if (reg_renumber[lra_reg_info[regno].restore_regno] >= 0) /* Keep optional reloads from previous subpasses. */
/* If the original pseudo changed its allocation, just if (lra_reg_info[regno].restore_regno < 0
removing the optional pseudo is dangerous as the original /* If the original pseudo changed its allocation, just
pseudo will have longer live range. */ removing the optional pseudo is dangerous as the original
pseudo will have longer live range. */
|| reg_renumber[lra_reg_info[regno].restore_regno] >= 0)
keep_p = true; keep_p = true;
else if (reg_renumber[regno] >= 0) else if (reg_renumber[regno] >= 0)
EXECUTE_IF_SET_IN_BITMAP (&lra_reg_info[regno].insn_bitmap, 0, uid, bi2) EXECUTE_IF_SET_IN_BITMAP (&lra_reg_info[regno].insn_bitmap, 0, uid, bi2)
......
...@@ -2315,7 +2315,6 @@ lra (FILE *f) ...@@ -2315,7 +2315,6 @@ lra (FILE *f)
{ {
for (;;) for (;;)
{ {
bitmap_clear (&lra_optional_reload_pseudos);
/* We should try to assign hard registers to scratches even /* We should try to assign hard registers to scratches even
if there were no RTL transformations in if there were no RTL transformations in
lra_constraints. */ lra_constraints. */
...@@ -2367,6 +2366,9 @@ lra (FILE *f) ...@@ -2367,6 +2366,9 @@ lra (FILE *f)
lra_clear_live_ranges (); lra_clear_live_ranges ();
} }
} }
/* Don't clear optional reloads bitmap until all constraints are
satisfied as we need to differ them from regular reloads. */
bitmap_clear (&lra_optional_reload_pseudos);
bitmap_clear (&lra_subreg_reload_pseudos); bitmap_clear (&lra_subreg_reload_pseudos);
bitmap_clear (&lra_inheritance_pseudos); bitmap_clear (&lra_inheritance_pseudos);
bitmap_clear (&lra_split_regs); bitmap_clear (&lra_split_regs);
......
2013-09-18 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/58438
* g++.dg/pr58438.C: New test.
2013-09-18 Tobias Burnus <burnus@net-b.de> 2013-09-18 Tobias Burnus <burnus@net-b.de>
PR fortran/43366 PR fortran/43366
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment