This is the mail archive of the
mailing list for the GCC project.
Re: Question About New Option '-fipa-sra': How Does It Work?
On Tue, Apr 13, 2010 at 17:00, Kevin P. Fleming <email@example.com> wrote:
> Tom Browder wrote:
>> I see the new -fipa-sra option for gcc 4.5 and its explanation and
>> wonder how replacing an argument passed by reference with an argument
>> passed by value is an optimization (I assume something magic is going
>> on behind the scenes).
> Well... a pointer to an int on an x86-64 platform is 8 bytes on the
> stack instead of 4, and slower access to the contents of the int. If the
> int is never modified in the called function, passing a copy of the int
> on the stack instead is clearly a win.
Thanks, Kevin, I was asleep--I immediately thought of structures and
(But perhaps the text could be more explicitly worded for us dense heads.)