Andrew,

Dominance and reachability are two different but related things. It's trivial 
to come up with a simple example to show this.

Gary
________________________________
From: Andrew Pinski <pins...@gmail.com>
Sent: Friday, October 9, 2020 8:13 PM
To: Jojo R <jiejie_r...@c-sky.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: How to check reachable between blocks

On Fri, Oct 9, 2020 at 8:01 PM Jojo R <jiejie_r...@c-sky.com> wrote:
>
> Hi,
>
>         Is there any API or common codes to check any two blocks is reachable 
> ?

Yes the API in dominance.h.
Depending on where you use it, you might need to have it created.
Using calculate_dominance_info function.
The function to do the check is dominated_by_p.

Thanks,
Andrew Pinski


>
> Thanks.
>
> Jojo

Reply via email to