aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2014-05-21 09:22:26 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2014-05-21 09:22:26 +0000
commit8a9e6b45baed602a208c6be551fd9708e1d06809 (patch)
treef6876e2d660634f5c9a6e15d561f6b1238bc678b /gcc
parentc4e5de1b1af1b33acbbe5a2271ff37405d1d17b5 (diff)
downloadgcc-8a9e6b45baed602a208c6be551fd9708e1d06809.zip
gcc-8a9e6b45baed602a208c6be551fd9708e1d06809.tar.gz
gcc-8a9e6b45baed602a208c6be551fd9708e1d06809.tar.bz2
Stop the cfglayout code from failing an assert when called from hw-doloop.
* cfgrtl.c (cfg_layout_initialize): Weaken assert to only trigger if flag_reorder_blocks_and_partition. * hw-doloop.c (reorg_loops): Avoid reordering if that flag is set. From-SVN: r210683
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cfgrtl.c16
-rw-r--r--gcc/hw-doloop.c4
3 files changed, 17 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e2e3dd3..a80370b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-21 Bernd Schmidt <bernds@codesourcery.com>
+
+ * cfgrtl.c (cfg_layout_initialize): Weaken assert to only trigger if
+ flag_reorder_blocks_and_partition.
+ * hw-doloop.c (reorg_loops): Avoid reordering if that flag is set.
+
2014-05-21 Oleg Endo <olegendo@gcc.gnu.org>
PR target/54236
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index eb25e89..49faf2e 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -4213,14 +4213,14 @@ 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);
+ /* Once bb partitioning is complete, cfg layout mode should not be
+ re-entered. Entering cfg layout mode may require fixups. As an
+ example, if edge forwarding performed when optimizing the cfg
+ layout required moving a block from the hot to the cold
+ section. This would create an illegal partitioning unless some
+ manual fixup was performed. */
+ gcc_assert (!(crtl->bb_reorder_complete
+ && flag_reorder_blocks_and_partition));
initialize_original_copy_tables ();
diff --git a/gcc/hw-doloop.c b/gcc/hw-doloop.c
index cc8f9b7..d182761 100644
--- a/gcc/hw-doloop.c
+++ b/gcc/hw-doloop.c
@@ -636,7 +636,9 @@ reorg_loops (bool do_reorder, struct hw_doloop_hooks *hooks)
loops = discover_loops (&loop_stack, hooks);
- if (do_reorder)
+ /* We can't enter cfglayout mode anymore if basic block partitioning
+ already happened. */
+ if (do_reorder && !flag_reorder_blocks_and_partition)
{
reorder_loops (loops);
free_loops (loops);