aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-gimple.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-06-30 17:01:23 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-06-30 17:01:23 -0700
commit2b9ef4fa61d2ad90cbca7baa59ce18f609a56274 (patch)
tree15e0d7f1b9088b09a8c4a105e75791fa3a879647 /gcc/tree-gimple.c
parent521d8de07f181a54b31b6660b5dc55c76f390ff8 (diff)
downloadgcc-2b9ef4fa61d2ad90cbca7baa59ce18f609a56274.zip
gcc-2b9ef4fa61d2ad90cbca7baa59ce18f609a56274.tar.gz
gcc-2b9ef4fa61d2ad90cbca7baa59ce18f609a56274.tar.bz2
tree-gimple.c (right_assocify_expr): Kill
* tree-gimple.c (right_assocify_expr): Kill (rationalize_compound_expr): Kill. * tree-gimple.h: Likewise. * tree-inline.c (expand_call_inline): Don't call it. From-SVN: r83940
Diffstat (limited to 'gcc/tree-gimple.c')
-rw-r--r--gcc/tree-gimple.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/gcc/tree-gimple.c b/gcc/tree-gimple.c
index b1f08df..4d209ec 100644
--- a/gcc/tree-gimple.c
+++ b/gcc/tree-gimple.c
@@ -524,76 +524,6 @@ get_call_expr_in (tree t)
return NULL_TREE;
}
-
-/* Given an _EXPR TOP, reorganize all of the nested _EXPRs with the same
- code so that they only appear as the second operand. This should only
- be used for tree codes which are truly associative, such as
- COMPOUND_EXPR and TRUTH_ANDIF_EXPR. Arithmetic is not associative
- enough, due to the limited precision of arithmetic data types.
-
- This transformation is conservative; the operand 0 of a matching tree
- node will only change if it is also a matching node. */
-
-tree
-right_assocify_expr (tree top)
-{
- tree *p = &top;
- enum tree_code code = TREE_CODE (*p);
- while (TREE_CODE (*p) == code)
- {
- tree cur = *p;
- tree lhs = TREE_OPERAND (cur, 0);
- if (TREE_CODE (lhs) == code)
- {
- /* There's a left-recursion. If we have ((a, (b, c)), d), we
- want to rearrange to (a, (b, (c, d))). */
- tree *q;
-
- /* Replace cur with the lhs; move (a, *) up. */
- *p = lhs;
-
- if (code == COMPOUND_EXPR)
- {
- /* We need to give (b, c) the type of c; previously lhs had
- the type of b. */
- TREE_TYPE (lhs) = TREE_TYPE (cur);
- if (TREE_SIDE_EFFECTS (cur))
- TREE_SIDE_EFFECTS (lhs) = 1;
- }
-
- /* Walk through the op1 chain from there until we find something
- with a different code. In this case, c. */
- for (q = &TREE_OPERAND (lhs, 1); TREE_CODE (*q) == code;
- q = &TREE_OPERAND (*q, 1))
- TREE_TYPE (*q) = TREE_TYPE (cur);
-
- /* Change (*, d) into (c, d). */
- TREE_OPERAND (cur, 0) = *q;
-
- /* And plug it in where c used to be. */
- *q = cur;
- }
- else
- p = &TREE_OPERAND (cur, 1);
- }
- return top;
-}
-
-/* Normalize the statement TOP. If it is a COMPOUND_EXPR, reorganize it so
- that we can traverse it without recursion. If it is null, replace it
- with a nop. */
-
-tree
-rationalize_compound_expr (tree top)
-{
- if (top == NULL_TREE)
- top = build_empty_stmt ();
- else if (TREE_CODE (top) == COMPOUND_EXPR)
- top = right_assocify_expr (top);
-
- return top;
-}
-
/* Given a memory reference expression, return the base address. Note that,
in contrast with get_base_var, this will not recurse inside INDIRECT_REF
expressions. Therefore, given the reference PTR->FIELD, this function