OSDN Git Service

2008-03-26 Thomas Quinot <quinot@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / tree-into-ssa.c
index 1e71e6c..efb315b 100644 (file)
@@ -1,12 +1,13 @@
 /* Rewrite a program in Normal form into SSA.
-   Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007
+   Free Software Foundation, Inc.
    Contributed by Diego Novillo <dnovillo@redhat.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)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GCC is distributed in the hope that it will be useful,
@@ -15,9 +16,8 @@ MERCHANTABILITY or 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"
@@ -2298,8 +2298,10 @@ rewrite_into_ssa (void)
 }
 
 
-struct tree_opt_pass pass_build_ssa = 
+struct gimple_opt_pass pass_build_ssa = 
 {
+ {
+  GIMPLE_PASS,
   "ssa",                               /* name */
   NULL,                                        /* gate */
   rewrite_into_ssa,                    /* execute */
@@ -2313,8 +2315,8 @@ struct tree_opt_pass pass_build_ssa =
   0,                                   /* todo_flags_start */
   TODO_dump_func
     | TODO_verify_ssa
-    | TODO_remove_unused_locals,       /* todo_flags_finish */
-  0                                    /* letter */
+    | TODO_remove_unused_locals                /* todo_flags_finish */
+ }
 };
 
 
@@ -2793,9 +2795,11 @@ mark_sym_for_renaming (tree sym)
     subvar_t svars;
     if (var_can_have_subvars (sym) && (svars = get_subvars_for_var (sym)))
       {
-       subvar_t sv;
-       for (sv = svars; sv; sv = sv->next)
-         mark_sym_for_renaming (sv->var);
+        unsigned int i;
+       tree subvar;
+
+       for (i = 0; VEC_iterate (tree, svars, i, subvar); ++i)
+         mark_sym_for_renaming (subvar);
       }
   }