diff options
author | Teresa Johnson <tejohnson@google.com> | 2013-11-18 22:38:51 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@gcc.gnu.org> | 2013-11-18 22:38:51 +0000 |
commit | 4ca1930986eb7cb7eae67b74b74bd0ed3717ad83 (patch) | |
tree | 5c71565f2ef787716805387748dca8ac915527bb /gcc/cfgrtl.c | |
parent | 38f4f02fd6a83607aada3b3270469143bd9ffc7a (diff) | |
download | gcc-4ca1930986eb7cb7eae67b74b74bd0ed3717ad83.zip gcc-4ca1930986eb7cb7eae67b74b74bd0ed3717ad83.tar.gz gcc-4ca1930986eb7cb7eae67b74b74bd0ed3717ad83.tar.bz2 |
This patch fixes an lto profiledbootstrap failure with -freorder-blocks-and-partition enabled.
This patch fixes an lto profiledbootstrap failure with
-freorder-blocks-and-partition enabled. Currently compgotos
is the only pass that goes into cfglayout mode after bb reordering,
which is undesireable (and in the case of -freorder-blocks-and-partition
can cause illegal partitioning) because of the optimizations performed
on the cfg when going into cfglayout mode. Moved compgoto before
bb reordering to avoid these problems.
2013-11-18 Teresa Johnson <tejohnson@google.com>
* gcc/cfgrtl.c (cfg_layout_initialize): Assert if we
try to go into cfglayout after bb reordering.
* gcc/passes.def: Move compgotos before bb reordering
since it goes into cfglayout.
From-SVN: r204985
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index c7ee7ee..1f99aa1df 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -4204,6 +4204,15 @@ cfg_layout_initialize (unsigned int flags) rtx x; basic_block bb; + /* Once bb reordering is complete, cfg layout mode should not be re-entered. + Entering cfg layout mode will perform optimizations on the cfg that + could affect the bb layout negatively or even require fixups. An + example of the latter is if edge forwarding performed when optimizing + the cfg layout required moving a block from the hot to the cold section + under -freorder-blocks-and-partition. This would create an illegal + partitioning unless some manual fixup was performed. */ + gcc_assert (!crtl->bb_reorder_complete); + initialize_original_copy_tables (); cfg_layout_rtl_register_cfg_hooks (); |