public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6527] tree-optimization/103990 - fix CFG cleanup regression from PRE change
@ 2022-01-12 15:18 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2022-01-12 15:18 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:2f62294dec1f3af59dd7505c058b0af38c2d1524
commit r12-6527-g2f62294dec1f3af59dd7505c058b0af38c2d1524
Author: Richard Biener <rguenther@suse.de>
Date: Wed Jan 12 15:25:07 2022 +0100
tree-optimization/103990 - fix CFG cleanup regression from PRE change
This adjusts the CFG cleanup flow back to what it was before the
last change which fixes the observed regression of 541.leela_r with
LTO and FDO.
2022-01-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/103990
* tree-pass.h (tail_merge_optimize): Drop unused argument.
* tree-ssa-tail-merge.c (tail_merge_optimize): Likewise.
* tree-ssa-pre.c (pass_pre::execute): Retain TODO_cleanup_cfg
and adjust call to tail_merge_optimize.
Diff:
---
gcc/tree-pass.h | 2 +-
gcc/tree-ssa-pre.c | 6 ++----
gcc/tree-ssa-tail-merge.c | 4 ++--
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index 36097cf2736..606d1d60b85 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -412,7 +412,7 @@ extern gimple_opt_pass *make_pass_early_thread_jumps (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_split_crit_edges (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_laddress (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_pre (gcc::context *ctxt);
-extern unsigned int tail_merge_optimize (unsigned int, bool);
+extern unsigned int tail_merge_optimize (bool);
extern gimple_opt_pass *make_pass_profile (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_strip_predict_hints (gcc::context *ctxt);
extern gimple_opt_pass *make_pass_lower_complex_O0 (gcc::context *ctxt);
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index ab24fa98a1f..5113256802e 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -4442,7 +4442,6 @@ pass_pre::execute (function *fun)
if (todo & TODO_cleanup_cfg)
{
cleanup_tree_cfg ();
- todo &= ~TODO_cleanup_cfg;
need_crit_edge_split = true;
}
@@ -4458,9 +4457,8 @@ pass_pre::execute (function *fun)
It should either:
- call merge_blocks after each tail merge iteration
- call merge_blocks after all tail merge iterations
- - mark TODO_cleanup_cfg when necessary
- - share the cfg cleanup with fini_pre. */
- todo |= tail_merge_optimize (todo, need_crit_edge_split);
+ - mark TODO_cleanup_cfg when necessary. */
+ todo |= tail_merge_optimize (need_crit_edge_split);
free_rpo_vn ();
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c
index fd333800f0f..8e1ea1a982e 100644
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -1724,7 +1724,7 @@ update_debug_stmts (void)
/* Runs tail merge optimization. */
unsigned int
-tail_merge_optimize (unsigned int todo, bool need_crit_edge_split)
+tail_merge_optimize (bool need_crit_edge_split)
{
int nr_bbs_removed_total = 0;
int nr_bbs_removed;
@@ -1814,5 +1814,5 @@ tail_merge_optimize (unsigned int todo, bool need_crit_edge_split)
timevar_pop (TV_TREE_TAIL_MERGE);
- return todo;
+ return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-12 15:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 15:18 [gcc r12-6527] tree-optimization/103990 - fix CFG cleanup regression from PRE change Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).