diff options
author | Tom Wood <wood@gnu.org> | 1992-06-25 10:33:35 +0000 |
---|---|---|
committer | Tom Wood <wood@gnu.org> | 1992-06-25 10:33:35 +0000 |
commit | 4f73c5ddfbe6d428d13e8b581d91b80bc89341c6 (patch) | |
tree | 85ca31814474a70abb7430645497da9dc4919606 /gcc | |
parent | cc61d0dec451a7a3bd0756a0894981be4c07d790 (diff) | |
download | gcc-4f73c5ddfbe6d428d13e8b581d91b80bc89341c6.zip gcc-4f73c5ddfbe6d428d13e8b581d91b80bc89341c6.tar.gz gcc-4f73c5ddfbe6d428d13e8b581d91b80bc89341c6.tar.bz2 |
*** empty log message ***
From-SVN: r1283
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/stmt.c | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -3624,15 +3624,20 @@ expand_end_case (orig_index) make a sequence of conditional branches instead of a dispatch. If the switch-index is a constant, do it this way because we can optimize it. */ - else if (TREE_INT_CST_HIGH (range) != 0 + +#ifndef CASE_VALUES_THRESHOLD #ifdef HAVE_casesi - || (HAVE_casesi ? count < 4 : count < 5) +#define CASE_VALUES_THRESHOLD (HAVE_casesi ? 4 : 5) #else - /* If machine does not have a case insn that compares the - bounds, this means extra overhead for dispatch tables - which raises the threshold for using them. */ - || count < 5 -#endif + /* If machine does not have a case insn that compares the + bounds, this means extra overhead for dispatch tables + which raises the threshold for using them. */ +#define CASE_VALUES_THRESHOLD 5 +#endif /* HAVE_casesi */ +#endif /* CASE_VALUES_THRESHOLD */ + + else if (TREE_INT_CST_HIGH (range) != 0 + || count < CASE_VALUES_THRESHOLD || (unsigned) (TREE_INT_CST_LOW (range)) > 10 * count || TREE_CODE (index_expr) == INTEGER_CST /* These will reduce to a constant. */ |