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: Richard Henderson <rth at redhat dot com>
- To: Jeffrey A Law <law at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 24 Jun 2004 10:52:02 -0700
- Subject: Re: TREE_SIDE_EFFECTS vs STATEMENT_LIST vs recompute_side_effects
- References: <1088098249.2772.49.camel@speedy>
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~