This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] (partial transition) - remove some


Here is a patch taken from what is listed in
   http://gcc.gnu.org/wiki/Partial_Transitions : VARRAY to VEC

It is mostly some useless (IMO) includes removal, and comments update.
Concerning the comments, I've not check if they were still relevant. I've
just translated as is.

Some other trivial clean up seem still possible, I'll track them down if you
think it is usefull. There are also some other places which still really use
VARRAY. So the code should be updated.


It has been bootstrapped in my cygwin box against :
   revision 143837:

with the following command line :
   configure --enable-languages=c --with-arch=athlon-xp --disable-nls
   make -j 2


Hope this help.

Best regards,
Christophe Jaillet

------8<------8<------8<------8<------8<------8<------8<------8<------8<---

Index: gcc/tree-into-ssa.c
===================================================================
--- gcc/tree-into-ssa.c (revision 143853)
+++ gcc/tree-into-ssa.c (working copy)
@@ -38,7 +38,6 @@ along with GCC; see the file COPYING3.
 #include "tree-flow.h"
 #include "gimple.h"
 #include "tree-inline.h"
-#include "varray.h"
 #include "timevar.h"
 #include "hashtab.h"
 #include "tree-dump.h"
Index: gcc/cgraph.c
===================================================================
--- gcc/cgraph.c (revision 143853)
+++ gcc/cgraph.c (working copy)
@@ -78,7 +78,6 @@ The callgraph:
 #include "target.h"
 #include "basic-block.h"
 #include "cgraph.h"
-#include "varray.h"
 #include "output.h"
 #include "intl.h"
 #include "gimple.h"
Index: gcc/tree-phinodes.c
===================================================================
--- gcc/tree-phinodes.c (revision 143853)
+++ gcc/tree-phinodes.c (working copy)
@@ -23,7 +23,6 @@ along with GCC; see the file COPYING3.
 #include "tm.h"
 #include "tree.h"
 #include "rtl.h"
-#include "varray.h"
 #include "ggc.h"
 #include "basic-block.h"
 #include "tree-flow.h"
Index: gcc/objc/objc-act.c
===================================================================
--- gcc/objc/objc-act.c (revision 143853)
+++ gcc/objc/objc-act.c (working copy)
@@ -65,7 +65,6 @@ along with GCC; see the file COPYING3.
 #include "output.h"
 #include "toplev.h"
 #include "ggc.h"
-#include "varray.h"
 #include "debug.h"
 #include "target.h"
 #include "diagnostic.h"
Index: gcc/omega.c
===================================================================
--- gcc/omega.c (revision 143853)
+++ gcc/omega.c (working copy)
@@ -39,7 +39,6 @@ along with GCC; see the file COPYING3.
 #include "ggc.h"
 #include "tree.h"
 #include "diagnostic.h"
-#include "varray.h"
 #include "tree-pass.h"
 #include "omega.h"

Index: gcc/cgraphunit.c
===================================================================
--- gcc/cgraphunit.c (revision 143853)
+++ gcc/cgraphunit.c (working copy)
@@ -1502,7 +1502,7 @@ cgraph_copy_node_for_versioning (struct
     a callgraph update (creating a new cgraph node and updating
     its callees and callers).

-    REDIRECT_CALLERS varray includes the edges to be redirected
+    REDIRECT_CALLERS VEC includes the edges to be redirected
     to the new version.

     TREE_MAP is a mapping of tree nodes we want to replace with
Index: gcc/regs.h
===================================================================
--- gcc/regs.h (revision 143853)
+++ gcc/regs.h (working copy)
@@ -22,7 +22,6 @@ along with GCC; see the file COPYING3.
 #ifndef GCC_REGS_H
 #define GCC_REGS_H

-#include "varray.h"
 #include "obstack.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
Index: gcc/objcp/objcp-decl.c
===================================================================
--- gcc/objcp/objcp-decl.c (revision 143853)
+++ gcc/objcp/objcp-decl.c (working copy)
@@ -36,7 +36,6 @@ along with GCC; see the file COPYING3.
 #include "cpplib.h"
 #include "debug.h"
 #include "target.h"
-#include "varray.h"

 #include "objc-act.h"
 #include "objcp-decl.h"
Index: gcc/cp/optimize.c
===================================================================
--- gcc/cp/optimize.c (revision 143853)
+++ gcc/cp/optimize.c (working copy)
@@ -30,7 +30,6 @@ along with GCC; see the file COPYING3.
 #include "input.h"
 #include "integrate.h"
 #include "toplev.h"
-#include "varray.h"
 #include "params.h"
 #include "hashtab.h"
 #include "target.h"
Index: gcc/cp/mangle.c
===================================================================
--- gcc/cp/mangle.c (revision 143853)
+++ gcc/cp/mangle.c (working copy)
@@ -55,7 +55,6 @@ along with GCC; see the file COPYING3.
 #include "real.h"
 #include "obstack.h"
 #include "toplev.h"
-#include "varray.h"
 #include "flags.h"
 #include "target.h"

@@ -379,7 +378,7 @@ add_substitution (tree node)
   }
 #endif /* ENABLE_CHECKING */

