diff options
Diffstat (limited to 'gcc/config/cris/cris.c')
-rw-r--r-- | gcc/config/cris/cris.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 6e04212..52367c2 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -130,6 +130,7 @@ static int cris_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode, static tree cris_md_asm_clobbers (tree, tree, tree); static bool cris_handle_option (size_t, const char *, int); +static void cris_option_optimization (int, int); static void cris_option_override (void); static bool cris_frame_pointer_required (void); @@ -211,6 +212,8 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION; #undef TARGET_OPTION_OVERRIDE #define TARGET_OPTION_OVERRIDE cris_option_override +#undef TARGET_OPTION_OPTIMIZATION +#define TARGET_OPTION_OPTIMIZATION cris_option_optimization #undef TARGET_ASM_TRAMPOLINE_TEMPLATE #define TARGET_ASM_TRAMPOLINE_TEMPLATE cris_asm_trampoline_template @@ -2396,6 +2399,15 @@ cris_handle_option (size_t code, const char *arg ATTRIBUTE_UNUSED, return true; } +/* Implement TARGET_OPTION_OPTIMIZATION. */ + +static void +cris_option_optimization (int level, int size) +{ + if (level >= 2 || size) + flag_omit_frame_pointer = 1; +} + /* The TARGET_OPTION_OVERRIDE worker. As is the norm, this also parses -mfoo=bar type parameters. */ |