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 ping (1 middle-end, 1 C front-end)


On Tue, 16 Mar 2004, Bonzini wrote:
> Remove a parameter from combine_simplify_rtx (very short)
>    http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00690.html

This is OK for mainline.  However you need to update the comments
above combine_simplify_rtx and simplify_logical now that you've
removed their LAST parameter.  Approved with those changes.

Ideally, I think it would be preferrable to add an additional
check to the problematic "(ior (and X C1) C2)" optimization,
to only perform this transformation if

	(INTVAL (XEXP (op0, 1)) & INTVAL (op1)) != 0

i.e. avoid calling "gen_binary" if the expression is unchanged.
If we were ever to replace these calls with simplify_gen_binary
we could potentially end-up with unbounded recursion.   This
might be one of the original reasons for this "last" parameter,
it also helps typical case performance and memory usage.

Many thanks,

Roger
--


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