This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: surprising optimization results
- To: burchard@pobox.com, gcc@gcc.gnu.org
- Subject: Re: surprising optimization results
- From: Mike Stump <mrs@wrs.com>
- Date: Mon, 16 Aug 1999 10:42:39 -0700 (PDT)
> 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.