This is the mail archive of the
mailing list for the GCC project.
Re: [patch] reload1.c: Very minor speedup.
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Paolo Carlini <pcarlini at suse dot de>
- Cc: Kazu Hirata <kazu at cs dot umass dot edu>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 6 Feb 2004 18:24:31 -0500
- Subject: Re: [patch] reload1.c: Very minor speedup.
- References: <firstname.lastname@example.org> <email@example.com>
On Fri, Feb 06, 2004 at 11:34:43PM +0100, Paolo Carlini wrote:
> >Attached is a patch to micro-optimize the reset of can_eliminate in
> >- if (ep->from_rtx == x && ep->can_eliminate)
> >+ if (ep->from_rtx == x)
> >ep->can_eliminate = 0;
> if you have got two spare minutes, could you possibly explain a bit?
> I mean, it's because the cost of a test (&& ep->can_eliminate) is
> comparable to that of an assignment (ep->can_eliminate = 0), never
> much smaller? Is it true on every architecture?
In fact it was just discussed that sometimes this is not a win,
depending on your target.
It seems to me that this sort of source micro-optimization is not a
MontaVista Software Debian GNU/Linux Developer