This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bug in dominance algorithm


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]