This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: LTO and the inlining of functions only called once.
On Sat, 10 Oct 2009, Diego Novillo wrote:
> On Sat, Oct 10, 2009 at 11:17, Daniel Jacobowitz <drow@false.org> wrote:
> > On Sat, Oct 10, 2009 at 02:31:25PM +0200, Jan Hubicka wrote:
> >> My solution would be probably to pass -fdump-ipa-inline parameter to lto
> >> compilation and read the log. ÂIt lists the inlining decisions and if
> >> something is not inlined, you get dump of reason why.
> >
> > GCC's dumps are really aimed at compiler developers. ÂI think we would
> > benefit from more "what is the compiler doing to my code" options
> > (producing "note:"); things like which functions were inlined, which
> > loops unrolled. ÂWe do already have this for vectorization.
>
> Agreed. We've had some discussions on this and there's been some
> efforts started (http://gcc.gnu.org/wiki/Pass%20Activity%20Log), but
> nothing concrete so far.
>
> We should evolve a generic reporting facility for passes to produce
> human readable logs on what they did, what they couldn't do, reasons,
> etc.
We should also keep in mind that such logs aimed at users should support
i18n - unlike the existing dumps for compiler developers, which are quite
properly English only, and most calls to internal_error which should only
appear if there is a compiler bug and are also only meant to be useful for
compiler developers (so represent useless work for translators at present
- though it does seem possible some internal_error calls could actually
appear with invalid input rather than compiler bugs and so should be
normal errors).
If you're generating "note:" via inform(), the i18n support is automatic.
--
Joseph S. Myers
joseph@codesourcery.com