PR tree-optimization/24888 (inliner heuristic speedup)

Jan Hubicka jh@suse.cz
Sun Jul 23 03:08:00 GMT 2006


Hi,
this patch speeds up the inliner heuristics noticably for PR28071 by prunning out
the edges early.  It also reduces the dump file from over 2GB to few hounderd K's.
Further speedups are in testing queue ;)

Bootstrapped/regtested ppc-linux, will commit it tomorrow if there are no complains.

Honza

2006-07-23  Jan Hubicka  <jh@suse.cz>
	PR rtl-optimization/28071
	* ipa-inline.c (update_caller_keys): Remove edges that are no longer
	inline candidates.
Index: ipa-inline.c
===================================================================
*** ipa-inline.c	(revision 115645)
--- ipa-inline.c	(working copy)
*************** update_caller_keys (fibheap_t heap, stru
*** 413,418 ****
--- 413,419 ----
  		    bitmap updated_nodes)
  {
    struct cgraph_edge *edge;
+   const char *failed_reason;
  
    if (!node->local.inlinable || node->local.disregard_inline_limits
        || node->global.inlined_to)
*************** update_caller_keys (fibheap_t heap, stru
*** 421,426 ****
--- 422,441 ----
      return;
    bitmap_set_bit (updated_nodes, node->uid);
    node->global.estimated_growth = INT_MIN;
+ 
+   if (!node->local.inlinable)
+     return;
+   /* Prune out edges we won't inline into anymore.  */
+   if (!cgraph_default_inline_p (node, &failed_reason))
+     {
+       for (edge = node->callers; edge; edge = edge->next_caller)
+ 	if (edge->aux)
+ 	  {
+ 	    fibheap_delete_node (heap, edge->aux);
+ 	    edge->aux = NULL;
+ 	  }
+       return;
+     }
  
    for (edge = node->callers; edge; edge = edge->next_caller)
      if (edge->inline_failed)



More information about the Gcc-patches mailing list