OSDN Git Service

2010-09-09 Vladimir Makarov <vmakarov@redhat.com>
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Sep 2010 13:53:32 +0000 (13:53 +0000)
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 9 Sep 2010 13:53:32 +0000 (13:53 +0000)
PR middle-end/44554
* ira.c (ira): Switch off sharing spill slots if setjmp is called.

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

gcc/ChangeLog
gcc/ira.c

index f407781..1a4cab9 100644 (file)
@@ -1,5 +1,10 @@
 2010-09-09  Vladimir Makarov  <vmakarov@redhat.com>
 
+       PR middle-end/44554
+       * ira.c (ira): Switch off sharing spill slots if setjmp is called.
+
+2010-09-09  Vladimir Makarov  <vmakarov@redhat.com>
+
        PR middle-end/40386
        * ira.c (pseudo_for_reload_consideration_p): Don't use
        flag_ira_share_spill_slots.
index a38808c..e4dd2d3 100644 (file)
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -3178,9 +3178,12 @@ ira (FILE *f)
   ira_assert (ira_conflicts_p || !loops_p);
 
   saved_flag_ira_share_spill_slots = flag_ira_share_spill_slots;
-  if (too_high_register_pressure_p ())
+  if (too_high_register_pressure_p () || cfun->calls_setjmp)
     /* It is just wasting compiler's time to pack spilled pseudos into
-       stack slots in this case -- prohibit it.  */
+       stack slots in this case -- prohibit it.  We also do this if
+       there is setjmp call because a variable not modified between
+       setjmp and longjmp the compiler is required to preserve its
+       value and sharing slots does not guarantee it.  */
     flag_ira_share_spill_slots = FALSE;
 
   ira_color ();