This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [lto][patch] Remove after_inlining flag


> On Thu, Oct 16, 2008 at 2:37 PM, Diego Novillo <dnovillo@google.com> wrote:
> > On Thu, Oct 16, 2008 at 08:14, Rafael Espindola <espindola@google.com> wrote:
> >> This flag is causing me troubles trying to run the inliner is
> >> cc1/cc1plus with -flto. I am testing the patch on trunk to get better
> >> coverage. OK for the branch if the tests are OK?
> >>
> >> 2008-10-16 Rafael Espindola  <espindola@google.com>
> >>
> >>        * except.c (reachable_next_level): Don't use cfun->after_inlining.
> >>        * function.h (struct function): Remove after_inlining.
> >>        * tree-inline.c (initialize_cfun): Don't copy cfun->after_inlining.
> >>        (expand_call_inline): Ignore cfun->after_inlining.
> >>        * tree-optimize.c (execute_fixup_cfg): Don't set cfun->after_inlining.
> >>        * tree-ssa-live.c (remove_unused_scope_block_p): Ignore
> >>        cfun->after_inlining.
> >
> > What kind of troubles?  I'm not really sure what this flag is used
> > for, so I can't say whether it's safe to remove.  It doesn't seem that
> > we use it for much, and the places that do use it are not very clear
> > about its purpose.
> >
> > In principle I wouldn't mind removing it, but I would like to
> > understand why exactly.
> >
> > Jan, any insights?
> 
> The tree-ssa-live.c is to avoid divergence in UIDs for -g/-g0 and was
> added by lxo.

This is also done by exception handling.  In rare cases when you can
have function call in MUST_NOT_THROW region and while inlining we need
that EH to connect somewhere.  See code in except.c.  Those extra
receivers then allow inliner to properly wire in the edges.

after_inlining is more in meaning negation of "inlining might happen in
future, so keep stuff inliner needs to be wroking well".  So simply keep
after_inlining clear until end of LTO and set by very last inlining pass
happening at linktime.

Honza
> 
> Richard.


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