stmt.c (mark_case_node): New function.

* stmt.c (mark_case_node): New function.
	(mark_case_nesting): Call it.

From-SVN: r33231
This commit is contained in:
Richard Kenner 2000-04-18 19:23:53 +00:00 committed by Richard Kenner
parent 6912b84bf1
commit 0876ac08ad
2 changed files with 22 additions and 11 deletions

View File

@ -1,5 +1,8 @@
Tue Apr 18 14:16:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* stmt.c (mark_case_node): New function.
(mark_case_nesting): Call it.
* expmed.c (emit_store_flag): If comparing two-word integer
with zero, can optimize NE, EQ, GE, and LT.

View File

@ -430,6 +430,7 @@ static void mark_cond_nesting PARAMS ((struct nesting *));
static void mark_loop_nesting PARAMS ((struct nesting *));
static void mark_block_nesting PARAMS ((struct nesting *));
static void mark_case_nesting PARAMS ((struct nesting *));
static void mark_case_node PARAMS ((struct case_node *));
static void mark_goto_fixup PARAMS ((struct goto_fixup *));
@ -509,28 +510,35 @@ mark_case_nesting (n)
{
while (n)
{
struct case_node *node;
ggc_mark_rtx (n->exit_label);
ggc_mark_rtx (n->data.case_stmt.start);
node = n->data.case_stmt.case_list;
while (node)
{
ggc_mark_tree (node->low);
ggc_mark_tree (node->high);
ggc_mark_tree (node->code_label);
node = node->right;
}
ggc_mark_tree (n->data.case_stmt.default_label);
ggc_mark_tree (n->data.case_stmt.index_expr);
ggc_mark_tree (n->data.case_stmt.nominal_type);
mark_case_node (n->data.case_stmt.case_list);
n = n->next;
}
}
/* Mark C for GC. */
static void
mark_case_node (c)
struct case_node *c;
{
if (c != 0)
{
ggc_mark_tree (c->low);
ggc_mark_tree (c->high);
ggc_mark_tree (c->code_label);
mark_case_node (c->right);
mark_case_node (c->left);
}
}
/* Mark G for GC. */
static void