summaryrefslogtreecommitdiff
path: root/gcc/config/m32r
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-22 12:14:45 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-22 12:14:45 +0000
commitc17f64ccf22e11f747dec2fb47d1176c80398942 (patch)
tree1f0b71dcd99544ab6999d99dbfef93415004de5f /gcc/config/m32r
parent80ec5af58fae7a812aafc8b55a97c531c6ff9864 (diff)
downloadgcc-c17f64ccf22e11f747dec2fb47d1176c80398942.tar.gz
* target.h (enum opt_levels, struct default_options): New.
* target.def (handle_ofast): Remove hook. (target_option.optimization): Change to target_option.optimization_table. * doc/tm.texi.in (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. (CAN_DEBUG_WITHOUT_FP): Remove. * doc/tm.texi: Regenerate. * opts.c (maybe_default_option, maybe_default_options, default_options_table): New. (default_options_optimization): Take extra parameters. Don't assert that global_options and global_options_set are in use. Use maybe_default_options. (decode_options): Pass extra parameters to default_options_optimization. * common.opt (falign-loops): Use value 0 with Var. (frerun-cse-after-loop, ftree-ter): Remove Init. * system.h (CAN_DEBUG_WITHOUT_FP, TARGET_HANDLE_OFAST, TARGET_OPTION_OPTIMIZATION): Remove. * targhooks.c (empty_optimization_table): New. * targhooks.h (empty_optimization_table): Declare. * toplev.c (process_options): Don't set flag_rerun_cse_after_loop. * config/alpha/alpha.c (alpha_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/alpha/alpha.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/arm/arm.c (arm_option_optimization: Change to arm_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/arm/arm.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/avr/avr.c (avr_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/avr/avr.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/cris/cris.c (cris_option_optimization): Change to cris_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/crx/crx.c (crx_option_optimization): Change to crx_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/crx/crx.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/fr30/fr30.c (fr30_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/fr30/fr30.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/frv/frv.c (frv_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/frv/frv.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/h8300/h8300.c (h8300_option_optimization): Change to h8300_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/h8300/h8300.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/i386/i386.c (ix86_option_optimization): Change to ix86_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/i386/sol2-10.h (SUBTARGET_OPTIMIZATION_OPTIONS): Define as initializer. * config/ia64/ia64.c (ia64_option_optimization): Change to ia64_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/ia64/ia64.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/ia64/vms.h (SUBTARGET_OPTIMIZATION_OPTIONS): Define as initializer. * config/iq2000/iq2000.c (iq2000_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/iq2000/iq2000.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/lm32/lm32.c (lm32_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/lm32/lm32.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/m32r/m32r.c (m32r_option_optimization): Change to m32r_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/m32r/m32r.h (SUBTARGET_OPTIMIZATION_OPTIONS, CAN_DEBUG_WITHOUT_FP): Remove. * config/mcore/mcore.c (mcore_option_optimization): Change to mcore_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/mep/mep.c (mep_option_optimization): Change to mep_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/mep/mep.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/microblaze/microblaze.c (microblaze_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/microblaze/microblaze.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/mips/mips.c (mips_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/mips/mips.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/mmix/mmix.c (mmix_option_optimization): Change to mmix_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/mmix/mmix.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/mn10300/mn10300.c (mn10300_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/mn10300/mn10300.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/pa/pa.c (pa_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/pa/pa.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/pdp11/pdp11.c (pdp11_option_optimization): Change to pdp11_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/picochip/picochip.c (picochip_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/picochip/picochip.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/rs6000/rs6000.c (rs6000_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/rs6000/rs6000.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/rx/rx.c (rx_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/rx/rx.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/s390/s390.c (s390_option_optimization): Change to s390_option_optimization_table. (s390_option_override): Update comment. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/s390/s390.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/score/score.c (score_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/score/score.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/sh/sh.c (sh_option_optimization): Change to sh_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. (sh_option_override): Set MASK_SAVE_ALL_TARGET_REGS here. (sh_option_override, expand_block_move, multcosts, find_barrier, barrier_align): Use optimize_size instead of TARGET_SMALLCODE. * config/sh/sh.h (CAN_DEBUG_WITHOUT_FP): Remove. (LOOP_ALIGN, TRAMPOLINE_ALIGNMENT, MOVE_BY_PIECES_P, STORE_BY_PIECES_P, SH_DYNAMIC_SHIFT_COST): Use optimize_size instead of TARGET_SMALLCODE. * config/sh/sh.opt (mspace): Make into an alias for -Os. * config/sparc/sparc.c (sparc_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/sparc/sparc.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/stormy16/stormy16.c (xstorym16_option_optimization_table, TARGET_OPTION_OPTIMIZATION_TABLE): New. * config/stormy16/stormy16.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/v850/v850.c (v850_option_optimization): Change to v850_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/v850/v850.h (CAN_DEBUG_WITHOUT_FP): Remove. * config/xtensa/xtensa.c (xtensa_option_optimization): Change to xtensa_option_optimization_table. (TARGET_OPTION_OPTIMIZATION): Change to TARGET_OPTION_OPTIMIZATION_TABLE. * config/xtensa/xtensa.h (CAN_DEBUG_WITHOUT_FP): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165823 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m32r')
-rw-r--r--gcc/config/m32r/m32r.c24
-rw-r--r--gcc/config/m32r/m32r.h9
2 files changed, 9 insertions, 24 deletions
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index 903f410a07d..f03df26b571 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -64,7 +64,6 @@ enum m32r_sdata m32r_sdata = M32R_SDATA_DEFAULT;
/* Forward declaration. */
static bool m32r_handle_option (size_t, const char *, int);
static void m32r_option_override (void);
-static void m32r_option_optimization (int, int);
static void init_reg_tables (void);
static void block_move_call (rtx, rtx, rtx);
static int m32r_is_insn (rtx);
@@ -113,6 +112,13 @@ static const struct attribute_spec m32r_attribute_table[] =
{ "model", 1, 1, true, false, false, m32r_handle_model_attribute },
{ NULL, 0, 0, false, false, false, NULL }
};
+
+static const struct default_options m32r_option_optimization_table[] =
+ {
+ { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
+ { OPT_LEVELS_1_PLUS, OPT_fregmove, NULL, 1 },
+ { OPT_LEVELS_NONE, 0, NULL, 0 }
+ };
/* Initialize the GCC target structure. */
#undef TARGET_ATTRIBUTE_TABLE
@@ -154,8 +160,8 @@ static const struct attribute_spec m32r_attribute_table[] =
#define TARGET_HANDLE_OPTION m32r_handle_option
#undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE m32r_option_override
-#undef TARGET_OPTION_OPTIMIZATION
-#define TARGET_OPTION_OPTIMIZATION m32r_option_optimization
+#undef TARGET_OPTION_OPTIMIZATION_TABLE
+#define TARGET_OPTION_OPTIMIZATION_TABLE m32r_option_optimization_table
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO m32r_encode_section_info
@@ -278,18 +284,6 @@ m32r_option_override (void)
SUBTARGET_OVERRIDE_OPTIONS;
}
-static void
-m32r_option_optimization (int level, int size)
-{
- if (level == 1)
- flag_regmove = 1;
-
- if (size)
- flag_omit_frame_pointer = 1;
-
- SUBTARGET_OPTIMIZATION_OPTIONS;
-}
-
/* Vectors to keep interesting information about registers where it can easily
be got. We use to use the actual mode value as the bit number, but there
is (or may be) more than 32 modes now. Instead we use two tables: one
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index 9522f571f38..3c0c85d7302 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -305,15 +305,6 @@ extern enum m32r_sdata m32r_sdata;
#ifndef SUBTARGET_OVERRIDE_OPTIONS
#define SUBTARGET_OVERRIDE_OPTIONS
#endif
-
-#ifndef SUBTARGET_OPTIMIZATION_OPTIONS
-#define SUBTARGET_OPTIMIZATION_OPTIONS
-#endif
-
-/* Define this macro if debugging can be performed even without a
- frame pointer. If this macro is defined, GCC will turn on the
- `-fomit-frame-pointer' option whenever `-O' is specified. */
-#define CAN_DEBUG_WITHOUT_FP
/* Target machine storage layout. */