summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-analysis.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2012-08-31 15:13:03 +0200
committerMartin Jambor <jamborm@gcc.gnu.org>2012-08-31 15:13:03 +0200
commit172e74fa37372711b121792b3405b32c862cf171 (patch)
tree11419ed71064e5fbaf382f6ad4d7be597d993f46 /gcc/ipa-inline-analysis.c
parent2c905502202e55fc91c2a2c9a94c3ef286f52f73 (diff)
downloadgcc-172e74fa37372711b121792b3405b32c862cf171.tar.gz
re PR middle-end/54394 (fatigue2 -flto run time regression)
2012-08-31 Martin Jambor <mjambor@suse.cz> PR middle-end/54394 * ipa-inline-analysis.c (estimate_function_body_sizes): Compute dominance info and loops whenever optimizing. From-SVN: r190831
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r--gcc/ipa-inline-analysis.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index ca80a8b88ba..a3f0a8eccf9 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -2102,6 +2102,11 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early)
info->conds = 0;
info->entry = 0;
+ if (optimize && !early)
+ {
+ calculate_dominance_info (CDI_DOMINATORS);
+ loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS);
+ }
if (dump_file)
fprintf (dump_file, "\nAnalyzing function body size: %s\n",
@@ -2270,9 +2275,6 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early)
loop_iterator li;
predicate loop_iterations = true_predicate ();
- calculate_dominance_info (CDI_DOMINATORS);
- loop_optimizer_init (LOOPS_NORMAL
- | LOOPS_HAVE_RECORDED_EXITS);
if (dump_file && (dump_flags & TDF_DETAILS))
flow_loops_dump (dump_file, NULL, 0);
scev_initialize ();
@@ -2305,12 +2307,15 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early)
*inline_summary (node)->loop_iterations = loop_iterations;
}
scev_finalize ();
- loop_optimizer_finalize ();
- free_dominance_info (CDI_DOMINATORS);
}
inline_summary (node)->self_time = time;
inline_summary (node)->self_size = size;
VEC_free (predicate_t, heap, nonconstant_names);
+ if (optimize && !early)
+ {
+ loop_optimizer_finalize ();
+ free_dominance_info (CDI_DOMINATORS);
+ }
if (dump_file)
{
fprintf (dump_file, "\n");