OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / integrate.c
index e3decfb..3a79183 100644 (file)
@@ -1,6 +1,6 @@
 /* Procedure integration for GCC.
    Copyright (C) 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com)
 
@@ -35,10 +35,12 @@ along with GCC; see the file COPYING3.  If not see
 #include "expr.h"
 #include "output.h"
 #include "recog.h"
+/* For reg_equivs.  */
+#include "reload.h"
 #include "integrate.h"
 #include "except.h"
 #include "function.h"
-#include "toplev.h"
+#include "diagnostic-core.h"
 #include "intl.h"
 #include "params.h"
 #include "ggc.h"
@@ -111,8 +113,9 @@ set_block_origin_self (tree stmt)
 
        for (local_decl = BLOCK_VARS (stmt);
             local_decl != NULL_TREE;
-            local_decl = TREE_CHAIN (local_decl))
-         set_decl_origin_self (local_decl);    /* Potential recursion.  */
+            local_decl = DECL_CHAIN (local_decl))
+         if (! DECL_EXTERNAL (local_decl))
+           set_decl_origin_self (local_decl);  /* Potential recursion.  */
       }
 
       {
@@ -147,7 +150,7 @@ set_decl_origin_self (tree decl)
        {
          tree arg;
 
-         for (arg = DECL_ARGUMENTS (decl); arg; arg = TREE_CHAIN (arg))
+         for (arg = DECL_ARGUMENTS (decl); arg; arg = DECL_CHAIN (arg))
            DECL_ABSTRACT_ORIGIN (arg) = arg;
          if (DECL_INITIAL (decl) != NULL_TREE
              && DECL_INITIAL (decl) != error_mark_node)
@@ -172,8 +175,9 @@ set_block_abstract_flags (tree stmt, int setting)
 
   for (local_decl = BLOCK_VARS (stmt);
        local_decl != NULL_TREE;
-       local_decl = TREE_CHAIN (local_decl))
-    set_decl_abstract_flags (local_decl, setting);
+       local_decl = DECL_CHAIN (local_decl))
+    if (! DECL_EXTERNAL (local_decl))
+      set_decl_abstract_flags (local_decl, setting);
 
   for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (stmt); i++)
     {
@@ -203,7 +207,7 @@ set_decl_abstract_flags (tree decl, int setting)
     {
       tree arg;
 
-      for (arg = DECL_ARGUMENTS (decl); arg; arg = TREE_CHAIN (arg))
+      for (arg = DECL_ARGUMENTS (decl); arg; arg = DECL_CHAIN (arg))
        DECL_ABSTRACT (arg) = setting;
       if (DECL_INITIAL (decl) != NULL_TREE
          && DECL_INITIAL (decl) != error_mark_node)
@@ -246,10 +250,10 @@ get_hard_reg_initial_val (enum machine_mode mode, unsigned int regno)
   ivs = crtl->hard_reg_initial_vals;
   if (ivs == 0)
     {
-      ivs = GGC_NEW (initial_value_struct);
+      ivs = ggc_alloc_initial_value_struct ();
       ivs->num_entries = 0;
       ivs->max_entries = 5;
-      ivs->entries = GGC_NEWVEC (initial_value_pair, 5);
+      ivs->entries = ggc_alloc_vec_initial_value_pair (5);
       crtl->hard_reg_initial_vals = ivs;
     }
 
@@ -321,14 +325,14 @@ struct rtl_opt_pass pass_initial_value_sets =
   0,                                    /* properties_provided */
   0,                                    /* properties_destroyed */
   0,                                    /* todo_flags_start */
-  TODO_dump_func                        /* todo_flags_finish */
+  0                                     /* todo_flags_finish */
  }
 };
 
 /* 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)
+allocate_initial_values (VEC (reg_equivs_t, gc) *reg_equivs)
 {
   if (targetm.allocate_initial_value)
     {
@@ -346,7 +350,7 @@ allocate_initial_values (rtx *reg_equiv_memory_loc)
          if (x && REG_N_SETS (REGNO (ivs->entries[i].pseudo)) <= 1)
            {
              if (MEM_P (x))
-               reg_equiv_memory_loc[regno] = x;
+               reg_equiv_memory_loc (regno) = x;
              else
                {
                  basic_block bb;