This is the mail archive of the 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]
Other format: [Raw text]

Re: inlining inefficiencies

Hi Dan,

On Wed, May 29, 2002 at 10:31:46PM -0700, Dan Nicolaescu wrote:
> Andreas Jaeger <> writes:
>   > Can you have a look at Kurt Garloff's patches which have been
>   > discussed here some weeks agao?  A current version is at
>   >
> Those patches deal with deciding what functions to inline. 
> What I've shown is that the code generated after inlining all the
> functions (desired in that case) is inefficient and the optimizers
> can't deal with it.

The problem that I spotted in gcc is that it's unable to remove 
temporaries too often. I have some Matrix class whose [] operator
return a temporary object, basically having a pointer to the 
Matrix and the information which line was selected. This can
be used to create a Vector or an element with a second [] and
the temporary should be removed by the compiler.

The EDG compilers succeed doing so, gcc not :-(

Somebody want some demo code?

Kurt Garloff  <>                          Eindhoven, NL
GPG key: See mail header, key servers         Linux kernel development
SuSE Linux AG, Nuernberg, DE                            SCSI, Security

Attachment: msg02841/pgp00000.pgp
Description: PGP signature

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