-  /* Put the decl onto the varray of substitution candidates.  */
+  /* Put the decl onto the VEC of substitution candidates.  */
   VEC_safe_push (tree, gc, G.substitutions, node);

   if (DEBUG_MANGLE)
Index: gcc/cp/cp-tree.h
===================================================================
--- gcc/cp/cp-tree.h (revision 143853)
+++ gcc/cp/cp-tree.h (working copy)
@@ -28,7 +28,6 @@ along with GCC; see the file COPYING3.
 #include "hashtab.h"
 #include "splay-tree.h"
 #include "vec.h"
-#include "varray.h"
 #include "c-common.h"
 #include "name-lookup.h"

Index: gcc/cp/parser.c
===================================================================
--- gcc/cp/parser.c (revision 143853)
+++ gcc/cp/parser.c (working copy)
@@ -24,7 +24,6 @@ along with GCC; see the file COPYING3.
 #include "coretypes.h"
 #include "tm.h"
 #include "dyn-string.h"
-#include "varray.h"
 #include "cpplib.h"
 #include "tree.h"
 #include "cp-tree.h"
Index: gcc/tree-ssa-loop-ivopts.c
===================================================================
--- gcc/tree-ssa-loop-ivopts.c (revision 143853)
+++ gcc/tree-ssa-loop-ivopts.c (working copy)
@@ -77,7 +77,6 @@ along with GCC; see the file COPYING3.
 #include "tree-dump.h"
 #include "timevar.h"
 #include "cfgloop.h"
-#include "varray.h"
 #include "expr.h"
 #include "tree-pass.h"
 #include "ggc.h"
Index: gcc/tree-nomudflap.c
===================================================================
--- gcc/tree-nomudflap.c (revision 143853)
+++ gcc/tree-nomudflap.c (working copy)
@@ -31,7 +31,6 @@ along with GCC; see the file COPYING3.
 #include "diagnostic.h"
 #include "hashtab.h"
 #include "output.h"
-#include "varray.h"
 #include "langhooks.h"
 #include "tree-mudflap.h"
 #include "tree-pass.h"
Index: gcc/c-objc-common.c
===================================================================
--- gcc/c-objc-common.c (revision 143853)
+++ gcc/c-objc-common.c (working copy)
@@ -32,7 +32,6 @@ along with GCC; see the file COPYING3.
 #include "toplev.h"
 #include "diagnostic.h"
 #include "tree-inline.h"
-#include "varray.h"
 #include "ggc.h"
 #include "langhooks.h"
 #include "tree-mudflap.h"
Index: gcc/tree-ssa-propagate.c
===================================================================
--- gcc/tree-ssa-propagate.c (revision 143853)
+++ gcc/tree-ssa-propagate.c (working copy)
@@ -38,7 +38,6 @@
 #include "tree-pass.h"
 #include "tree-ssa-propagate.h"
 #include "langhooks.h"
-#include "varray.h"
 #include "vec.h"
 #include "value-prof.h"
 #include "gimple.h"
Index: gcc/gimple-low.c
===================================================================
--- gcc/gimple-low.c (revision 143853)
+++ gcc/gimple-low.c (working copy)
@@ -25,7 +25,6 @@ along with GCC; see the file COPYING3.
 #include "tm.h"
 #include "tree.h"
 #include "rtl.h"
