OSDN Git Service

gcc/fortran:
[pf3gnuchains/gcc-fork.git] / gcc / struct-equiv.c
index ce3efcd..3658e87 100644 (file)
@@ -1,6 +1,7 @@
 /* Control flow optimization code for GNU compiler.
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -88,6 +89,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
 #include "target.h"
 #include "emit-rtl.h"
 #include "reload.h"
+#include "df.h"
 
 static void merge_memattrs (rtx, rtx);
 static bool set_dest_equiv_p (rtx x, rtx y, struct equiv_info *info);
@@ -865,12 +867,8 @@ death_notes_match_p (rtx i1 ATTRIBUTE_UNUSED, rtx i2 ATTRIBUTE_UNUSED,
            SET_HARD_REG_BIT (i2_regset, regno);
          }
 
-      GO_IF_HARD_REG_EQUAL (i1_regset, i2_regset, done);
-
-      return false;
-
-    done:
-      ;
+      if (!hard_reg_set_equal_p (i1_regset, i2_regset))
+       return false;
     }
 #endif
   return true;
@@ -987,13 +985,8 @@ insns_match_p (rtx i1, rtx i2, struct equiv_info *info)
 bool
 struct_equiv_init (int mode, struct equiv_info *info)
 {
-  if ((info->x_block->flags | info->y_block->flags) & BB_DIRTY)
-    update_life_info_in_dirty_blocks (UPDATE_LIFE_GLOBAL_RM_NOTES,
-                                     (PROP_DEATH_NOTES
-                                      | ((mode & CLEANUP_POST_REGSTACK)
-                                         ? PROP_POST_REGSTACK : 0)));
-  if (!REG_SET_EQUAL_P (info->x_block->il.rtl->global_live_at_end,
-                       info->y_block->il.rtl->global_live_at_end))
+  if (!REG_SET_EQUAL_P (DF_LR_OUT (info->x_block),
+                       DF_LR_OUT (info->y_block)))
     {
 #ifdef STACK_REGS
       unsigned rn;
@@ -1006,11 +999,11 @@ struct_equiv_init (int mode, struct equiv_info *info)
         least makes the regsets comparable.  */
       for (rn = FIRST_STACK_REG; rn <= LAST_STACK_REG; rn++)
        {
-         CLEAR_REGNO_REG_SET (info->x_block->il.rtl->global_live_at_end, rn);
-         CLEAR_REGNO_REG_SET (info->y_block->il.rtl->global_live_at_end, rn);
+         CLEAR_REGNO_REG_SET (DF_LR_OUT (info->x_block), rn);
+         CLEAR_REGNO_REG_SET (DF_LR_OUT (info->y_block), rn);
        }
-      if (!REG_SET_EQUAL_P (info->x_block->il.rtl->global_live_at_end,
-                           info->y_block->il.rtl->global_live_at_end))
+      if (!REG_SET_EQUAL_P (DF_LR_OUT (info->x_block),
+                           DF_LR_OUT (info->y_block)))
 #endif
        return false;
     }
@@ -1032,7 +1025,7 @@ struct_equiv_init (int mode, struct equiv_info *info)
   info->common_live = ALLOC_REG_SET (&reg_obstack);
   info->x_local_live = ALLOC_REG_SET (&reg_obstack);
   info->y_local_live = ALLOC_REG_SET (&reg_obstack);
-  COPY_REG_SET (info->common_live, info->x_block->il.rtl->global_live_at_end);
+  COPY_REG_SET (info->common_live, DF_LR_OUT (info->x_block));
   struct_equiv_make_checkpoint (&info->best_match, info);
   return true;
 }