summaryrefslogtreecommitdiff
path: root/gcc/ipa-cp.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-18 09:22:42 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2013-08-18 09:22:42 +0000
commitf5e35fedc7811592de814876a85a548cb2f22934 (patch)
treee1a133f48c521b91466f3bcd74ce9eba66d5faa6 /gcc/ipa-cp.c
parent89f4f2554ec0d99b9c6828757ba949c08e2b209a (diff)
downloadgcc-f5e35fedc7811592de814876a85a548cb2f22934.tar.gz
* cgraph.c (cgraph_create_indirect_edge): Discover
polymorphic calls and record basic info into indirect_info. * gimple-fold.c (gimple_fold_call): When doing BINFO based devirtualization, ignore objc function calls. * ipa-cp.c (initialize_node_lattices): Be ready for polymorphic call with no parm index info. * ipa-prop.c (ipa_analyze_call_uses): Likewise. * tree.c (virtual_method_call_p): New function. * tree.h (virtual_method_call_p): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201824 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r--gcc/ipa-cp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 312672cc49f..93934e20de8 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -734,7 +734,8 @@ initialize_node_lattices (struct cgraph_node *node)
}
for (ie = node->indirect_calls; ie; ie = ie->next_callee)
- if (ie->indirect_info->polymorphic)
+ if (ie->indirect_info->polymorphic
+ && ie->indirect_info->param_index >= 0)
{
gcc_checking_assert (ie->indirect_info->param_index >= 0);
ipa_get_parm_lattices (info,