re PR middle-end/32749 (gfortran.dg/auto_array_1.f90)
authorKenneth Zadeck <zadeck@gcc.gnu.org>
Fri, 27 Jul 2007 17:22:14 +0000 (17:22 +0000)
committerKenneth Zadeck <zadeck@gcc.gnu.org>
Fri, 27 Jul 2007 17:22:14 +0000 (17:22 +0000)
2007-07-26  Kenneth Zadeck <zadeck@naturalbridge.com>

PR middle-end/32749

* df-problems.c (df_create_unused_note): Removed do_not_gen parm
and the updating of the live and do_not_gen sets.
(df_note_bb_compute): Added updating of live and do_not_gen sets
for regular defs so that the case of clobber inside conditional
call is processed correctly.

From-SVN: r126987

gcc/ChangeLog
gcc/df-problems.c

index 7fed2765b7d2e33fc71026e83f60bf9745c786f2..a13f34946cdacb0480db221531d0d9ea9f4bc937 100644 (file)
@@ -1,3 +1,13 @@
+2007-07-26  Kenneth Zadeck <zadeck@naturalbridge.com>
+
+       PR middle-end/32749
+       
+       * df-problems.c (df_create_unused_note): Removed do_not_gen parm
+       and the updating of the live and do_not_gen sets.
+       (df_note_bb_compute): Added updating of live and do_not_gen sets
+       for regular defs so that the case of clobber inside conditional
+       call is processed correctly.
+       
 2007-07-27  Zdenek Dvorak  <dvorakz@suse.cz>
 
        * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Generate the
 
        * c-common.c (warn_logical_operator): Fix condition.
 
-2007-03-10  Tobias Schl�ter  <tobi@gcc.gnu.org>
+2007-03-10  Tobias Schl�ter  <tobi@gcc.gnu.org>
 
        * config/i386/darwin.h (DARWIN_MINVERSION_SPEC): Add missing
        quotation mark.
        * langhooks.h (struct lang_hooks): Removed field
        'can_use_bit_fields_p'.
 
-2007-01-10  Ralf Corsépius <ralf.corsepius@rtems.org>
+2007-01-10  Ralf CorsÃ\83©pius <ralf.corsepius@rtems.org>
 
        * config/bfin/t-bfin, config/bfin/t-bfin-elf: Remove GCC_CFLAGS.
 
        * config/frv/predicates.md (reg_or_0_operand): Accept
        CONST_DOUBLEs.
 
-2007-01-08  Ralf Corsépius <ralf.corsepius@rtems.org>
+2007-01-08  Ralf CorsÃ\83©pius <ralf.corsepius@rtems.org>
 
        * config/bfin/rtems.h, config/bfin/t-rtems: New.
        * config.gcc: Add bfin*-rtems*.
index b3ae9a1620fe01555fb445d9161b5573fd83329e..fa349633556fae24b9df39b7791e3bae77a7d3ae 100644 (file)
@@ -3868,13 +3868,12 @@ df_set_dead_notes_for_mw (rtx insn, rtx old, struct df_mw_hardreg *mws,
 }
 
 
-/* Create a REG_UNUSED note if necessary for DEF in INSN updating LIVE
-   and DO_NOT_GEN.  Do not generate notes for registers in artificial
-   uses.  */
+/* Create a REG_UNUSED note if necessary for DEF in INSN updating
+   LIVE.  Do not generate notes for registers in ARTIFICIAL_USES.  */
 
 static rtx
 df_create_unused_note (rtx insn, rtx old, struct df_ref *def, 
-                      bitmap live, bitmap do_not_gen, bitmap artificial_uses)
+                      bitmap live, bitmap artificial_uses)
 {
   unsigned int dregno = DF_REF_REGNO (def);
   
@@ -3899,12 +3898,6 @@ df_create_unused_note (rtx insn, rtx old, struct df_ref *def,
 #endif
     }
   
-  if (!(DF_REF_FLAGS (def) & (DF_REF_MUST_CLOBBER + DF_REF_MAY_CLOBBER)))
-    bitmap_set_bit (do_not_gen, dregno);
-  
-  /* Kill this register if it is not a subreg store or conditional store.  */
-  if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL)))
-    bitmap_clear_bit (live, dregno);
   return old;
 }
 
@@ -3915,7 +3908,7 @@ df_create_unused_note (rtx insn, rtx old, struct df_ref *def,
 
 static void
 df_note_bb_compute (unsigned int bb_index, 
-                 bitmap live, bitmap do_not_gen, bitmap artificial_uses)
+                   bitmap live, bitmap do_not_gen, bitmap artificial_uses)
 {
   basic_block bb = BASIC_BLOCK (bb_index);
   rtx insn;
@@ -4012,17 +4005,17 @@ df_note_bb_compute (unsigned int bb_index,
          for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
            {
              struct df_ref *def = *def_rec;
-             if (!(DF_REF_FLAGS (def) & (DF_REF_MUST_CLOBBER | DF_REF_MAY_CLOBBER)))
-               old_unused_notes
-                 = df_create_unused_note (insn, old_unused_notes, 
-                                          def, live, do_not_gen, 
-                                          artificial_uses);
-
-             /* However a may or must clobber still needs to kill the
-                reg so that REG_DEAD notes are later placed
-                appropriately.  */ 
-             else 
-               bitmap_clear_bit (live, DF_REF_REGNO (def));
+             unsigned int dregno = DF_REF_REGNO (def);
+             if (!DF_REF_FLAGS_IS_SET (def, DF_REF_MUST_CLOBBER | DF_REF_MAY_CLOBBER))
+               {
+                 old_unused_notes
+                   = df_create_unused_note (insn, old_unused_notes, 
+                                            def, live, artificial_uses);
+                 bitmap_set_bit (do_not_gen, dregno);
+               }
+
+             if (!DF_REF_FLAGS_IS_SET (def, DF_REF_PARTIAL | DF_REF_CONDITIONAL))
+               bitmap_clear_bit (live, dregno);
            }
        }
       else
@@ -4043,10 +4036,16 @@ df_note_bb_compute (unsigned int bb_index,
          for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
            {
              struct df_ref *def = *def_rec;
+             unsigned int dregno = DF_REF_REGNO (def);
              old_unused_notes
                = df_create_unused_note (insn, old_unused_notes, 
-                                        def, live, do_not_gen, 
-                                        artificial_uses);
+                                        def, live, artificial_uses);
+
+             if (!DF_REF_FLAGS_IS_SET (def, DF_REF_MUST_CLOBBER | DF_REF_MAY_CLOBBER))
+               bitmap_set_bit (do_not_gen, dregno);
+
+             if (!DF_REF_FLAGS_IS_SET (def, DF_REF_PARTIAL | DF_REF_CONDITIONAL))
+               bitmap_clear_bit (live, dregno);
            }
        }