Commit 8a9e6b45 by Bernd Schmidt Committed by Bernd Schmidt

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
parent c4e5de1b
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> 2014-05-21 Oleg Endo <olegendo@gcc.gnu.org>
PR target/54236 PR target/54236
......
...@@ -4213,14 +4213,14 @@ cfg_layout_initialize (unsigned int flags) ...@@ -4213,14 +4213,14 @@ cfg_layout_initialize (unsigned int flags)
rtx x; rtx x;
basic_block bb; basic_block bb;
/* Once bb reordering is complete, cfg layout mode should not be re-entered. /* Once bb partitioning is complete, cfg layout mode should not be
Entering cfg layout mode will perform optimizations on the cfg that re-entered. Entering cfg layout mode may require fixups. As an
could affect the bb layout negatively or even require fixups. An example, if edge forwarding performed when optimizing the cfg
example of the latter is if edge forwarding performed when optimizing layout required moving a block from the hot to the cold
the cfg layout required moving a block from the hot to the cold section section. This would create an illegal partitioning unless some
under -freorder-blocks-and-partition. This would create an illegal manual fixup was performed. */
partitioning unless some manual fixup was performed. */ gcc_assert (!(crtl->bb_reorder_complete
gcc_assert (!crtl->bb_reorder_complete); && flag_reorder_blocks_and_partition));
initialize_original_copy_tables (); initialize_original_copy_tables ();
......
...@@ -636,7 +636,9 @@ reorg_loops (bool do_reorder, struct hw_doloop_hooks *hooks) ...@@ -636,7 +636,9 @@ reorg_loops (bool do_reorder, struct hw_doloop_hooks *hooks)
loops = discover_loops (&loop_stack, 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); reorder_loops (loops);
free_loops (loops); free_loops (loops);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment