summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-01-20 01:31:06 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2007-01-20 01:31:06 +0000
commitb2bcf5577ae6c5bfd2b8f1dc78cba2b0c2607741 (patch)
tree3cfdc7138a1a52acc7fa7a395dffecbf41e0546c /gcc
parent92d966284c9a0eb34f54568e223b40a3c335922c (diff)
downloadgcc-b2bcf5577ae6c5bfd2b8f1dc78cba2b0c2607741.tar.gz
tree-ssa-operands.h (struct vuse_vec_d): Change num_vuse field to unsigned.
* 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. From-SVN: r120994
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog20
-rw-r--r--gcc/tree-ssa-operands.c16
-rw-r--r--gcc/tree-ssa-operands.h22
3 files changed, 39 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5a9e553c6c5..d5eb9aec686 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 0006de92449..44e8707844f 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -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;
diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h
index 92dc4f9dace..363b8586699 100644
--- a/gcc/tree-ssa-operands.h
+++ b/gcc/tree-ssa-operands.h
@@ -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