aboutsummaryrefslogtreecommitdiff
path: root/gcc/common
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2015-11-07 20:44:21 +0100
committerSegher Boessenkool <segher@gcc.gnu.org>2015-11-07 20:44:21 +0100
commitbc05d49d1064b7fb143c9786ca1fe6a1557163a2 (patch)
treede698ca02714d8ef233bb93523bf97fcac800c1c /gcc/common
parenta153644f75bb7e5c7814eb2a7a4737108018748f (diff)
downloadgcc-bc05d49d1064b7fb143c9786ca1fe6a1557163a2.zip
gcc-bc05d49d1064b7fb143c9786ca1fe6a1557163a2.tar.gz
gcc-bc05d49d1064b7fb143c9786ca1fe6a1557163a2.tar.bz2
i386: Use the STC bb-reorder algorithm at -Os (PR67864)
For x86, STC still gives better results for optimise-for-size than "simple" does. So use STC at -Os as well. PR rtl-optimization/67864 * common/config/i386/i386-common.c (ix86_option_optimization_table) <OPT_freorder_blocks_algorithm_>: Use REORDER_BLOCKS_ALGORITHM_STC at -Os and up. From-SVN: r229937
Diffstat (limited to 'gcc/common')
-rw-r--r--gcc/common/config/i386/i386-common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c
index 0f8c3e1..49899bd 100644
--- a/gcc/common/config/i386/i386-common.c
+++ b/gcc/common/config/i386/i386-common.c
@@ -997,6 +997,9 @@ static const struct default_options ix86_option_optimization_table[] =
{ 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 },
+ /* The STC algorithm produces the smallest code at -Os, for x86. */
+ { OPT_LEVELS_2_PLUS, OPT_freorder_blocks_algorithm_, NULL,
+ REORDER_BLOCKS_ALGORITHM_STC },
/* 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 },