GCC Bugzilla – Attachment 27930 Details for
Bug 54146
Very slow compile with attribute((flatten))
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Do not inline_merge_summary if called via flatten_function
hack_flatten_inline_nomerge.diff (text/plain), 2.32 KB, created by
Steven Bosscher
on 2012-08-03 08:59:29 UTC
(
hide
)
Description:
Do not inline_merge_summary if called via flatten_function
Filename:
MIME Type:
Creator:
Steven Bosscher
Created:
2012-08-03 08:59:29 UTC
Size:
2.32 KB
patch
obsolete
>Index: ipa-inline.c >=================================================================== >--- ipa-inline.c (revision 190017) >+++ ipa-inline.c (working copy) >@@ -1536,12 +1536,12 @@ inline_small_functions (void) > > /* Flatten NODE. Performed both during early inlining and > at IPA inlining time. */ >- >+bool in_flatten = false; > static void > flatten_function (struct cgraph_node *node, bool early) > { > struct cgraph_edge *e; >- >+in_flatten = true; > /* We shouldn't be called recursively when we are being processed. */ > gcc_assert (node->symbol.aux == NULL); > >@@ -1569,6 +1569,7 @@ flatten_function (struct cgraph_node *no > if (!e->inline_failed) > { > flatten_function (callee, early); >+in_flatten = true; > continue; > } > >@@ -1602,14 +1603,17 @@ flatten_function (struct cgraph_node *no > xstrdup (cgraph_node_name (callee)), > xstrdup (cgraph_node_name (e->caller))); > orig_callee = callee; >+ timevar_push (TV_LOCAL_ALLOC); > inline_call (e, true, NULL, NULL); >+ timevar_pop (TV_LOCAL_ALLOC); > if (e->callee != orig_callee) > orig_callee->symbol.aux = (void *) node; > flatten_function (e->callee, early); >+in_flatten = true; > if (e->callee != orig_callee) > orig_callee->symbol.aux = NULL; > } >- >+in_flatten = false; > node->symbol.aux = NULL; > } > >Index: ipa-inline-analysis.c >=================================================================== >--- ipa-inline-analysis.c (revision 190017) >+++ ipa-inline-analysis.c (working copy) >@@ -2612,7 +2612,7 @@ remap_edge_summaries (struct cgraph_edg > > > /* We inlined EDGE. Update summary of the function we inlined into. */ >- >+extern bool in_flatten; > void > inline_merge_summary (struct cgraph_edge *edge) > { >@@ -2682,6 +2682,7 @@ inline_merge_summary (struct cgraph_edge > clause, &toplev_predicate); > info->size = 0; > info->time = 0; >+if (! in_flatten) { > for (i = 0; VEC_iterate (size_time_entry, info->entry, i, e); i++) > info->size += e->size, info->time += e->time; > estimate_calls_size_and_time (to, &info->size, &info->time, >@@ -2691,6 +2692,7 @@ inline_merge_summary (struct cgraph_edge > inline_update_callee_summaries (edge->callee, > inline_edge_summary (edge)->loop_depth); > >+} > /* We do not maintain predicates of inlined edges, free it. */ > edge_set_predicate (edge, &true_p); > /* Similarly remove param summaries. */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 54146
:
27912
|
27915
|
27917
|
27930
|
27946
|
27953
|
27957
|
27979
|
28020
|
28039