This is the mail archive of the gcc-patches@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: [PATCH] Fix pattern causing C_MAYBE_CONST_EXPRs leak into gimplifier (PR c/68513)


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


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