c-common.c (walk_stmt_tree): Remove.

* c-common.c (walk_stmt_tree): Remove.
	* c-common.h: Remove the corresponding prototype.

From-SVN: r90618
This commit is contained in:
Kazu Hirata 2004-11-14 12:53:30 +00:00 committed by Kazu Hirata
parent 6b870fa9f4
commit 29eb4ac9ad
3 changed files with 5 additions and 71 deletions

View File

@ -1,3 +1,8 @@
2004-11-14 Kazu Hirata <kazu@cs.umass.edu>
* c-common.c (walk_stmt_tree): Remove.
* c-common.h: Remove the corresponding prototype.
2004-11-13 Richard Henderson <rth@redhat.com>
* calls.c (precompute_register_parameters): Force all PARALLELs

View File

@ -3398,76 +3398,6 @@ strip_pointer_operator (tree t)
return t;
}
/* Walk the statement tree, rooted at *tp. Apply FUNC to all the
sub-trees of *TP in a pre-order traversal. FUNC is called with the
DATA and the address of each sub-tree. If FUNC returns a non-NULL
value, the traversal is aborted, and the value returned by FUNC is
returned. If FUNC sets WALK_SUBTREES to zero, then the subtrees of
the node being visited are not walked.
We don't need a without_duplicates variant of this one because the
statement tree is a tree, not a graph. */
tree
walk_stmt_tree (tree *tp, walk_tree_fn func, void *data)
{
enum tree_code code;
int walk_subtrees;
tree result;
int i, len;
#define WALK_SUBTREE(NODE) \
do \
{ \
result = walk_stmt_tree (&(NODE), func, data); \
if (result) \
return result; \
} \
while (0)
/* Skip empty subtrees. */
if (!*tp)
return NULL_TREE;
/* Skip subtrees below non-statement nodes. */
if (!STATEMENT_CODE_P (TREE_CODE (*tp)))
return NULL_TREE;
/* Call the function. */
walk_subtrees = 1;
result = (*func) (tp, &walk_subtrees, data);
/* If we found something, return it. */
if (result)
return result;
/* FUNC may have modified the tree, recheck that we're looking at a
statement node. */
code = TREE_CODE (*tp);
if (!STATEMENT_CODE_P (code))
return NULL_TREE;
/* Visit the subtrees unless FUNC decided that there was nothing
interesting below this point in the tree. */
if (walk_subtrees)
{
/* Walk over all the sub-trees of this operand. Statement nodes
never contain RTL, and we needn't worry about TARGET_EXPRs. */
len = TREE_CODE_LENGTH (code);
/* Go through the subtrees. We need to do this in forward order so
that the scope of a FOR_EXPR is handled properly. */
for (i = 0; i < len; ++i)
WALK_SUBTREE (TREE_OPERAND (*tp, i));
}
/* Finally visit the chain. This can be tail-recursion optimized if
we write it this way. */
return walk_stmt_tree (&TREE_CHAIN (*tp), func, data);
#undef WALK_SUBTREE
}
/* Used to compare case labels. K1 and K2 are actually tree nodes
representing case labels, or NULL_TREE for a `default' label.
Returns -1 if K1 is ordered before K2, -1 if K1 is ordered after

View File

@ -299,7 +299,6 @@ extern tree pop_stmt_list (tree);
extern tree add_stmt (tree);
extern void push_cleanup (tree, tree, bool);
extern tree walk_stmt_tree (tree *, walk_tree_fn, void *);
extern int c_expand_decl (tree);
extern int field_decl_cmp (const void *, const void *);