diff options
Diffstat (limited to 'gcc/tree-switch-conversion.h')
-rw-r--r-- | gcc/tree-switch-conversion.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/tree-switch-conversion.h b/gcc/tree-switch-conversion.h index 946077c..0335283 100644 --- a/gcc/tree-switch-conversion.h +++ b/gcc/tree-switch-conversion.h @@ -33,7 +33,16 @@ enum cluster_type #define PRINT_CASE(f,c) print_generic_expr (f, c) -/* Abstract base class for representing a cluster of cases. */ +/* Abstract base class for representing a cluster of cases. + + Here is the inheritance hierarachy, and the enum_cluster_type + values for the concrete subclasses: + + cluster + |-simple_cluster (SIMPLE_CASE) + `-group_cluster + |-jump_table_cluster (JUMP_TABLE) + `-bit_test_cluster (BIT_TEST). */ struct cluster { @@ -228,6 +237,10 @@ struct jump_table_cluster: public group_cluster void emit (tree index_expr, tree index_type, tree default_label_expr, basic_block default_bb); + /* Find jump tables of given CLUSTERS, where all members of the vector + are of type simple_cluster. New clusters are returned. */ + static vec<cluster *> find_jump_tables (vec<cluster *> &clusters); + /* Return true when cluster starting at START and ending at END (inclusive) can build a jump-table. */ static bool can_be_handled (const vec<cluster *> &clusters, unsigned start, @@ -336,6 +349,10 @@ struct bit_test_cluster: public group_cluster void emit (tree index_expr, tree index_type, tree default_label_expr, basic_block default_bb); + /* Find bit tests of given CLUSTERS, where all members of the vector + are of type simple_cluster. New clusters are returned. */ + static vec<cluster *> find_bit_tests (vec<cluster *> &clusters); + /* Return true when RANGE of case values with UNIQ labels can build a bit test. */ static bool can_be_handled (unsigned HOST_WIDE_INT range, unsigned uniq); |