summaryrefslogtreecommitdiff
path: root/gcc/tree-gimple.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-26 22:36:49 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-26 22:36:49 +0000
commitb624a250a9f8ce1e45c09d1227ff5e2400387621 (patch)
tree9a721edcedc47294d0570c2ba52be9541243aeec /gcc/tree-gimple.c
parent902c164d119a9062cadc0ceb20655f4566845ca6 (diff)
downloadgcc-b624a250a9f8ce1e45c09d1227ff5e2400387621.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82297 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-gimple.c')
-rw-r--r--gcc/tree-gimple.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-gimple.c b/gcc/tree-gimple.c
index 18bc2f8afa3..e749ec80097 100644
--- a/gcc/tree-gimple.c
+++ b/gcc/tree-gimple.c
@@ -73,6 +73,8 @@ Boston, MA 02111-1307, USA. */
op1 -> stmt
op2 -> array of case labels (as LABEL_DECLs?)
FIXME: add case value info
+ The SWITCH_LABELS (op2) are sorted in ascending order, and the
+ last label in the vector is always the default case.
jump-stmt:
GOTO_EXPR
op0 -> LABEL_DECL | '*' ID