TREE_SIDE_EFFECTS vs STATEMENT_LIST vs recompute_side_effects
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Thu Jun 24 17:52:00 GMT 2004
Then we call recompute_side_effects on the toplevel COND_EXPR
node. Since the attached STATEMENT_LIST nodes have TREE_SIDE_EFFECTS
set we set TREE_SIDE_EFFECTS on the COND_EXPR node itself.
That seems awfully wrong. In gimple, COND_EXPRs shouldn't have any
side effects whatsoever. Particularly since the STATEMENT_LISTS
hanging off the COND_EXPR are going to be broken off into distinct
statements during the lowering process.
I don't see why it matter what it's set to at that point since it
isn't going to stay that way. The STATEMENT_LIST operand should
be replaced at some point by GOTO_EXPRs, right? At that point,
side effects should again be recomputed, but now should also be on
by virtue of the operand being a GOTO_EXPR.
It would seem to me that TREE_SIDE_EFFECTS *must* be on or
append_to_statement_lit will discard it.
More information about the Gcc
mailing list