{
if (cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK
| (flag_crossjumping ? CLEANUP_CROSSJUMP : 0))
- && flag_reorder_blocks)
+ && (flag_reorder_blocks || flag_reorder_blocks_and_partition))
{
reorder_basic_blocks ();
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK);
if (flag_sched2_use_traces && flag_schedule_insns_after_reload)
tracer ();
- if (flag_reorder_blocks)
+ if (flag_reorder_blocks || flag_reorder_blocks_and_partition)
reorder_basic_blocks ();
- if (flag_reorder_blocks
+ if (flag_reorder_blocks || flag_reorder_blocks_and_partition
|| (flag_sched2_use_traces && flag_schedule_insns_after_reload))
changed |= cleanup_cfg (CLEANUP_EXPENSIVE
| (!HAVE_conditional_execution
if (flag_if_conversion)
rest_of_handle_if_after_combine (decl, insns);
+ /* The optimization to partition hot/cold basic blocks into separate
+ sections of the .o file does not work well with exception handling.
+ Don't call it if there are exceptions. */
+
+ if (flag_reorder_blocks_and_partition && !flag_exceptions)
+ {
+ no_new_pseudos = 0;
+ partition_hot_cold_basic_blocks ();
+ allocate_reg_life_data ();
+ update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
+ PROP_LOG_LINKS | PROP_REG_INFO | PROP_DEATH_NOTES);
+ no_new_pseudos = 1;
+ }
+
if (optimize > 0 && (flag_regmove || flag_expensive_optimizations))
rest_of_handle_regmove (decl, insns);
/* We're done with this function. Free up memory if we can. */
free_after_parsing (cfun);
- if (! DECL_DEFER_OUTPUT (decl))
- {
- free_after_compilation (cfun);
- DECL_STRUCT_FUNCTION (decl) = 0;
- }
- cfun = 0;
ggc_collect ();