This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TREE_SIDE_EFFECTS vs STATEMENT_LIST vs recompute_side_effects


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]