aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-split.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-06-28 02:10:34 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-06-28 00:10:34 +0000
commitd402c33dc1fa4ea0a9f133efdc18ae43b4b4c916 (patch)
tree6ab1c2265180e9232911690d3ba0715ff2be32d0 /gcc/ipa-split.c
parente7041633a5b9ac8eb09b92de5321bf3184a7b98f (diff)
downloadgcc-d402c33dc1fa4ea0a9f133efdc18ae43b4b4c916.zip
gcc-d402c33dc1fa4ea0a9f133efdc18ae43b4b4c916.tar.gz
gcc-d402c33dc1fa4ea0a9f133efdc18ae43b4b4c916.tar.bz2
re PR middle-end/44671 (Partial inlining breaks C++)
PR middle-end/44671 PR middle-end/44686 * tree.c (build_function_decl_skip_args): Clear DECL_BUILT_IN on signature change. * ipa-split.c (split_function): Always clear DECL_BUILT_IN. * ipa-prop.c (ipa_modify_formal_parameters): Likewise. * gcc.c-torture/pr44686.c: New file. From-SVN: r161476
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r--gcc/ipa-split.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 1216b0f..ccc89c4 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -277,7 +277,7 @@ consider_split (struct split_point *current, bitmap non_ssa_vars,
}
/* FIXME: we currently can pass only SSA function parameters to the split
- arguments. Once parm_adjustment infrastructure is supported by clonning,
+ arguments. Once parm_adjustment infrastructure is supported by cloning,
we can pass more than that. */
if (num_args != bitmap_count_bits (current->ssa_names_to_pass))
{
@@ -843,6 +843,14 @@ split_function (struct split_point *split_point)
args_to_skip,
split_point->split_bbs,
split_point->entry_bb, "_part");
+ /* For usual cloning it is enough to clear builtin only when signature
+ changes. For partial inlining we however can not expect the part
+ of builtin implementation to have same semantic as the whole. */
+ if (DECL_BUILT_IN (node->decl))
+ {
+ DECL_BUILT_IN_CLASS (node->decl) = NOT_BUILT_IN;
+ DECL_FUNCTION_CODE (node->decl) = (enum built_in_function) 0;
+ }
cgraph_node_remove_callees (cgraph_node (current_function_decl));
if (!split_part_return_p)
TREE_THIS_VOLATILE (node->decl) = 1;