gimplify.c (compare_case_labels): New function.
authorSteven Bosscher <stevenb@suse.de>
Wed, 26 May 2004 22:36:49 +0000 (22:36 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Wed, 26 May 2004 22:36:49 +0000 (22:36 +0000)
commitf667741c42d3bc8082877638726e4d3a22285431
tree9a721edcedc47294d0570c2ba52be9541243aeec
parente4efa9715632519e202f57250b3d8954b17ac9c9
gimplify.c (compare_case_labels): New function.

* gimplify.c (compare_case_labels): New function.
(gimplify_switch_expr): Sort case labels, and make sure the
last label in the label vector is the default case.
* tree-cfg.c (group_case_labels): New function.
(build_tree_cfg): Cleanup redundant labels and group case labels
before creating edges.
(cleanup_dead_labels): Handle GOTO_EXPRs.
(find_case_label_for_value): Use a binary search to find the
case label for the given value.
* tree-gimple.c: Mention that labels are sorted, and that the
last label must be the default.

From-SVN: r82297
gcc/ChangeLog
gcc/gimplify.c
gcc/stmt.c
gcc/tree-cfg.c
gcc/tree-gimple.c