Commit 64cbf23d by Jan Hubicka Committed by Jan Hubicka

ipa-utils.h (method_class_type): Declare.


	* 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.

From-SVN: r201944
parent c4be6568
2013-08-23 Jan Hubicka <jh@suse.cz> 2013-08-23 Jan Hubicka <jh@suse.cz>
* ipa-utils.h (method_class_type): Declare.
* ipa-devirt.c (method_class_type): Export.
* cgraphunit.c (analyze_functions): Do basic devirtualization; * cgraphunit.c (analyze_functions): Do basic devirtualization;
do not walk base classes of anonymous types. do not walk base classes of anonymous types.
......
...@@ -342,7 +342,7 @@ dump_type_inheritance_graph (FILE *f) ...@@ -342,7 +342,7 @@ dump_type_inheritance_graph (FILE *f)
/* Given method type T, return type of class it belongs to. /* Given method type T, return type of class it belongs to.
Lookup this pointer and get its type. */ Lookup this pointer and get its type. */
static tree tree
method_class_type (tree t) method_class_type (tree t)
{ {
tree first_parm_type = TREE_VALUE (TYPE_ARG_TYPES (t)); tree first_parm_type = TREE_VALUE (TYPE_ARG_TYPES (t));
......
...@@ -59,6 +59,7 @@ odr_type get_odr_type (tree, bool insert = false); ...@@ -59,6 +59,7 @@ odr_type get_odr_type (tree, bool insert = false);
void dump_possible_polymorphic_call_targets (FILE *, tree, HOST_WIDE_INT); void dump_possible_polymorphic_call_targets (FILE *, tree, HOST_WIDE_INT);
bool possible_polymorphic_call_target_p (tree, HOST_WIDE_INT, bool possible_polymorphic_call_target_p (tree, HOST_WIDE_INT,
struct cgraph_node *n); struct cgraph_node *n);
tree method_class_type (tree);
/* Return vector containing possible targets of polymorphic call E. /* Return vector containing possible targets of polymorphic call E.
If FINALP is non-NULL, store true if the list is complette. If FINALP is non-NULL, store true if the list is complette.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment