This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA][PATCH][PR middle-end/61118] Improve tree CFG accuracy for setjmp/longjmp
On 03/07/2018 05:04 PM, Peter Bergner wrote:
> On 3/7/18 12:01 AM, Jeff Law wrote:
>> I believe so by nature that the setjmp dominates the longjmp sites and
>> thus also dominates the dispatcher. But it's something I want to
>> explicitly check before resubmitting.
>
> Are we sure a setjmp has to dominate its longjmp sites? Couldn't you
> have something like:
>
> bb(a): bb(b):
> ... ...
> setjmp (env) setjmp (env)
> \ /
> \ /
> \ /
> \ /
> \ /
> \ /
> bb(c):
> ...
> longjmp (env)
>
> ...or:
>
> bb(a):
> ...
> setjmp (env)
> |\
> | \
> | \
> | \
> | bb(b):
> | ...
> | setjmp (env)
> | /
> | /
> | /
> v
> bb(c):
> ...
> longjmp (env)
>
> If so, then the setjmp calls might not dominate the longjmp call.
Right. This is one of the cases that needs investigation WRT the value
that would flow into the PHI from the dispatcher.
Jeff