https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78812

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to rguent...@suse.de from comment #6)
> On Fri, 16 Dec 2016, jakub at gcc dot gnu.org wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78812
> > 
> > --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> > (In reply to Richard Biener from comment #4)
> > > Can't we insert on the edge and commit edge insertions late?  Or simply
> > > split the block for this case?
> > 
> > Well, for the case of calls there typically are 2 edges, not just one (the
> > abnormal one and normal fallthru), except for noreturn throwing calls.
> > So inserting on the edges would usually mean undoing the hoisting.
> > Note if the expression doesn't contain MEM (and isn't clobbered by the call,
> > but that should just affect hard registers), hoisting it before the call is
> > just fine.
> 
> But then sth is wrong with the dataflow problem ... maybe it somehow
> assumes that a signle outgoing edge is always fallthru (and not EH)?
> That is, inserting on EH edges is "tricky" at best...

Dunno, haven't looked into it in detail.  The hoisting has been from 2 spots,
one after the call's fallthrough and another from the EH landing pad of the
call (which is why emitting the expression after the call's fallthrough and
duplicating after the EH landing pad would effectively undo the optimization).

Reply via email to