On Fri, Mar 15, 2019 at 09:46:33AM +0100, Richard Biener wrote:
> On Fri, 15 Mar 2019, Jakub Jelinek wrote:
> 
> > On Fri, Mar 15, 2019 at 09:22:26AM +0100, Richard Biener wrote:
> > > That said, I think we can go with my patch for GCC 9 and defer a more
> > > complete and elaborate solution to GCC 10 (where I'd still prefer
> > > sth simple).
> > > 
> > > What do you think?
> > 
> > Ok.  gimple_purge_dead_abnormal_call_edges after all isn't that expensive,
> > it just walks over all successor edges of a bb.
> > Right now gimple_purge_all_dead_abnormal_call_edges is only called by
> > sccvn on specific bbs that do need ab cleanup, tree-inline.c calls
> > gimple_purge_dead_abnormal_call_edges only if it is inlining a call at the
> > end of a bb and tree-cfg.c calls it for const/pure calls.
> > 
> > In that last case, I wonder if we actually shouldn't do following, because
> > it makes no sense to call it for each constant/pure call in a bb when all we
> > care about is whether it is the last stmt that is a pure/const call.
> 
> Sure.  Though I think with us now having gimple_call_set_ctrl_altering
> execute_fixup_cfg can be stripped down considerably - possibly simply
> leaving most parts to CFG cleanup.  The noreturn fixup is still
> required if a call becomes known to not return (CFG cleanup only
> looks at the last stmt), but gimple_purge_dead_abnormal_call_edges can
> be completely elided IMHO (just schedule CFG cleanup).

The CFG cleanup never calls gimple_purge_dead_abnormal_call_edges though.
Do we ever update gimple_call_ctrl_altering_p flag if something changes?

        Jakub

Reply via email to