diff options
author | Jan Hubicka <jh@suse.cz> | 2013-08-06 18:59:49 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-08-06 16:59:49 +0000 |
commit | a2e2a66815796bd961250264ff32809bae478a31 (patch) | |
tree | e06c2e69d4ad72b54dff08acfb5ac74d389b8f74 /gcc/cgraphclones.c | |
parent | e086adbdb433ea655c8bf0bdcd210baa5a0a63f6 (diff) | |
download | gcc-a2e2a66815796bd961250264ff32809bae478a31.zip gcc-a2e2a66815796bd961250264ff32809bae478a31.tar.gz gcc-a2e2a66815796bd961250264ff32809bae478a31.tar.bz2 |
cgraph.c (cgraph_get_body): New function based on lto.c implementation.
* cgraph.c (cgraph_get_body): New function based on lto.c
implementation.
* cgraph.h (cgraph_get_body): Declare.
* cgraphclones.c (cgraph_create_virtual_clone): Commonize WPA and LTO paths.
* cgraphunit.c (expand_function): Get body prior expanding.
* ipa.c (function_and_variable_visibility): Use gimple_has_body_p test.
* lto-cgraph.c (lto_output_node): Do not stream bodies we don't really need.
* passes.c (do_per_function_toporder): Get body.
* tree-inline.c (expand_call_inline): Get body prior inlining it.
* tree-ssa-structalias.c (ipa_pta_execute): Get body; skip clones.
* lto.c (lto_materialize_function): Do not read body anymore.
From-SVN: r201537
Diffstat (limited to 'gcc/cgraphclones.c')
-rw-r--r-- | gcc/cgraphclones.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c index 04cb990..21ef1f5 100644 --- a/gcc/cgraphclones.c +++ b/gcc/cgraphclones.c @@ -295,7 +295,7 @@ cgraph_create_virtual_clone (struct cgraph_node *old_node, size_t i; struct ipa_replace_map *map; - if (!flag_wpa) + if (!in_lto_p) gcc_checking_assert (tree_versionable_function_p (old_decl)); gcc_assert (old_node->local.can_change_signature || !args_to_skip); @@ -829,6 +829,8 @@ cgraph_materialize_all_clones (void) if (node->clone_of && node->symbol.decl != node->clone_of->symbol.decl && !gimple_has_body_p (node->symbol.decl)) { + if (!node->clone_of->clone_of) + cgraph_get_body (node->clone_of); if (gimple_has_body_p (node->clone_of->symbol.decl)) { if (cgraph_dump_file) |