aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2007-07-07 14:20:58 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2007-07-07 14:20:58 +0000
commitf576d4f94244642668b7c7039d62bc20103ba02b (patch)
tree300825f8b7b7cc294a06cb371039c37d02636791 /gcc
parent0a6b055f652b44bd3ad2e86fd8641564b4910d9a (diff)
downloadgcc-f576d4f94244642668b7c7039d62bc20103ba02b.zip
gcc-f576d4f94244642668b7c7039d62bc20103ba02b.tar.gz
gcc-f576d4f94244642668b7c7039d62bc20103ba02b.tar.bz2
tree-ssa-operands.c (realloc_vop, [...]): Remove.
* tree-ssa-operands.c (realloc_vop, realloc_vdef, realloc_vuse): Remove. * tree-ssa-operands.h: Remove the prototype for realloc_vdef and realloc_vuse. From-SVN: r126442
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-ssa-operands.c93
-rw-r--r--gcc/tree-ssa-operands.h3
3 files changed, 5 insertions, 96 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9167c2b..2328ffa 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 <dberlin@dberlin.org>
Fix PR tree-optimization/23488
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index edd2b90..1e9dde7 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 b3f2cf0..176104d 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);