Commit 84cce55d by Richard Henderson Committed by Richard Henderson

re PR tree-optimization/10528 (Unexpected loop un-optimization when removing a field of a class)

        PR tree-opt/10528
        * tree-inline.c (copy_body_r): Recompute bits for ADDR_EXPR,
        after copying its argument.

From-SVN: r87423
parent 40b7c2f8
2004-09-13 Richard Henderson <rth@redhat.com>
PR tree-opt/10528
* tree-inline.c (copy_body_r): Recompute bits for ADDR_EXPR,
after copying its argument.
2004-09-13 Joseph S. Myers <jsm@polyomino.org.uk> 2004-09-13 Joseph S. Myers <jsm@polyomino.org.uk>
* c-common.c, c-decl.c, c-lex.c, c-objc-common.c, c-opts.c, * c-common.c, c-decl.c, c-lex.c, c-objc-common.c, c-opts.c,
......
...@@ -619,6 +619,16 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data) ...@@ -619,6 +619,16 @@ copy_body_r (tree *tp, int *walk_subtrees, void *data)
TREE_OPERAND (*tp, 1) = TREE_OPERAND (*tp, 3); TREE_OPERAND (*tp, 1) = TREE_OPERAND (*tp, 3);
TREE_OPERAND (*tp, 3) = NULL_TREE; TREE_OPERAND (*tp, 3) = NULL_TREE;
} }
/* Variable substitution need not be simple. In particular, the
INDIRECT_REF substitution above. Make sure that TREE_CONSTANT
and friends are up-to-date. */
else if (TREE_CODE (*tp) == ADDR_EXPR)
{
walk_tree (&TREE_OPERAND (*tp, 0), copy_body_r, id, NULL);
recompute_tree_invarant_for_addr_expr (*tp);
*walk_subtrees = 0;
}
} }
/* Keep iterating. */ /* Keep iterating. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment