]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386-common.c: Enable -freorder-blocks-and-partition at -O2 and up for x86.
authorTeresa Johnson <tejohnson@google.com>
Tue, 19 Nov 2013 22:13:49 +0000 (22:13 +0000)
committerTeresa Johnson <tejohnson@gcc.gnu.org>
Tue, 19 Nov 2013 22:13:49 +0000 (22:13 +0000)
2013-11-19  Teresa Johnson  <tejohnson@google.com>

* common/config/i386/i386-common.c: Enable
-freorder-blocks-and-partition at -O2 and up for x86.
* doc/invoke.texi: Update -freorder-blocks-and-partition default.
* opts.c (finish_options): Only warn if -freorder-blocks-and-
partition was set on command line.

From-SVN: r205058

gcc/ChangeLog
gcc/common/config/i386/i386-common.c
gcc/doc/invoke.texi
gcc/opts.c

index 9c79ee9e6784da6fdccabe3a87e1d74e8fb658d8..9cd78e97644f26f682bcc00269b6edfd5cb19ace 100644 (file)
@@ -1,3 +1,11 @@
+2013-11-19  Teresa Johnson  <tejohnson@google.com>
+
+       * common/config/i386/i386-common.c: Enable
+       -freorder-blocks-and-partition at -O2 and up for x86.
+       * doc/invoke.texi: Update -freorder-blocks-and-partition default.
+       * opts.c (finish_options): Only warn if -freorder-blocks-and-
+       partition was set on command line.
+
 2013-11-19  Sriraman Tallam  <tmsriram@google.com>
 
        * final.c (final_scan_insn): Emit a label for the split
index 341637b4a10ad848fb8996047ff4d4e25e3a1836..e07479da28c05ef30a0e09580c5ffdb09e9e3ca0 100644 (file)
@@ -789,6 +789,8 @@ static const struct default_options ix86_option_optimization_table[] =
   {
     /* Enable redundant extension instructions removal at -O2 and higher.  */
     { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 },
+    /* Enable function splitting at -O2 and higher.  */
+    { OPT_LEVELS_2_PLUS, OPT_freorder_blocks_and_partition, NULL, 1 },
     /* Turn off -fschedule-insns by default.  It tends to make the
        problem with not enough registers even worse.  */
     { OPT_LEVELS_ALL, OPT_fschedule_insns, NULL, 0 },
index d4a6639806553b04ad4f715b095e105adfd1bf57..e00542285f9430298435c6efea521c528d3eb0fa 100644 (file)
@@ -8173,6 +8173,8 @@ exception handling, for linkonce sections, for functions with a user-defined
 section attribute and on any architecture that does not support named
 sections.
 
+Enabled for x86 at levels @option{-O2}, @option{-O3}.
+
 @item -freorder-functions
 @opindex freorder-functions
 Reorder functions in the object file in order to
index 89cfe5c56cc7700d25ee6fcb661732e34e477c69..a31b28de56b238413915c2be649e68dea28bde88 100644 (file)
@@ -737,9 +737,10 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
       && opts->x_flag_reorder_blocks_and_partition
       && (ui_except == UI_SJLJ || ui_except >= UI_TARGET))
     {
-      inform (loc,
-             "-freorder-blocks-and-partition does not work "
-             "with exceptions on this architecture");
+      if (opts_set->x_flag_reorder_blocks_and_partition)
+        inform (loc,
+                "-freorder-blocks-and-partition does not work "
+                "with exceptions on this architecture");
       opts->x_flag_reorder_blocks_and_partition = 0;
       opts->x_flag_reorder_blocks = 1;
     }
@@ -752,9 +753,10 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
       && opts->x_flag_reorder_blocks_and_partition
       && (ui_except == UI_SJLJ || ui_except >= UI_TARGET))
     {
-      inform (loc,
-             "-freorder-blocks-and-partition does not support "
-             "unwind info on this architecture");
+      if (opts_set->x_flag_reorder_blocks_and_partition)
+        inform (loc,
+                "-freorder-blocks-and-partition does not support "
+                "unwind info on this architecture");
       opts->x_flag_reorder_blocks_and_partition = 0;
       opts->x_flag_reorder_blocks = 1;
     }
@@ -769,9 +771,10 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
              && targetm_common.unwind_tables_default
              && (ui_except == UI_SJLJ || ui_except >= UI_TARGET))))
     {
-      inform (loc,
-             "-freorder-blocks-and-partition does not work "
-             "on this architecture");
+      if (opts_set->x_flag_reorder_blocks_and_partition)
+        inform (loc,
+                "-freorder-blocks-and-partition does not work "
+                "on this architecture");
       opts->x_flag_reorder_blocks_and_partition = 0;
       opts->x_flag_reorder_blocks = 1;
     }