diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9167c2bf739..2328ffa6829 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -11,6 +11,11 @@ * cfgrtl.c (delete_insn_chain_and_edges): Remove. * rtl.h: Remove the prototype for delete_insn_chain_and_edges. + * tree-ssa-operands.c (realloc_vop, realloc_vdef, + realloc_vuse): Remove. + * tree-ssa-operands.h: Remove the prototype for realloc_vdef + and realloc_vuse. + 2007-07-06 Daniel Berlin Fix PR tree-optimization/23488 diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index edd2b902188..1e9dde7e327 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -669,99 +669,6 @@ add_vdef_op (tree stmt, tree op, int num, voptype_p last) } -/* Reallocate the virtual operand PTR so that it has NUM_ELEM use slots. ROOT - is the head of the operand list it belongs to. */ - -static inline struct voptype_d * -realloc_vop (struct voptype_d *ptr, unsigned int num_elem, - struct voptype_d **root) -{ - unsigned int x, lim; - tree stmt, val; - struct voptype_d *ret, *tmp; - - if (VUSE_VECT_NUM_ELEM (ptr->usev) == num_elem) - return ptr; - - val = VUSE_OP (ptr, 0); - if (TREE_CODE (val) == SSA_NAME) - val = SSA_NAME_VAR (val); - - stmt = USE_STMT (VUSE_OP_PTR (ptr, 0)); - - /* Delink all the existing uses. */ - for (x = 0; x < VUSE_VECT_NUM_ELEM (ptr->usev); x++) - { - use_operand_p use_p = VUSE_OP_PTR (ptr, x); - delink_imm_use (use_p); - } - - /* If we want less space, simply use this one, and shrink the size. */ - if (VUSE_VECT_NUM_ELEM (ptr->usev) > num_elem) - { - VUSE_VECT_NUM_ELEM (ptr->usev) = num_elem; - return ptr; - } - - /* It is growing. Allocate a new one and replace the old one. */ - ret = add_vuse_op (stmt, val, num_elem, ptr); - - /* Clear PTR and add its memory to the free list. */ - lim = VUSE_VECT_NUM_ELEM (ptr->usev); - memset (ptr, 0, - sizeof (struct voptype_d) + sizeof (vuse_element_t) * (lim- 1)); - add_vop_to_freelist (ptr); - - /* Now simply remove the old one. */ - if (*root == ptr) - { - *root = ret; - return ret; - } - else - for (tmp = *root; - tmp != NULL && tmp->next != ptr; - tmp = tmp->next) - { - tmp->next = ret; - return ret; - } - - /* The pointer passed in isn't in STMT's VDEF lists. */ - gcc_unreachable (); -} - - -/* Reallocate the PTR vdef so that it has NUM_ELEM use slots. */ - -struct voptype_d * -realloc_vdef (struct voptype_d *ptr, unsigned int num_elem) -{ - tree val, stmt; - struct voptype_d *ret; - - val = VDEF_RESULT (ptr); - stmt = USE_STMT (VDEF_OP_PTR (ptr, 0)); - ret = realloc_vop (ptr, num_elem, &(VDEF_OPS (stmt))); - VDEF_RESULT (ret) = val; - return ret; -} - - -/* Reallocate the PTR vuse so that it has NUM_ELEM use slots. */ - -struct voptype_d * -realloc_vuse (struct voptype_d *ptr, unsigned int num_elem) -{ - tree stmt; - struct voptype_d *ret; - - stmt = USE_STMT (VUSE_OP_PTR (ptr, 0)); - ret = realloc_vop (ptr, num_elem, &(VUSE_OPS (stmt))); - return ret; -} - - /* Takes elements from build_defs and turns them into def operands of STMT. TODO -- Make build_defs VEC of tree *. */ diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h index b3f2cf05c44..176104d0ef0 100644 --- a/gcc/tree-ssa-operands.h +++ b/gcc/tree-ssa-operands.h @@ -203,9 +203,6 @@ 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 *, 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); extern void free_ssa_operands (stmt_operands_p);