This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: TREE_SIDE_EFFECTS vs STATEMENT_LIST vs recompute_side_effects
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: law at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 24 Jun 04 13:36:23 EDT
- Subject: Re: TREE_SIDE_EFFECTS vs STATEMENT_LIST vs recompute_side_effects
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.