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


    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.


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