diff options
author | Jakub Jelinek <jakub@redhat.com> | 2015-02-06 21:50:07 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2015-02-06 21:50:07 +0100 |
commit | f3ab4eedf1fdaa2f52c587a9e2b91255df32fcc1 (patch) | |
tree | 467efe050cd9ef37ee6e8d79a58e9e0b556d97f4 | |
parent | bbd1bae29c33b55ac449730b3b9eaaa44de3f3e8 (diff) | |
download | gcc-f3ab4eedf1fdaa2f52c587a9e2b91255df32fcc1.zip gcc-f3ab4eedf1fdaa2f52c587a9e2b91255df32fcc1.tar.gz gcc-f3ab4eedf1fdaa2f52c587a9e2b91255df32fcc1.tar.bz2 |
toplev.c (process_options): Change flag_ipa_ra before creating optimization_{default,current}_node.
* toplev.c (process_options): Change flag_ipa_ra before creating
optimization_{default,current}_node.
From-SVN: r220490
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/toplev.c | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 035baa5..531ffa0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2015-02-06 Jakub Jelinek <jakub@redhat.com> + * toplev.c (process_options): Change flag_ipa_ra before creating + optimization_{default,current}_node. + PR ipa/64896 * cgraphunit.c (cgraph_node::expand_thunk): If restype is not is_gimple_reg_type nor the thunk_fndecl diff --git a/gcc/toplev.c b/gcc/toplev.c index c4bc74b..99cf180 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1662,6 +1662,11 @@ process_options (void) flag_sanitize &= ~SANITIZE_ADDRESS; } + /* Do not use IPA optimizations for register allocation 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 |