aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-prop.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2013-08-16 14:38:04 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2013-08-16 12:38:04 +0000
commitc49bdb2ee934ab6efddbf9284cba5c76f6f3dd28 (patch)
tree71b7f3809446131bd9d0c013ed500b7b38f3350e /gcc/ipa-prop.c
parent4042dca916ad7f5a99438e37416d4fed2209cc6d (diff)
downloadgcc-c49bdb2ee934ab6efddbf9284cba5c76f6f3dd28.zip
gcc-c49bdb2ee934ab6efddbf9284cba5c76f6f3dd28.tar.gz
gcc-c49bdb2ee934ab6efddbf9284cba5c76f6f3dd28.tar.bz2
gimple-fold.c (gimple_extract_devirt_binfo_from_cst): Add new arugment expected_type.
* 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. From-SVN: r201789
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 b06f640..7cda346 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;
}