]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
bb-reorder.c (insert_section_boundary_note): Only do it if we reordered the blocks...
authorBernd Schmidt <bernds@codesourcery.com>
Tue, 30 Aug 2011 13:17:40 +0000 (13:17 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Tue, 30 Aug 2011 13:17:40 +0000 (13:17 +0000)
* bb-reorder.c (insert_section_boundary_note): Only do it if
we reordered the blocks; i.e. not if !optimize_function_for_speed_p.

From-SVN: r178298

gcc/ChangeLog
gcc/bb-reorder.c

index 5bcfa4aff3d11143c48e7e0bb3a81228800adff7..b89303d4e503d30fcb84b0734d863e5d26ac9a58 100644 (file)
@@ -11,6 +11,9 @@
        * config/i386/i386.c (get_pc_thunk_name): Change prefix to
        "__x86.get_pc_thunk".
 
+       * bb-reorder.c (insert_section_boundary_note): Only do it if
+       we reordered the blocks; i.e. not if !optimize_function_for_speed_p.
+
 2011-08-30  Christian Bruel  <christian.bruel@st.com>
 
        * coverage.c (coverage_init): Check flag_branch_probabilities instead of
index 11423fed29a0985295dd0112f06622ad83b32f41..d0ed8ea7bd368e6f444086aed5503131495eaf1b 100644 (file)
@@ -1965,8 +1965,11 @@ insert_section_boundary_note (void)
   rtx new_note;
   int first_partition = 0;
 
-  if (flag_reorder_blocks_and_partition)
-    FOR_EACH_BB (bb)
+  if (!flag_reorder_blocks_and_partition
+      || !optimize_function_for_speed_p (cfun))
+    return;
+
+  FOR_EACH_BB (bb)
     {
       if (!first_partition)
        first_partition = BB_PARTITION (bb);