summaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-16 12:38:04 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-16 12:38:04 +0000
commitfba0273a46f498aefe8ff0774057116549e7de7b (patch)
tree71b7f3809446131bd9d0c013ed500b7b38f3350e /gcc/ipa-prop.c
parentadbb89b1479715eca7ae463b5fbfbcd5da09a404 (diff)
downloadgcc-fba0273a46f498aefe8ff0774057116549e7de7b.tar.gz
* gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Add new
arugment expected_type. (gimple_fold_call): Use it. * gimple.h (gimple_extract_devirt_binfo_from_cst): Update prototype. * ipa-cp.c (ipa_get_indirect_edge_target_1): Update. * ipa-prop.c (ipa_analyze_virtual_call_uses): Use obj_type_ref_class. (try_make_edge_direct_virtual_call): Likewise. * tree.c (obj_type_ref_class): New. * tree.h (obj_type_ref_class): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201789 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r--gcc/ipa-prop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index b06f640b3f8..7cda34637b2 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -1903,7 +1903,7 @@ ipa_analyze_virtual_call_uses (struct cgraph_node *node,
ii = cs->indirect_info;
ii->offset = anc_offset;
ii->otr_token = tree_low_cst (OBJ_TYPE_REF_TOKEN (target), 1);
- ii->otr_type = TREE_TYPE (TREE_TYPE (OBJ_TYPE_REF_OBJECT (target)));
+ ii->otr_type = obj_type_ref_class (target);
ii->polymorphic = 1;
}
@@ -2453,7 +2453,8 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie,
if (TREE_CODE (binfo) != TREE_BINFO)
{
- binfo = gimple_extract_devirt_binfo_from_cst (binfo);
+ binfo = gimple_extract_devirt_binfo_from_cst
+ (binfo, ie->indirect_info->otr_type);
if (!binfo)
return NULL;
}