+2012-06-08 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr.c (avr_case_values_threshold): Return 7.
+
2012-06-07 Andreas Schwab <schwab@linux-m68k.org>
* genhooks.c (main): Set progname.
return false;
}
-/* Worker function for CASE_VALUES_THRESHOLD. */
+
+/* Implement `CASE_VALUES_THRESHOLD'. */
+/* Supply the default for --param case-values-threshold=0 */
static unsigned int
avr_case_values_threshold (void)
{
- return (!AVR_HAVE_JMP_CALL || TARGET_CALL_PROLOGUES) ? 8 : 17;
+ /* The exact break-even point between a jump table and an if-else tree
+ depends on several factors not available here like, e.g. if 8-bit
+ comparisons can be used in the if-else tree or not, on the
+ range of the case values, if the case value can be reused, on the
+ register allocation, etc. '7' appears to be a good choice. */
+
+ return 7;
}