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: surprising optimization results


> Date: Sun, 15 Aug 1999 00:46:08 -0700
> From: Paul Burchard <burchard@pobox.com>

> Inlines which call and return by value (even struct value) are
> showing up consistently faster in my tests than the equivalent
> inlines which call and return using non-const reference args (gcc
> configuration below).  Assuming this is a real effect, it is
> surprising to me -- but perhaps not to those more familiar with
> gcc's optimization strategies (maybe by-value makes alias analysis
> easier?).

:-) Predictable.  Glad you noticed the cool codegen strategies in the
compiler.  I think the one you are observing are the results of
ADDRESSOF.  References kill a bit of optimizability, though the limits
of what the compiler can and can't do are pushed farther out every now
and then.

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