* tree-ssa-operands.h (struct vuse_vec_d): Change num_vuse field
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 Jan 2007 01:31:06 +0000 (01:31 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 Jan 2007 01:31:06 +0000 (01:31 +0000)
to unsigned.
(VUSE_VECT_ELEMENT) [ENABLE_CHECKING]: Use unsigned comparison.
(VUSE_ELEMENT_PTR) [ENABLE_CHECKING]: Likewise.
(SET_VUSE_VECT_ELEMENT) [ENABLE_CHECKING]: Likewise.
(SET_VUSE_ELEMENT_VAR) [ENABLE_CHECKING]: Likewise.
(SET_VUSE_ELEMENT_PTR) [ENABLE_CHECKING]: Likewise.
(realloc_vdef, realloc_vuse): Change second parameter to
unsigned.
(ssa_operand_iterator_d): Change vuse_index and mayuse_index
fields to unsigned.
* tree-ssa-operands.c (realloc_vop): Change num_elem parameter to
unsigned. Change x and lim locals to unsigned.
(realloc_vdef, realloc_vuse): Change num_elem parameter to
unsigned.
(finalize_ssa_vuse_ops): Change old_i local to unsigned.
(copy_virtual_operands): Change i and n locals to unsigned.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120994 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-ssa-operands.c
gcc/tree-ssa-operands.h

index 5a9e553..d5eb9ae 100644 (file)
@@ -1,3 +1,23 @@
+2007-01-19  Ian Lance Taylor  <iant@google.com>
+
+       * tree-ssa-operands.h (struct vuse_vec_d): Change num_vuse field
+       to unsigned.
+       (VUSE_VECT_ELEMENT) [ENABLE_CHECKING]: Use unsigned comparison.
+       (VUSE_ELEMENT_PTR) [ENABLE_CHECKING]: Likewise.
+       (SET_VUSE_VECT_ELEMENT) [ENABLE_CHECKING]: Likewise.
+       (SET_VUSE_ELEMENT_VAR) [ENABLE_CHECKING]: Likewise.
+       (SET_VUSE_ELEMENT_PTR) [ENABLE_CHECKING]: Likewise.
+       (realloc_vdef, realloc_vuse): Change second parameter to
+       unsigned.
+       (ssa_operand_iterator_d): Change vuse_index and mayuse_index
+       fields to unsigned.
+       * tree-ssa-operands.c (realloc_vop): Change num_elem parameter to
+       unsigned. Change x and lim locals to unsigned.
+       (realloc_vdef, realloc_vuse): Change num_elem parameter to
+       unsigned.
+       (finalize_ssa_vuse_ops): Change old_i local to unsigned.
+       (copy_virtual_operands): Change i and n locals to unsigned.
+
 2007-01-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        PR middle-end/29335
index 0006de9..44e8707 100644 (file)
@@ -1,5 +1,5 @@
 /* SSA operands management for trees.
-   Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -671,9 +671,10 @@ add_vdef_op (tree stmt, tree op, int num, voptype_p last)
    is the head of the operand list it belongs to.  */
 
 static inline struct voptype_d *
-realloc_vop (struct voptype_d *ptr, int num_elem, struct voptype_d **root)
+realloc_vop (struct voptype_d *ptr, unsigned int num_elem,
+            struct voptype_d **root)
 {
-  int x, lim;
+  unsigned int x, lim;
   tree stmt, val;
   struct voptype_d *ret, *tmp;
 
@@ -732,7 +733,7 @@ realloc_vop (struct voptype_d *ptr, int num_elem, struct voptype_d **root)
 /* Reallocate the PTR vdef so that it has NUM_ELEM use slots.  */
 
 struct voptype_d *
-realloc_vdef (struct voptype_d *ptr, int num_elem)
+realloc_vdef (struct voptype_d *ptr, unsigned int num_elem)
 {
   tree val, stmt;
   struct voptype_d *ret;
@@ -748,7 +749,7 @@ realloc_vdef (struct voptype_d *ptr, int num_elem)
 /* Reallocate the PTR vuse so that it has NUM_ELEM use slots.  */
 
 struct voptype_d *
-realloc_vuse (struct voptype_d *ptr, int num_elem)
+realloc_vuse (struct voptype_d *ptr, unsigned int num_elem)
 {
   tree stmt;
   struct voptype_d *ret;
@@ -982,8 +983,7 @@ finalize_ssa_vdefs (tree stmt)
 static inline void
 finalize_ssa_vuse_ops (tree stmt)
 {
-  unsigned new_i;
-  int old_i;
+  unsigned new_i, old_i;
   voptype_p old_ops, last;
   VEC(tree,heap) *new_ops;
   stmt_ann_t ann;
@@ -2412,7 +2412,7 @@ update_stmt_operands (tree stmt)
 void
 copy_virtual_operands (tree dest, tree src)
 {
-  int i, n;
+  unsigned int i, n;
   voptype_p src_vuses, dest_vuses;
   voptype_p src_vdefs, dest_vdefs;
   struct voptype_d vuse;
index 92dc4f9..363b858 100644 (file)
@@ -1,5 +1,5 @@
 /* SSA operand management for trees.
-   Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -58,7 +58,7 @@ typedef struct vuse_element_d
 
 typedef struct vuse_vec_d
 {
-  int num_vuse;
+  unsigned int num_vuse;
   vuse_element_t uses[1];
 } vuse_vec_t;
 typedef struct vuse_vec_d *vuse_vec_p;
@@ -70,23 +70,23 @@ typedef struct vuse_vec_d *vuse_vec_p;
 
 #ifdef ENABLE_CHECKING
 #define VUSE_VECT_ELEMENT(V,X)                                         \
-    (gcc_assert ((X) >= 0 && (X) < VUSE_VECT_NUM_ELEM (V)),            \
+    (gcc_assert (((unsigned int) (X)) < VUSE_VECT_NUM_ELEM (V)),       \
      VUSE_VECT_ELEMENT_NC (V,X))
 
 #define VUSE_ELEMENT_PTR(V,X)                                          \
-    (gcc_assert ((X) >= 0 && (X) < VUSE_VECT_NUM_ELEM (V)),            \
+    (gcc_assert (((unsigned int) (X)) < VUSE_VECT_NUM_ELEM (V)),       \
      VUSE_ELEMENT_PTR_NC (V, X))
 
 #define SET_VUSE_VECT_ELEMENT(V,X,N)                                   \
-    (gcc_assert ((X) >= 0 && (X) < VUSE_VECT_NUM_ELEM (V)),            \
+    (gcc_assert (((unsigned int) (X)) < VUSE_VECT_NUM_ELEM (V)),       \
      VUSE_VECT_ELEMENT_NC (V,X) = (N))
 
 #define SET_VUSE_ELEMENT_VAR(V,X,N)                                    \
-    (gcc_assert ((X) >= 0 && (X) < VUSE_VECT_NUM_ELEM (V)),            \
+    (gcc_assert (((unsigned int) (X)) < VUSE_VECT_NUM_ELEM (V)),       \
      VUSE_VECT_ELEMENT_NC ((V),(X)).use_var = (N))
 
 #define SET_VUSE_ELEMENT_PTR(V,X,N)                                    \
-    (gcc_assert ((X) >= 0 && (X) < VUSE_VECT_NUM_ELEM (V)),            \
+    (gcc_assert (((unsigned int) (X)) < VUSE_VECT_NUM_ELEM (V)),       \
      VUSE_ELEMENT_PTR_NC (V, X) = (N))
 #else
 #define VUSE_VECT_ELEMENT(V,X) VUSE_VECT_ELEMENT_NC(V,X)
@@ -203,8 +203,8 @@ typedef struct stmt_operands_d *stmt_operands_p;
 #define PHI_ARG_INDEX_FROM_USE(USE)   phi_arg_index_from_use (USE)
 
 
-extern struct voptype_d *realloc_vdef (struct voptype_d *, int);
-extern struct voptype_d *realloc_vuse (struct voptype_d *, int);
+extern struct voptype_d *realloc_vdef (struct voptype_d *, unsigned int);
+extern struct voptype_d *realloc_vuse (struct voptype_d *, unsigned int);
 
 extern void init_ssa_operands (void);
 extern void fini_ssa_operands (void);
@@ -254,8 +254,8 @@ typedef struct ssa_operand_iterator_d
   int num_phi;
   tree phi_stmt;
   bool done;
-  int vuse_index;
-  int mayuse_index;
+  unsigned int vuse_index;
+  unsigned int mayuse_index;
 } ssa_op_iter;
 
 /* These flags are used to determine which operands are returned during