This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bug in dominance algorithm
- To: Jan Hubicka <jh at suse dot cz>
- Subject: Re: bug in dominance algorithm
- From: Michael Matz <matzmich at cs dot tu-berlin dot de>
- Date: Fri, 15 Jun 2001 15:12:07 +0200 (MET DST)
- cc: Richard Henderson <rth at redhat dot com>, <gcc at gcc dot gnu dot org>
Ho,
On Fri, 15 Jun 2001, Jan Hubicka wrote:
> 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.
Ok.
> > 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?
As said, it currently works in exactly this way for the postdom case
(although I need to check to be really sure, it's some time since I wrote
the code), except that to support the old behaviour everything is screwed
up afterwards. On the weekend I'll try to add another function providing
this information without emulating the old behaviour. But note, that you
still have two cases:
The interesting edge: A--e-->B
1) B itself is already the noreturn block, for this case no postdominance
information can be used.
2) B is the entry to a noreturn section (i.e. B is postdominated by a
noreturn block, without being one itself), for this dominance info in
the above way can be used.
Ciao,
Michael.