-#include "varray.h"
 #include "gimple.h"
 #include "tree-iterator.h"
 #include "tree-inline.h"
Index: gcc/c-semantics.c
===================================================================
--- gcc/c-semantics.c (revision 143853)
+++ gcc/c-semantics.c (working copy)
@@ -28,7 +28,6 @@ along with GCC; see the file COPYING3.
 #include "tree.h"
 #include "function.h"
 #include "splay-tree.h"
-#include "varray.h"
 #include "c-common.h"
 #include "except.h"
 /* In order for the format checking to accept the C frontend
Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c (revision 143853)
+++ gcc/dwarf2out.c (working copy)
@@ -78,7 +78,6 @@ along with GCC; see the file COPYING3.
 #include "dwarf2out.h"
 #include "dwarf2asm.h"
 #include "toplev.h"
-#include "varray.h"
 #include "ggc.h"
 #include "md5.h"
 #include "tm_p.h"
Index: gcc/alias.c
===================================================================
--- gcc/alias.c (revision 143853)
+++ gcc/alias.c (working copy)
@@ -42,7 +42,6 @@ along with GCC; see the file COPYING3.
 #include "timevar.h"
 #include "target.h"
 #include "cgraph.h"
-#include "varray.h"
 #include "tree-pass.h"
 #include "ipa-type-escape.h"
 #include "df.h"
Index: gcc/tree-if-conv.c
===================================================================
--- gcc/tree-if-conv.c (revision 143853)
+++ gcc/tree-if-conv.c (working copy)
@@ -87,7 +87,6 @@ along with GCC; see the file COPYING3.
 #include "c-common.h"
 #include "flags.h"
 #include "timevar.h"
-#include "varray.h"
 #include "rtl.h"
 #include "basic-block.h"
 #include "diagnostic.h"
Index: gcc/gimplify.c
===================================================================
--- gcc/gimplify.c (revision 143853)
+++ gcc/gimplify.c (working copy)
@@ -27,7 +27,6 @@ along with GCC; see the file COPYING3.
 #include "tm.h"
 #include "tree.h"
 #include "rtl.h"
-#include "varray.h"
 #include "gimple.h"
 #include "tree-iterator.h"
 #include "tree-inline.h"
Index: gcc/cfglayout.c
===================================================================
--- gcc/cfglayout.c (revision 143853)
+++ gcc/cfglayout.c (working copy)
@@ -223,7 +223,7 @@ record_effective_endpoints (void)

 /* Data structures representing mapping of INSN_LOCATOR into scope blocks,
line
    numbers and files.  In order to be GGC friendly we need to use separate
-   varrays.  This also slightly improve the memory locality in binary
search.
+   VEC.  This also slightly improve the memory locality in binary search.
    The _locs array contains locators where the given property change.  The
    block_locators_blocks contains the scope block that is used for all insn
    locator greater than corresponding block_locators_locs value and smaller
Index: gcc/ggc-zone.c
===================================================================
--- gcc/ggc-zone.c (revision 143853)
+++ gcc/ggc-zone.c (working copy)
@@ -30,7 +30,6 @@ along with GCC; see the file COPYING3.
 #include "rtl.h"
 #include "tm_p.h"
 #include "toplev.h"
-#include "varray.h"
 #include "flags.h"
 #include "ggc.h"
 #include "timevar.h"
Index: gcc/tree-ssa.c
===================================================================
--- gcc/tree-ssa.c (revision 143853)
+++ gcc/tree-ssa.c (working copy)
@@ -39,7 +39,6 @@ along with GCC; see the file COPYING3.
 #include "tree-flow.h"
 #include "gimple.h"
 #include "tree-inline.h"
-#include "varray.h"
 #include "timevar.h"
 #include "hashtab.h"
 #include "tree-dump.h"
Index: gcc/tree-ssa-loop-prefetch.c
===================================================================
--- gcc/tree-ssa-loop-prefetch.c (revision 143853)
+++ gcc/tree-ssa-loop-prefetch.c (working copy)
@@ -32,7 +32,6 @@ along with GCC; see the file COPYING3.
 #include "tree-dump.h"
 #include "timevar.h"
 #include "cfgloop.h"
-#include "varray.h"
 #include "expr.h"
 #include "tree-pass.h"
 #include "ggc.h"
Index: gcc/integrate.h
===================================================================
--- gcc/integrate.h (revision 143853)
+++ gcc/integrate.h (working copy)
@@ -18,8 +18,6 @@ You should have received a copy of the G
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */

