aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2006-04-17 12:45:25 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2006-04-17 12:45:25 +0000
commitb2c0ad4071b5dfd05cc8ca0ac8c6aa1aee9c9d54 (patch)
tree735700184cbda1adba2eb633a9a335a4aba8db10 /gcc/ipa-cp.c
parent1a5640b4e146e0a991b2172ccac9f0ae99e84ab5 (diff)
downloadgcc-b2c0ad4071b5dfd05cc8ca0ac8c6aa1aee9c9d54.zip
gcc-b2c0ad4071b5dfd05cc8ca0ac8c6aa1aee9c9d54.tar.gz
gcc-b2c0ad4071b5dfd05cc8ca0ac8c6aa1aee9c9d54.tar.bz2
cgraph.h (cgraph_edge_p): New.
* cgraph.h (cgraph_edge_p): New. Update the prototype of cgraph_function_versioning. * cgraphunit.c (cgraph_copy_node_for_versioning, cgraph_function_versioning): Use VEC instead of VARRAY. * ipa-cp.c (ipcp_insert_stage): Likewise. From-SVN: r113006
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 898d95e..3837bfdc9 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -1005,7 +1005,8 @@ ipcp_insert_stage (void)
struct cgraph_node *node, *node1 = NULL;
int i, const_param;
union parameter_info *cvalue;
- varray_type redirect_callers, replace_trees;
+ VEC(cgraph_edge_p,heap) *redirect_callers;
+ varray_type replace_trees;
struct cgraph_edge *cs;
int node_callers, count;
tree parm_tree;
@@ -1045,15 +1046,14 @@ ipcp_insert_stage (void)
node_callers = 0;
for (cs = node->callers; cs != NULL; cs = cs->next_caller)
node_callers++;
- VARRAY_GENERIC_PTR_INIT (redirect_callers, node_callers,
- "redirect_callers");
+ redirect_callers = VEC_alloc (cgraph_edge_p, heap, node_callers);
for (cs = node->callers; cs != NULL; cs = cs->next_caller)
- VARRAY_PUSH_GENERIC_PTR (redirect_callers, cs);
+ VEC_quick_push (cgraph_edge_p, redirect_callers, cs);
/* Redirecting all the callers of the node to the
new versioned node. */
node1 =
cgraph_function_versioning (node, redirect_callers, replace_trees);
- VARRAY_CLEAR (redirect_callers);
+ VEC_free (cgraph_edge_p, heap, redirect_callers);
VARRAY_CLEAR (replace_trees);
if (node1 == NULL)
continue;