This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bug in dominance algorithm
As I've mentioned in other email, I see why current behaviour is correct.
I am using postdominators to detect conditional branches branching to noreturn
calls.
Noreturn call is seen as block with no succesors and the conditional branch I
can find by edge between block that is not postdominated by call and block
that is.
That way I don't get confused by extra branching before reaching the call.
> But there is a middle way, which is slightly incorrect but IMHO gives more
> interesting information. Suppose the following graph:
>
> A-->C
> | |\
> v v \
> B D-->E-->F
> |
> v
> EXIT
>
> In some way, E could be seen as the immediate postdom of C, and also F
> postdominating C, D and E. The "interesting information" I talked about
> is here, that "no matter which path is taken from C, nodes E and F are
> reached". These kind of questions are the ones which usually are answered
Exactly this kind of behaviour I was somehow implicitly assuming.
> by dominance, so I think this is valuable information, even if strictly
> incorrect. I.e. I would like to mark nodes without successors as being
> invalid for dominance questions, and otherwise provide the "dominators"
> and, may be, a way to distinguish reverse-unreachable node from normal
> ones.
Would be possible to modify algorithm to get this behaviour somehow
easilly?
Honza