From 01496707301d09bfb32d03e7cbabef0d7ee032d7 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Thu, 12 Apr 2018 18:40:44 +0300 Subject: [PATCH] sel-sched: move cleanup_cfg before calculate_dominance_info (PR 85354) PR rtl-optimization/85354 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call... * sel-sched.c (sel_global_init): ... here. From-SVN: r259348 --- gcc/ChangeLog | 6 ++++++ gcc/sel-sched-ir.c | 4 ---- gcc/sel-sched.c | 5 +++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 25bcfa9..0839ab2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-04-12 Alexander Monakov + + PR rtl-optimization/85354 + * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call... + * sel-sched.c (sel_global_init): ... here. + 2018-04-12 Eric Botcazou PR target/85238 diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c index 50a7daa..ee97052 100644 --- a/gcc/sel-sched-ir.c +++ b/gcc/sel-sched-ir.c @@ -30,7 +30,6 @@ along with GCC; see the file COPYING3. If not see #include "cfgrtl.h" #include "cfganal.h" #include "cfgbuild.h" -#include "cfgcleanup.h" #include "insn-config.h" #include "insn-attr.h" #include "recog.h" @@ -6122,9 +6121,6 @@ make_regions_from_loop_nest (struct loop *loop) void sel_init_pipelining (void) { - /* Remove empty blocks: their presence can break assumptions elsewhere, - e.g. the logic to invoke update_liveness_on_insn in sel_region_init. */ - cleanup_cfg (0); /* Collect loop information to be used in outer loops pipelining. */ loop_optimizer_init (LOOPS_HAVE_PREHEADERS | LOOPS_HAVE_FALLTHRU_PREHEADERS diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c index cd29df3..5976296 100644 --- a/gcc/sel-sched.c +++ b/gcc/sel-sched.c @@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see #include "tm_p.h" #include "regs.h" #include "cfgbuild.h" +#include "cfgcleanup.h" #include "insn-config.h" #include "insn-attr.h" #include "params.h" @@ -7661,6 +7662,10 @@ sel_sched_region (int rgn) static void sel_global_init (void) { + /* Remove empty blocks: their presence can break assumptions elsewhere, + e.g. the logic to invoke update_liveness_on_insn in sel_region_init. */ + cleanup_cfg (0); + calculate_dominance_info (CDI_DOMINATORS); alloc_sched_pools (); -- 2.7.4