From e6ff3083a0fc0bbf35ad323784671732c7ca58cc Mon Sep 17 00:00:00 2001 From: Anatoly Sokolov Date: Sat, 25 Apr 2009 08:34:27 +0400 Subject: target.h (struct gcc_target): Add case_values_threshold field. * target.h (struct gcc_target): Add case_values_threshold field. * target-def.h (TARGET_CASE_VALUES_THRESHOLD): New. (TARGET_INITIALIZER): Use TARGET_CASE_VALUES_THRESHOLD. * targhooks.c (default_case_values_threshold): New function. * targhooks.h (default_case_values_threshold): Declare function. * stmt.c (expand_case): Use case_values_threshold target hook. * expr.h (case_values_threshold): Remove declartation. * expr.c (case_values_threshold): Remove function. * doc/tm.texi (CASE_VALUES_THRESHOLD): Revise documentation. * config/avr/avr.h (CASE_VALUES_THRESHOLD): Remove macro. * config/avr/avr.c (TARGET_CASE_VALUES_THRESHOLD): Define macro. (avr_case_values_threshold): Declare as static. * config/avr/avr-protos.h (avr_case_values_threshold): Remove. * config/avr/mn10300.h (CASE_VALUES_THRESHOLD): Remove macro. * config/avr/mn10300.c (TARGET_CASE_VALUES_THRESHOLD): Define macro. (mn10300_case_values_threshold): New function. From-SVN: r146756 --- gcc/target.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/target.h') diff --git a/gcc/target.h b/gcc/target.h index f3d3361..ed08a09 100644 --- a/gcc/target.h +++ b/gcc/target.h @@ -921,6 +921,10 @@ struct gcc_target in peephole2. */ bool (* hard_regno_scratch_ok) (unsigned int regno); + /* Return the smallest number of different values for which it is best to + use a jump-table instead of a tree of conditional branches. */ + unsigned int (* case_values_threshold) (void); + /* Functions specific to the C family of frontends. */ struct c { /* Return machine mode for non-standard suffix -- cgit v1.1