aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2008-07-20 16:57:17 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2008-07-20 14:57:17 +0000
commitd6cc6ec9d11523de305be40a6e0e36ea9996de57 (patch)
treeaa3df5a11b81daa4bf2935f747dd343908e7a3c6 /gcc/opts.c
parentc0b215ccf649d4cd8f8dd4942ff6e57fb4584bb7 (diff)
downloadgcc-d6cc6ec9d11523de305be40a6e0e36ea9996de57.zip
gcc-d6cc6ec9d11523de305be40a6e0e36ea9996de57.tar.gz
gcc-d6cc6ec9d11523de305be40a6e0e36ea9996de57.tar.bz2
extend.texi (flatten attribute): Remove note about unit-at-a-time
* doc/extend.texi (flatten attribute): Remove note about unit-at-a-time * doc/invoke.texi (--combine): Likewise. (-finline-functions-called-once): Update levels when enabled. (-funit-at-a-time): Document new behaviour. (-ftoplevel-reorder): Document that it is enabled -O0 and imply -fno-section-anchors when disabled explicitly. (inline params): They are not ignored now. (precompiled headers): Remove unit-at-a-time as being incompatible. * opts.c (decode_options): Handle unit-at-a-time as alias; imply -fno-section-anchors when toplevel reorder is disabled explicitly. * common.opt (ftoplevel-reorder): Set default value to 2. (funit-at-a-time): Set default value to 1. * config/rs6000/rs6000.c (optimization_options): Set section anchors to 2. From-SVN: r138009
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 7e8e96c..0533c9fa 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -849,15 +849,28 @@ decode_options (unsigned int argc, const char **argv)
}
}
- if (!optimize)
+
+ if (!flag_unit_at_a_time)
{
- flag_merge_constants = 0;
+ flag_section_anchors = 0;
+ flag_toplevel_reorder = 0;
+ flag_unit_at_a_time = 1;
+ }
+ if (!flag_toplevel_reorder)
+ {
+ if (flag_section_anchors == 1)
+ error ("Section anchors must be disabled when toplevel reorder is disabled.");
+ flag_section_anchors = 0;
}
- if (!no_unit_at_a_time_default)
+ if (!optimize)
{
- flag_unit_at_a_time = 1;
- if (!optimize)
+ flag_merge_constants = 0;
+
+ /* We disable toplevel reordering at -O0 to disable transformations that
+ might be surprising to end users and to get -fno-toplevel-reorder
+ tested, but we keep section anchors. */
+ if (flag_toplevel_reorder == 2)
flag_toplevel_reorder = 0;
}