summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsam <sam@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-02 16:23:29 +0000
committersam <sam@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-02 16:23:29 +0000
commitcd8171dd88ae95d9e06c4e9a22bf445ba14babd6 (patch)
tree99f189fd6d946be4d1a2672501a9fcb381ff46ac
parent036068afb6f2b359150b81310f6cb28690f25d56 (diff)
downloadppe42-gcc-cd8171dd88ae95d9e06c4e9a22bf445ba14babd6.tar.gz
ppe42-gcc-cd8171dd88ae95d9e06c4e9a22bf445ba14babd6.zip
gcc/
PR target/37283 * opts.c (decode_options): Move processing of -fno-unit-at-a-time and -fno-toplevel-reorder after handle_options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139892 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/opts.c47
2 files changed, 25 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a80ef311cce..d3d045586ac 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-02 Samuel Tardieu <sam@rfc1149.net>
+
+ PR target/37283
+ * opts.c (decode_options): Move processing of -fno-unit-at-a-time
+ and -fno-toplevel-reorder after handle_options.
+
2008-09-02 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (arm_tune_cortex_a9): Define.
diff --git a/gcc/opts.c b/gcc/opts.c
index 0c0f0a3152b..9bae6ea8349 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -870,39 +870,11 @@ decode_options (unsigned int argc, const char **argv)
}
}
- if (!flag_unit_at_a_time)
- {
- flag_section_anchors = 0;
- flag_toplevel_reorder = 0;
- }
- if (!flag_toplevel_reorder)
- {
- if (flag_section_anchors == 1)
- error ("Section anchors must be disabled when toplevel reorder is disabled.");
- flag_section_anchors = 0;
- }
-
#ifdef IRA_COVER_CLASSES
/* Use IRA if it is implemented for the target. */
flag_ira = 1;
#endif
- /* Originally we just set the variables if a particular optimization level,
- but with the advent of being able to change the optimization level for a
- function, we need to reset optimizations. */
- 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;
- }
- else
- flag_merge_constants = 1;
-
/* -O1 optimizations. */
opt1 = (optimize >= 1);
flag_defer_pop = opt1;
@@ -918,6 +890,7 @@ decode_options (unsigned int argc, const char **argv)
flag_if_conversion2 = opt1;
flag_ipa_pure_const = opt1;
flag_ipa_reference = opt1;
+ flag_merge_constants = opt1;
flag_split_wide_types = opt1;
flag_tree_ccp = opt1;
flag_tree_dce = opt1;
@@ -1035,6 +1008,24 @@ decode_options (unsigned int argc, const char **argv)
handle_options (argc, argv, lang_mask);
+ /* -fno-unit-at-a-time and -fno-toplevel-reorder handling. */
+ if (!flag_unit_at_a_time)
+ {
+ flag_section_anchors = 0;
+ flag_toplevel_reorder = 0;
+ }
+ else if (!optimize && flag_toplevel_reorder == 2)
+ /* 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. */
+ flag_toplevel_reorder = 0;
+ else 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 (first_time_p)
{
if (flag_pie)
OpenPOWER on IntegriCloud