This is the mail archive of the
mailing list for the GCC project.
Re: [lto][patch] Move the call to execute_all_ipa_transforms to cgraphunit.c
> > How you reorganize the IPA passes? It seems that in current
> > organization of compiler we realy should stay with one block of early
> > local passes followed by all the IPA/LTO followed by one block of late
> > passes + RTL. In this scheme we should never need more than one
> > fixup_cfg on the beggining of last block.
> I am trying to run the inliner in lgen to remove the extern inline
> functions before writing IL to disk.
This should be realitvely easy to do if you schedule one IPA_INLINE pass
followed by local passes queue containing only fixup_cfg (fixup_cfg is
cleaning up after inlining too) before you cgraph output. The local
passes will make passsmanager to apply inliner's transformations and you
should end up with consistent cfgs.
In general I am not opposed of doing IPA passes at compilation time to
optimize what we get into lto object files. Problem of early inlining
is that it does not have idea of the whole program size and thus can't
do too informed decisions compared to the IPA inliner. Often when A
calls B and B calls C it is not clear whether A->B should be inlined or
B->C or both. If B and C lie in different unit then A we could prevent
the more useful inliing. We already have early inliner handling the
code size reducing (and thus safe) cases.
It seems that most correct approach would be to turn extern inline
functions into static functions before LTO and have pass that will
redirect the calls of noninlined bodies to the non-extern inline body
(or external call) after inlining. This way we don't lose
> Rafael Avila de Espindola
> Google | Gordon House | Barrow Street | Dublin 4 | Ireland
> Registered in Dublin, Ireland | Registration Number: 368047