Still missing some addr_expr invariant recomputations
Richard Henderson
rth@redhat.com
Mon Sep 13 20:35:00 GMT 2004
On Mon, Sep 13, 2004 at 09:15:26PM +0200, Steven Bosscher wrote:
> *************** eliminate_redundant_computations (struct
> *** 2451,2456 ****
> --- 2452,2461 ----
> retval = true;
>
> propagate_tree_value (expr_p, cached_lhs);
> +
> + if (TREE_CODE (cached_lhs) == ADDR_EXPR)
> + recompute_tree_invarant_for_addr_expr (*expr_p);
> +
> modify_stmt (stmt);
> }
> return retval;
> *************** cprop_operand (tree stmt, use_operand_p
> *** 2674,2679 ****
> --- 2679,2687 ----
>
> propagate_value (op_p, val);
>
> + if (TREE_CODE (val) == ADDR_EXPR)
> + recompute_tree_invarant_for_addr_expr (val);
> +
> /* And note that we modified this statement. This is now
> safe, even if we changed virtual operands since we will
> rescan the statement and rewrite its operands again. */
I don't understand these. In both cases isn't the ADDR_EXPR
the thing being propagated, not the destination?
> + rhs = get_rhs (stmt);
> + if (rhs && TREE_CODE (rhs) == ADDR_EXPR)
> + recompute_tree_invarant_for_addr_expr (rhs);
I suspect this is the only hunk that does anything. And it'd be
nice to only do this when we actually substituted something in
this statement, rather than every time this statement is processed.
r~
More information about the Gcc
mailing list