This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix another case of modified global_options after creation of optimization_default_node
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 6 Feb 2015 21:28:09 +0100
- Subject: [PATCH] Fix another case of modified global_options after creation of optimization_default_node
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
As discussed in PR64340, the clearing of flag_ipa_ra is misplaced too,
because it isn't reflected in optimization_default_node.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?
2015-02-06 Jakub Jelinek <jakub@redhat.com>
* toplev.c (process_options): Change flag_ipa_ra before creating
optimization_{default,current}_node.
--- gcc/toplev.c.jj 2015-01-31 10:07:40.000000000 +0100
+++ gcc/toplev.c 2015-02-06 17:20:11.778126431 +0100
@@ -1662,6 +1662,11 @@ process_options (void)
flag_sanitize &= ~SANITIZE_ADDRESS;
}
+ /* Disable use caller save optimization if profiler is active or port
+ does not emit prologue and epilogue as RTL. */
+ if (profile_flag || !HAVE_prologue || !HAVE_epilogue)
+ flag_ipa_ra = 0;
+
/* Enable -Werror=coverage-mismatch when -Werror and -Wno-error
have not been set. */
if (!global_options_set.x_warnings_are_errors
@@ -1675,10 +1680,8 @@ process_options (void)
optimization_default_node = build_optimization_node (&global_options);
optimization_current_node = optimization_default_node;
- /* Disable use caller save optimization if profiler is active or port
- does not emit prologue and epilogue as RTL. */
- if (profile_flag || !HAVE_prologue || !HAVE_epilogue)
- flag_ipa_ra = 0;
+ /* Please don't change global_options after this point, those changes won't
+ be reflected in optimization_{default,current}_node. */
}
/* This function can be called multiple times to reinitialize the compiler
Jakub