This is the mail archive of the gcc@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]

Re: Local optimization on i386 ?


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


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