Inlining Improvements

Joe Buck jbuck@synopsys.COM
Tue Dec 21 16:08:00 GMT 1999


> Martin v. Loewis wrote:
> > > So we have a situation where the C++ compiler generates better code than
> > > the C compiler from the same source?
> > 
> > It might be possible to create examples. On the average, I doubt that.
> > If it is plain C code that also compiles as C++ code, inlining most
> > likely happens at the same places.
> 
> The point is that tree inlining seems to generate better code than RTL
> inlining which the C compiler currently does.

The RTL inlining happens too late, after some objects have already been
assigned to memory.  Thus passing an automatic struct or C++ class to an
inline function often results in dead stores when the RTL inliner is used.




More information about the Gcc mailing list