aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphclones.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-07-25 19:10:21 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2013-07-25 17:10:21 +0000
commit49bde17554926a2352b7f1df98d4e02becc1e065 (patch)
tree8d52c0e27c62a558679ffa973f3a0c348cef4b41 /gcc/cgraphclones.c
parent4870352d35468211accf8c293bf756eac99bc1e7 (diff)
downloadgcc-49bde17554926a2352b7f1df98d4e02becc1e065.zip
gcc-49bde17554926a2352b7f1df98d4e02becc1e065.tar.gz
gcc-49bde17554926a2352b7f1df98d4e02becc1e065.tar.bz2
cgraph.c (release_function_body): Break out from ...
* cgraph.c (release_function_body): Break out from ... (cgraph_release_function_body): ... this one; also release DECL_RESULT and DECL_ARGUMENTS. * ipa-cp.c (get_replacement_map): Add parm_num argument; do not set old_tree in the map. (create_specialized_node): Update. * lto-cgraph.c (output_node_opt_summary): Do not translate old_tree into index. * cgraphclones.c (cgraph_create_virtual_clone): Do not copy DECL_ARGUMENTS, DECL_INITIAL and DECL_RESULT. * ipa-prop.c (ipa_populate_param_decls): Look for origin of clones. * tree-inline.c (initialize_cfun): Initialize DECL_ARGUMENTS and DECL_RESULT. From-SVN: r201251
Diffstat (limited to 'gcc/cgraphclones.c')
-rw-r--r--gcc/cgraphclones.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
index 5c328b7..04cb990 100644
--- a/gcc/cgraphclones.c
+++ b/gcc/cgraphclones.c
@@ -305,7 +305,16 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node,
new_decl = copy_node (old_decl);
else
new_decl = build_function_decl_skip_args (old_decl, args_to_skip, false);
+
+ /* These pointers represent function body and will be populated only when clone
+ is materialized. */
+ gcc_assert (new_decl != old_decl);
DECL_STRUCT_FUNCTION (new_decl) = NULL;
+ DECL_ARGUMENTS (new_decl) = NULL;
+ DECL_INITIAL (new_decl) = NULL;
+ DECL_RESULT (new_decl) = NULL;
+ /* We can not do DECL_RESULT (new_decl) = NULL; here because of LTO partitioning
+ sometimes storing only clone decl instead of original. */
/* Generate a new name for the new version. */
DECL_NAME (new_decl) = clone_function_name (old_decl, suffix);