This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Inlining Improvements
- To: jamie dot lokier at cern dot ch (Jamie Lokier)
- Subject: Re: Inlining Improvements
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Tue, 21 Dec 99 16:06:05 PST
- Cc: martin at loewis dot home dot cs dot tu-berlin dot de, osken393 at student dot liu dot se, gcc at gcc dot gnu dot org
> 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.