+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.
+
2013-11-18 Bernd Schmidt <bernds@codesourcery.com>
* cgraphunit.c (ipa_passes): Don't execute all_lto_gen_passes.
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 ();
NEXT_PASS (pass_regrename);
NEXT_PASS (pass_cprop_hardreg);
NEXT_PASS (pass_fast_rtl_dce);
+ NEXT_PASS (pass_duplicate_computed_gotos);
NEXT_PASS (pass_reorder_blocks);
NEXT_PASS (pass_branch_target_load_optimize2);
NEXT_PASS (pass_leaf_regs);
NEXT_PASS (pass_stack_regs_run);
POP_INSERT_PASSES ()
NEXT_PASS (pass_compute_alignments);
- NEXT_PASS (pass_duplicate_computed_gotos);
NEXT_PASS (pass_variable_tracking);
NEXT_PASS (pass_free_cfg);
NEXT_PASS (pass_machine_reorg);