diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-01 18:46:14 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-02-01 18:46:14 +0000 |
commit | 96bf18ea182923f654d988534dacacff1634c1fe (patch) | |
tree | 99b37d236d334e345cdd58b1ddbbbb3bc84bb45c /gcc/ipa-utils.c | |
parent | 54497144084900bf13c9d3ef03a292d24c97fc69 (diff) | |
download | gcc-96bf18ea182923f654d988534dacacff1634c1fe.tar.gz |
PR ipa/64872
* ipa-utils.c (ipa_merge_profiles): Add release argument.
* ipa-icf.c (sem_function::merge): Do not release body when merging.
* ipa-utils.h (ipa_merge_profiles): Update prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220329 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-utils.c')
-rw-r--r-- | gcc/ipa-utils.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c index a8bb42d4263..076d71dd0d9 100644 --- a/gcc/ipa-utils.c +++ b/gcc/ipa-utils.c @@ -407,11 +407,13 @@ get_base_var (tree t) /* SRC and DST are going to be merged. Take SRC's profile and merge it into - DST so it is not going to be lost. Destroy SRC's body on the way. */ + DST so it is not going to be lost. Possibly destroy SRC's body on the way + unless PRESERVE_BODY is set. */ void ipa_merge_profiles (struct cgraph_node *dst, - struct cgraph_node *src) + struct cgraph_node *src, + bool preserve_body) { tree oldsrcdecl = src->decl; struct function *srccfun, *dstcfun; @@ -652,7 +654,8 @@ ipa_merge_profiles (struct cgraph_node *dst, e->frequency = freq; } } - src->release_body (); + if (!preserve_body) + src->release_body (); inline_update_overall_summary (dst); } /* TODO: if there is no match, we can scale up. */ |