From patchwork Fri Jul 22 23:58:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fix pass_partition_blocks vs -O0 From: Richard Henderson X-Patchwork-Id: 106403 Message-Id: <4E2A0E8A.9010700@redhat.com> To: GCC Patches Date: Fri, 22 Jul 2011 16:58:02 -0700 Well, technically it's not "broken" yet. It will be as soon as it starts touching DF data, since this pass runs before pass_df_initialize_no_opt. But the only real consumer of BB_PARTITION is pass_reorder_blocks. And that pass is already gated to only run if optimization is enabled. So really there's no point in running this pass without optimization. Committed. r~ * bb-reorder.c (gate_handle_partition_blocks): Honor optimize. diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index fac5b29..763cbe5 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -2212,6 +2212,7 @@ gate_handle_partition_blocks (void) user defined section attributes. Don't call it if either case arises. */ return (flag_reorder_blocks_and_partition + && optimize && !DECL_ONE_ONLY (current_function_decl) && !user_defined_section_attribute); }