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]
Other format: [Raw text]

Re: inlining inefficiencies


Kurt Garloff wrote:

>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?
>
IMO it would be very interesting if you could post some demo code and a 
detailed comparison between the generated assembly. Probably, you should 
also file a PR, to make sure this information will not get lost.

Ciao, Paolo.


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