-#include "varray.h"
-
 extern rtx get_hard_reg_initial_val (enum machine_mode, unsigned int);
 extern rtx has_hard_reg_initial_val (enum machine_mode, unsigned int);
 /* If a pseudo represents an initial hard reg (or expression), return
Index: gcc/c-gimplify.c
===================================================================
--- gcc/c-gimplify.c (revision 143853)
+++ gcc/c-gimplify.c (working copy)
@@ -29,7 +29,6 @@ along with GCC; see the file COPYING3.
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "varray.h"
 #include "c-tree.h"
 #include "c-common.h"
 #include "gimple.h"
Index: gcc/c-common.c
===================================================================
--- gcc/c-common.c (revision 143853)
+++ gcc/c-common.c (working copy)
@@ -29,7 +29,6 @@ along with GCC; see the file COPYING3.
 #include "c-pragma.h"
 #include "rtl.h"
 #include "ggc.h"
-#include "varray.h"
 #include "expr.h"
 #include "c-common.h"
 #include "diagnostic.h"
Index: gcc/c-common.h
===================================================================
--- gcc/c-common.h (revision 143853)
+++ gcc/c-common.h (working copy)
@@ -722,7 +722,6 @@ extern tree c_alignof_expr (tree);
    NOP_EXPR is used as a special case (see truthvalue_conversion).  */
 extern void binary_op_error (location_t, enum tree_code, tree, tree);
 extern tree fix_string_type (tree);
-struct varray_head_tag;
 extern void constant_expression_warning (tree);
 extern void constant_expression_error (tree);
 extern bool strict_aliasing_warning (tree, tree, tree);
Index: gcc/reg-stack.c
===================================================================
--- gcc/reg-stack.c (revision 143853)
+++ gcc/reg-stack.c (working copy)
@@ -168,7 +168,6 @@
 #include "output.h"
 #include "basic-block.h"
 #include "cfglayout.h"
-#include "varray.h"
 #include "reload.h"
 #include "ggc.h"
 #include "timevar.h"
Index: gcc/basic-block.h
===================================================================
--- gcc/basic-block.h (revision 143853)
+++ gcc/basic-block.h (working copy)
@@ -23,7 +23,6 @@ along with GCC; see the file COPYING3.

 #include "bitmap.h"
 #include "sbitmap.h"
-#include "varray.h"
 #include "partition.h"
 #include "hard-reg-set.h"
 #include "predict.h"
Index: gcc/tree-ssa-structalias.c
===================================================================
--- gcc/tree-ssa-structalias.c (revision 143853)
+++ gcc/tree-ssa-structalias.c (working copy)
@@ -35,7 +35,6 @@
 #include "c-common.h"
 #include "tree-flow.h"
 #include "tree-inline.h"
-#include "varray.h"
 #include "c-tree.h"
 #include "diagnostic.h"
 #include "toplev.h"
Index: gcc/tree-ssanames.c
===================================================================
--- gcc/tree-ssanames.c (revision 143853)
+++ gcc/tree-ssanames.c (working copy)
@@ -22,7 +22,6 @@ along with GCC; see the file COPYING3.
 #include "coretypes.h"
 #include "tm.h"
 #include "tree.h"
-#include "varray.h"
 #include "ggc.h"
 #include "tree-flow.h"
 #include "tree-pass.h"
Index: gcc/reload1.c
===================================================================
--- gcc/reload1.c (revision 143853)
+++ gcc/reload1.c (working copy)
@@ -112,7 +112,7 @@ rtx *reg_equiv_invariant;
    is transferred to either reg_equiv_address or reg_equiv_mem.  */
 rtx *reg_equiv_memory_loc;

-/* We allocate reg_equiv_memory_loc inside a varray so that the garbage
+/* We allocate reg_equiv_memory_loc inside a VEC so that the garbage
    collector can keep track of what is inside.  */
 VEC(rtx,gc) *reg_equiv_memory_loc_vec;





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]