From 6d5f1e49af9d7d5b6ba2ba64cdafaee947d8b7d1 Mon Sep 17 00:00:00 2001 From: hubicka Date: Fri, 23 Aug 2013 15:55:22 +0000 Subject: [PATCH] * ipa-utils.h (method_class_type): Declare. * ipa-devirt.c (method_class_type): Export. * cgraphunit.c (analyze_functions): Do basic devirtualization; do not walk base classes of anonymous types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201944 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 3 +++ gcc/ipa-devirt.c | 2 +- gcc/ipa-utils.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 76609fb7416..1f99c1e7322 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2013-08-23 Jan Hubicka + * ipa-utils.h (method_class_type): Declare. + * ipa-devirt.c (method_class_type): Export. + * cgraphunit.c (analyze_functions): Do basic devirtualization; do not walk base classes of anonymous types. diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 4daf6b451d9..0b678bd750d 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -342,7 +342,7 @@ dump_type_inheritance_graph (FILE *f) /* Given method type T, return type of class it belongs to. Lookup this pointer and get its type. */ -static tree +tree method_class_type (tree t) { tree first_parm_type = TREE_VALUE (TYPE_ARG_TYPES (t)); diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index 3c6c93c10a1..427245509b0 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -59,6 +59,7 @@ odr_type get_odr_type (tree, bool insert = false); void dump_possible_polymorphic_call_targets (FILE *, tree, HOST_WIDE_INT); bool possible_polymorphic_call_target_p (tree, HOST_WIDE_INT, struct cgraph_node *n); +tree method_class_type (tree); /* Return vector containing possible targets of polymorphic call E. If FINALP is non-NULL, store true if the list is complette. -- 2.11.4.GIT