diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-04-29 21:44:26 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-04-29 21:44:26 +0000 |
commit | 2a34bece475923eef33afd72384e6b1072f1b671 (patch) | |
tree | 0d37201627a351956722dc5abe40feb166b90596 /gcc/cfgrtl.c | |
parent | 5dc7911e0667bee8c5f2ec88327bc41605d2293e (diff) | |
download | gcc-2a34bece475923eef33afd72384e6b1072f1b671.zip gcc-2a34bece475923eef33afd72384e6b1072f1b671.tar.gz gcc-2a34bece475923eef33afd72384e6b1072f1b671.tar.bz2 |
re PR rtl-optimization/39938 (build broke for cris-elf with dbr_schedule change)
PR rtl-optimization/39938
* Makefile.in (cfgrtl.o): Add $(INSN_ATTR_H).
* cfgrtl.c: Include insn-attr.h.
(rest_of_pass_free_cfg): New function.
(pass_free_cfg): Use rest_of_pass_free_cfg as execute function.
* resource.c (init_resource_info): Remove call to df_analyze.
Co-Authored-By: Steven Bosscher <steven@gcc.gnu.org>
From-SVN: r146988
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 36bc865..a2c0e0f 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -53,6 +53,7 @@ along with GCC; see the file COPYING3. If not see #include "toplev.h" #include "tm_p.h" #include "obstack.h" +#include "insn-attr.h" #include "insn-config.h" #include "cfglayout.h" #include "expr.h" @@ -408,13 +409,27 @@ free_bb_for_insn (void) return 0; } +static unsigned int +rest_of_pass_free_cfg (void) +{ +#ifdef DELAY_SLOTS + /* The resource.c machinery uses DF but the CFG isn't guaranteed to be + valid at that point so it would be too late to call df_analyze. */ + if (optimize > 0 && flag_delayed_branch) + df_analyze (); +#endif + + free_bb_for_insn (); + return 0; +} + struct rtl_opt_pass pass_free_cfg = { { RTL_PASS, NULL, /* name */ NULL, /* gate */ - free_bb_for_insn, /* execute */ + rest_of_pass_free_cfg, /* execute */ NULL, /* sub */ NULL, /* next */ 0, /* static_pass_number */ |