From b176bb73b4496d12966ed68023fc313041f7f3b8 Mon Sep 17 00:00:00 2001 From: Radovan Obradovic Date: Mon, 5 Jan 2015 23:42:27 +0000 Subject: re PR rtl-optimization/64287 (Disable -fuse-caller-save when -pg is active) 2015-01-05 Radovan Obradovic PR rtl-optimization/64287 gcc/ * toplev.c (HAVE_epilogue, HAVE_prologue): Provide default. (process_options): Disable flag_ipa_ra if profiling. gcc/testsuite/ * gcc.dg/aru-2.c: New test. From-SVN: r219208 --- gcc/toplev.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc/toplev.c') diff --git a/gcc/toplev.c b/gcc/toplev.c index 08050e7..1ad76f2 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -113,6 +113,13 @@ along with GCC; see the file COPYING3. If not see declarations for e.g. AIX 4.x. */ #endif +#ifndef HAVE_epilogue +#define HAVE_epilogue 0 +#endif +#ifndef HAVE_prologue +#define HAVE_prologue 0 +#endif + #include static void general_init (const char *); @@ -1634,6 +1641,11 @@ process_options (void) /* Save the current optimization options. */ 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; } /* This function can be called multiple times to reinitialize the compiler -- cgit v1.1