On Thu, 26 Sep 2024, Jeff Law wrote:

> 
> 
> On 9/26/24 5:06 AM, Richard Biener wrote:
> > When path isolation performs CFG manipulations (block splitting) it
> > fails to update post-dominators it computes on-demand.  That both
> > runs into dominance verification issues when we compute post-dominators
> > again and possibly accessing missing or broken post-dominance data
> > when checking is disabled.  The following attempts to get rid of
> > post-dominator use by approximating always-executed with dominating
> > function exit instead of post-dominating function entry.  For this to
> > work we have to add fake exit edges.
> > 
> > Bootstrapped and tested on x86_64-unknown-linux-gnu.
> > 
> > I'll push this later if nobody has comments.
> > 
> > Thanks,
> > Richard.
> > 
> >  PR tree-optimization/116850
> >  * gimple-ssa-isolate-paths.cc (warn_return_addr_local): Use
> >  dominance and not post-dominance to compute maybe.
> >  (gimple_ssa_isolate_erroneous_paths): Add/remove fake exit edges.
> > 
> >  * gcc.dg/pr116850.c: New testcase.
> So this phase doesn't really do any CFG manipulations, so I assume you're
> referring to the other parts of path isolation mucking around with the CFG and
> in turn causing mis-beavhior in the warn_return_addr_local path?

I think my work on sanitizing CFG cleanup made it necessary for this phase
to start splitting blocks where it inserts traps() and that causes the 
issue.

> My worry with "approximating always executed" is that we conditionally adjust
> the return statement if !maybe.

Yes, I've realized this and posted a followup instead delaying splitting
the blocks.

Richard.

Reply via email to