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: Inlining Improvements


> 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.



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