OSDN Git Service

gcc/fortran:
[pf3gnuchains/gcc-fork.git] / gcc / integrate.c
index a6eeede..7eb29f2 100644 (file)
@@ -1,13 +1,13 @@
 /* Procedure integration for GCC.
    Copyright (C) 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -16,9 +16,8 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "system.h"
@@ -46,6 +45,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
 #include "target.h"
 #include "langhooks.h"
 #include "tree-pass.h"
+#include "df.h"
 
 /* Round to the next highest integer that meets the alignment.  */
 #define CEIL_ROUND(VALUE,ALIGN)        (((VALUE) + (ALIGN) - 1) & ~((ALIGN)- 1))
@@ -69,15 +69,15 @@ static void set_block_abstract_flags (tree, int);
 /* Return false if the function FNDECL cannot be inlined on account of its
    attributes, true otherwise.  */
 bool
-function_attribute_inlinable_p (tree fndecl)
+function_attribute_inlinable_p (const_tree fndecl)
 {
   if (targetm.attribute_table)
     {
-      tree a;
+      const_tree a;
 
       for (a = DECL_ATTRIBUTES (fndecl); a; a = TREE_CHAIN (a))
        {
-         tree name = TREE_PURPOSE (a);
+         const_tree name = TREE_PURPOSE (a);
          int i;
 
          for (i = 0; targetm.attribute_table[i].name != NULL; i++)
@@ -318,7 +318,7 @@ struct tree_opt_pass pass_initial_value_sets =
 /* If the backend knows where to allocate pseudos for hard
    register initial values, register these allocations now.  */
 void
-allocate_initial_values (rtx *reg_equiv_memory_loc ATTRIBUTE_UNUSED)
+allocate_initial_values (rtx *reg_equiv_memory_loc)
 {
   if (targetm.allocate_initial_value)
     {
@@ -347,18 +347,14 @@ allocate_initial_values (rtx *reg_equiv_memory_loc ATTRIBUTE_UNUSED)
                  reg_renumber[regno] = new_regno;
                  /* Poke the regno right into regno_reg_rtx so that even
                     fixed regs are accepted.  */
-                 REGNO (ivs->entries[i].pseudo) = new_regno;
+                 SET_REGNO (ivs->entries[i].pseudo, new_regno);
                  /* Update global register liveness information.  */
                  FOR_EACH_BB (bb)
                    {
-                     struct rtl_bb_info *info = bb->il.rtl;
-
-                     if (REGNO_REG_SET_P(info->global_live_at_start, regno))
-                       SET_REGNO_REG_SET (info->global_live_at_start,
-                                          new_regno);
-                     if (REGNO_REG_SET_P(info->global_live_at_end, regno))
-                       SET_REGNO_REG_SET (info->global_live_at_end,
-                                          new_regno);
+                     if (REGNO_REG_SET_P(df_get_live_in (bb), regno))
+                       SET_REGNO_REG_SET (df_get_live_in (bb), new_regno);
+                     if (REGNO_REG_SET_P(df_get_live_out (bb), regno))
+                       SET_REGNO_REG_SET (df_get_live_out (bb), new_regno);
                    }
                }
            }