summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-analysis.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-03 08:23:55 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-03 08:23:55 +0000
commit09ab63351cc3021827f9d1ac7b3f7da7715b6684 (patch)
tree6893c12531b17830080c226b0ab4329896a5a588 /gcc/ipa-inline-analysis.c
parent62cf2cfdcba701f61e185abfcd19a39a95db893a (diff)
downloadgcc-09ab63351cc3021827f9d1ac7b3f7da7715b6684.tar.gz
* ipa-cp.c (gather_context_independent_values): Use ipa_get_param_move_cost.
(get_replacement_map): Remove PARAM; move parameter folding into tree-inline.c (create_specialized_node): Update. * ipa-prop.c (ipa_populate_param_decls): Do not look for origins; assert that we have gimple body; update move_cost. (count_formal_params): Assert that we have gimple body. (ipa_dump_param): New function. (ipa_alloc_node_params): Break out from ... (ipa_initialize_node_params): ... here. (ipa_get_vector_of_formal_parms): ICE when used in WPA. (ipa_write_node_info): Stream move costs. (ipa_read_node_info): Read move costs. (ipa_update_after_lto_read): Do not recompute node params. * ipa-prop.h (ipa_param_descriptor): Add move_cost. (ipa_get_param): Check we are not in WPA. (ipa_get_param_move_cost): New. * tree-inline.c (tree_function_versioning): Fold replacement as needed. * ipa-inline-analysis.c (inline_node_duplication_hook): Expect only parm numbers to be present. * gcc.dg/ipa/ipa-1.c: Update. * gcc.dg/ipa/ipa-2.c: Update. * gcc.dg/ipa/ipa-3.c: Update. * gcc.dg/ipa/ipa-4.c: Update. * gcc.dg/ipa/ipa-5.c: Update. * gcc.dg/ipa/ipa-7.c: Update. * gcc.dg/ipa/ipa-8.c: Update. * gcc.dg/ipa/ipcp-1.c: Update. * gcc.dg/ipa/ipcp-2.c: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201462 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r--gcc/ipa-inline-analysis.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 9a3629285fb..518d3b99ba9 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -1101,12 +1101,13 @@ inline_node_duplication_hook (struct cgraph_node *src,
known_vals.safe_grow_cleared (count);
for (i = 0; i < count; i++)
{
- tree t = ipa_get_param (parms_info, i);
struct ipa_replace_map *r;
for (j = 0; vec_safe_iterate (dst->clone.tree_map, j, &r); j++)
{
- if (r->old_tree == t && r->replace_p && !r->ref_p)
+ if (((!r->old_tree && r->parm_num == i)
+ || (r->old_tree && r->old_tree == ipa_get_param (parms_info, i)))
+ && r->replace_p && !r->ref_p)
{
known_vals[i] = r->new_tree;
break;