aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.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/cgraphunit.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/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 80f26fa..030f868 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1575,7 +1575,8 @@ update_call_expr (struct cgraph_node *new_version)
static struct cgraph_node *
cgraph_copy_node_for_versioning (struct cgraph_node *old_version,
- tree new_decl, varray_type redirect_callers)
+ tree new_decl,
+ VEC(cgraph_edge_p,heap) *redirect_callers)
{
struct cgraph_node *new_version;
struct cgraph_edge *e, *new_e;
@@ -1614,14 +1615,12 @@ cgraph_copy_node_for_versioning (struct cgraph_node *old_version,
if (!next_callee)
break;
}
- if (redirect_callers)
- for (i = 0; i < VARRAY_ACTIVE_SIZE (redirect_callers); i++)
- {
- e = VARRAY_GENERIC_PTR (redirect_callers, i);
- /* Redirect calls to the old version node
- to point to it's new version. */
- cgraph_redirect_edge_callee (e, new_version);
- }
+ for (i = 0; VEC_iterate (cgraph_edge_p, redirect_callers, i, e); i++)
+ {
+ /* Redirect calls to the old version node to point to its new
+ version. */
+ cgraph_redirect_edge_callee (e, new_version);
+ }
return new_version;
}
@@ -1641,7 +1640,7 @@ cgraph_copy_node_for_versioning (struct cgraph_node *old_version,
struct cgraph_node *
cgraph_function_versioning (struct cgraph_node *old_version_node,
- varray_type redirect_callers,
+ VEC(cgraph_edge_p,heap) *redirect_callers,
varray_type tree_map)
{
tree old_decl = old_version_node->decl;