Patchwork Type inheritance graph analysis & speculative devirtualization, part 4a/6 simple anonymous namespace devirtualization during cgraph construction

login
register
mail settings
Submitter Jan Hubicka
Date Aug. 23, 2013, 3:56 p.m.
Message ID <20130823155606.GA12817@kam.mff.cuni.cz>
Download mbox | patch
Permalink /patch/269485/
State New
Headers show

Comments

Jan Hubicka - Aug. 23, 2013, 3:56 p.m.
> Jan,
> 
> This has broken all builds because method_type_class() is defined.

Oops, sorry for that.  I happened to make partial diff only.
This patch adds the missing bit.

Honza

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 201943)
+++ ChangeLog	(working copy)
@@ -1,5 +1,8 @@ 
 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;
 	do not walk base classes of anonymous types.
 
Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c	(revision 201919)
+++ ipa-devirt.c	(working copy)
@@ -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));
Index: ipa-utils.h
===================================================================
--- ipa-utils.h	(revision 201919)
+++ ipa-utils.h	(working copy)
@@ -59,6 +59,7 @@  odr_type get_odr_type (tree, bool insert
 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.