aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2014-09-24 19:49:16 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2014-09-24 19:49:16 +0200
commit6fe459553452ee75e87959331db336a1152d9451 (patch)
treeb6abdcd3710028720493065617289daeca06dfb8 /gcc
parent083e891e69429f93b958f6c18e2d52f515bae572 (diff)
downloadgcc-6fe459553452ee75e87959331db336a1152d9451.zip
gcc-6fe459553452ee75e87959331db336a1152d9451.tar.gz
gcc-6fe459553452ee75e87959331db336a1152d9451.tar.bz2
ipa-prop.c (ipa_edge_duplication_hook): Update controlled_use_count when duplicating a PASS_THROUGH jump function when...
2014-09-24 Martin Jambor <mjambor@suse.cz> * ipa-prop.c (ipa_edge_duplication_hook): Update controlled_use_count when duplicating a PASS_THROUGH jump function when creating a speculative edge. From-SVN: r215560
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/ipa-prop.c15
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 30f713c..1755c0f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-24 Martin Jambor <mjambor@suse.cz>
+
+ * ipa-prop.c (ipa_edge_duplication_hook): Update controlled_use_count
+ when duplicating a PASS_THROUGH jump function when creating a
+ speculative edge.
+
2014-09-24 Marek Polacek <polacek@redhat.com>
PR c/61405
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index d790e44..9c7aaf7 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -3640,6 +3640,21 @@ ipa_edge_duplication_hook (struct cgraph_edge *src, struct cgraph_edge *dst,
dst_jf->value.constant.rdesc = dst_rdesc;
}
}
+ else if (dst_jf->type == IPA_JF_PASS_THROUGH
+ && src->caller == dst->caller)
+ {
+ struct cgraph_node *inline_root = dst->caller->global.inlined_to
+ ? dst->caller->global.inlined_to : dst->caller;
+ struct ipa_node_params *root_info = IPA_NODE_REF (inline_root);
+ int idx = ipa_get_jf_pass_through_formal_id (dst_jf);
+
+ int c = ipa_get_controlled_uses (root_info, idx);
+ if (c != IPA_UNDESCRIBED_USE)
+ {
+ c++;
+ ipa_set_controlled_uses (root_info, idx, c);
+ }
+ }
}
}