*** empty log message ***
authorTom Wood <wood@gnu.org>
Thu, 25 Jun 1992 10:33:35 +0000 (10:33 +0000)
committerTom Wood <wood@gnu.org>
Thu, 25 Jun 1992 10:33:35 +0000 (10:33 +0000)
From-SVN: r1283

gcc/stmt.c

index f4f60039c2d5ac9e3c861b60ed40cb118369ad45..d9e49bdad5f06312aee12a19bef169508da84304 100644 (file)
@@ -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.  */