Hi, while profiling Mozilla build I noticed that I inadvertly broke the optimization of lazily updating priority queue. This patch restores the behaviour and gets inliner down to 30s. (out of 10 minutes build)
bootstrapped/regtested x86_64 & comitted. Honza Index: ChangeLog =================================================================== --- ChangeLog (revision 173531) +++ ChangeLog (working copy) @@ -1,5 +1,9 @@ 2011-05-06 Jan Hubicka <j...@suse.cz> + * ipa-inline.c (update_callee_keys): Don't reset node growth cache. + +2011-05-06 Jan Hubicka <j...@suse.cz> + * cgraph.c (cgraph_add_thunk): Create real function node instead of alias node; finalize it and mark needed/reachale; arrange visibility to be right and add it into the corresponding same comdat group list. Index: ipa-inline.c =================================================================== --- ipa-inline.c (revision 173531) +++ ipa-inline.c (working copy) @@ -957,9 +957,9 @@ update_callee_keys (fibheap_t heap, stru e = e->callee->callees; else { - /* We inlined and thus callees might have different number of calls. - Reset their caches */ - reset_node_growth_cache (e->callee); + /* We do not reset callee growth cache here. Since we added a new call, + growth chould have just increased and consequentely badness metric + don't need updating. */ if (e->inline_failed && inline_summary (e->callee)->inlinable && cgraph_function_body_availability (e->callee) >= AVAIL_AVAILABLE