This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Local optimization on i386 ?
- To: Marc Espie <espie at quatramaran dot ens dot fr>
- Subject: Re: Local optimization on i386 ?
- From: Jamie Lokier <egcs at tantalophile dot demon dot co dot uk>
- Date: Wed, 1 Dec 1999 00:55:38 +0100
- Cc: law at cygnus dot com, egcs at egcs dot cygnus dot com
- References: <26996.943919594@upchuck> <199911301338.OAA04341@quatramaran.ens.fr>
Marc Espie wrote:
> So this looks like a misoptimization bug...
> Hum... I believe I could coerce gas into peep-holing that :)
>
> Isn't there a peep-hole pass or equivalent in gcc that could handle
> this ?
You think that's bad? Man, count yourself lucky. You should see the
vast swathes of redundant instructions G++ emits for /my/ code.
Redundant stores and loads to local variables. (I'm waiting to see if
Mark Mitchell's tree inlining will solve that -- though I thought the
"addressof" optimisation was supposed to have sorted it out long ago.)
Stores to local variables that are never read, even at the
end of the function. And tons of wasted space in the stack frame -- is
GCC aligning every 4 byte structure to 16 bytes for a reason?
-- Jamie