On Wed, Nov 25, 2015 at 03:45:08PM +0100, Richard Biener wrote:
> But the whole point of the SAVE_EXPR is that it does _not_ "duplicate" it,
> it just creates another use of the same value.

Of course, but when 'x' in that pattern doesn't have side-effects, it's not
wrapped in SAVE_EXPR and gets duplicated, generating unnecessary code, this
is when I think the pattern is harmful.
 
> No.  If c_fully_fold can't handle SAVE_EXPRs then maybe c_gimplify_expr
> can simply strip them.

Uhm, can we just strip SAVE_EXPRs like that?  That sounds wrong.  Did you
mean C_MAYBE_CONST_EXPR?

        Marek

Reply via email to