diff options
author | Jan Hubicka <jh@suse.cz> | 2009-07-20 14:15:02 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2009-07-20 14:15:02 +0200 |
commit | 08ad1d6d82e6531a00d773bc3f24548b98c1f89a (patch) | |
tree | 7ffb62e406ff8a8c4d6703fbbf79fddf2716b7aa /gcc/cgraphunit.c | |
parent | c4023c1903e09ab3f83785b8d38ba9ffd7e295e9 (diff) | |
download | gcc-08ad1d6d82e6531a00d773bc3f24548b98c1f89a.zip gcc-08ad1d6d82e6531a00d773bc3f24548b98c1f89a.tar.gz gcc-08ad1d6d82e6531a00d773bc3f24548b98c1f89a.tar.bz2 |
cgraph.h (combined_args_to_skip): New field.
2009-07-20 Jan Hubicka <jh@suse.cz>
Martin Jambor <mjambor@suse.cz>
* cgraph.h (combined_args_to_skip): New field.
* cgraph.c (cgraph_create_virtual_clone): Properly handle
combined_args_to_skip and args_to_skip.
* tree-inline.c (update_clone_info): New function.
(tree_function_versioning): Call update_clone_info.
* cgraphunit.c: (cgraph_materialize_clone): Dump materialized functions.
(cgraph_materialize_all_clones): More extensive dumping, working
with combined_args_to_skip rather than args_to_skip.
Co-Authored-By: Martin Jambor <mjambor@suse.cz>
From-SVN: r149808
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index d329dc1..eb7de10 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1725,6 +1725,11 @@ cgraph_materialize_clone (struct cgraph_node *node) tree_function_versioning (node->clone_of->decl, node->decl, node->clone.tree_map, true, node->clone.args_to_skip); + if (cgraph_dump_file) + { + dump_function_to_file (node->clone_of->decl, cgraph_dump_file, dump_flags); + dump_function_to_file (node->decl, cgraph_dump_file, dump_flags); + } /* Function is no longer clone. */ if (node->next_sibling_clone) @@ -1770,9 +1775,42 @@ cgraph_materialize_all_clones (void) if (gimple_has_body_p (node->clone_of->decl)) { if (cgraph_dump_file) - fprintf (cgraph_dump_file, " clonning %s to %s", - cgraph_node_name (node->clone_of), - cgraph_node_name (node)); + { + fprintf (cgraph_dump_file, "clonning %s to %s\n", + cgraph_node_name (node->clone_of), + cgraph_node_name (node)); + if (node->clone.tree_map) + { + unsigned int i; + fprintf (cgraph_dump_file, " replace map: "); + for (i = 0; i < VEC_length (ipa_replace_map_p, + node->clone.tree_map); + i++) + { + struct ipa_replace_map *replace_info; + replace_info = VEC_index (ipa_replace_map_p, + node->clone.tree_map, + i); + print_generic_expr (cgraph_dump_file, replace_info->old_tree, 0); + fprintf (cgraph_dump_file, " -> "); + print_generic_expr (cgraph_dump_file, replace_info->new_tree, 0); + fprintf (cgraph_dump_file, "%s%s;", + replace_info->replace_p ? "(replace)":"", + replace_info->ref_p ? "(ref)":""); + } + fprintf (cgraph_dump_file, "\n"); + } + if (node->clone.args_to_skip) + { + fprintf (cgraph_dump_file, " args_to_skip: "); + dump_bitmap (cgraph_dump_file, node->clone.args_to_skip); + } + if (node->clone.args_to_skip) + { + fprintf (cgraph_dump_file, " combined_args_to_skip:"); + dump_bitmap (cgraph_dump_file, node->clone.combined_args_to_skip); + } + } cgraph_materialize_clone (node); } else @@ -1811,9 +1849,9 @@ cgraph_materialize_all_clones (void) print_gimple_stmt (cgraph_dump_file, e->call_stmt, 0, dump_flags); } - if (e->callee->clone.args_to_skip) + if (e->callee->clone.combined_args_to_skip) new_stmt = gimple_call_copy_skip_args (e->call_stmt, - e->callee->clone.args_to_skip); + e->callee->clone.combined_args_to_skip); else new_stmt = e->call_stmt; if (gimple_vdef (new_stmt) |