TREE_SIDE_EFFECTS vs STATEMENT_LIST vs recompute_side_effects
Richard Henderson
rth@redhat.com
Thu Jun 24 17:55:00 GMT 2004
On Thu, Jun 24, 2004 at 11:30:49AM -0600, Jeffrey A Law wrote:
> 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.
Sure.
> That seems awfully wrong. In gimple, COND_EXPRs shouldn't have any
> side effects whatsoever.
Disagree.
> Particularly since the STATEMENT_LISTS
> hanging off the COND_EXPR are going to be broken off into distinct
> statements during the lowering process.
Sure, but the GOTO_EXPRs that will replace the STATEMENT_LISTs
*also* have side effects. The side effect is a control transfer.
The argument is true as a whole for the COND_EXPR both before and
after the lowering.
What is the deeper issue?
r~
More information about the Gcc
mailing list