aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2013-11-19 22:13:49 +0000
committerTeresa Johnson <tejohnson@gcc.gnu.org>2013-11-19 22:13:49 +0000
commit32ad0f03298dd5edd015fa78dcfbb96d66c9a80d (patch)
tree0ee342f407ede127f48bbc6e9ebf78572744d167 /gcc
parent2ae367c1e7081c2ec9a47267551d197002e79b23 (diff)
downloadgcc-32ad0f03298dd5edd015fa78dcfbb96d66c9a80d.zip
gcc-32ad0f03298dd5edd015fa78dcfbb96d66c9a80d.tar.gz
gcc-32ad0f03298dd5edd015fa78dcfbb96d66c9a80d.tar.bz2
i386-common.c: Enable -freorder-blocks-and-partition at -O2 and up for x86.
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/common/config/i386/i386-common.c2
-rw-r--r--gcc/doc/invoke.texi2
-rw-r--r--gcc/opts.c21
4 files changed, 24 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c79ee9..9cd78e9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c
index 341637b..e07479d 100644
--- a/gcc/common/config/i386/i386-common.c
+++ b/gcc/common/config/i386/i386-common.c
@@ -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 },
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index d4a6639..e005422 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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
diff --git a/gcc/opts.c b/gcc/opts.c
index 89cfe5c..a31b28d 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -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;
}