This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] single_succ/pred
- From: Geert Bosch <bosch at adacore dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Mar 2005 12:06:04 -0500
- Subject: Re: [patch] single_succ/pred
- References: <20050310160727.GA17725@atrey.karlin.mff.cuni.cz>
Hi Zdenek,
Nice cleanup, makes the code much easier to read!
One minor nit though. The comments for single_succ_edge,
single_pred_edge,
single_succ and single_pred do not indicated whether the function
requires
that BB has a single successor/predecessor. For the edge case, this is
immediately clear from the assert just below, but this is not the case
for single_succ and single_pred.
From your message I gather it is an error if the passed BB has more
than one successor/predecessor for single_succ and single_pred
respectively,
but this is hard to derive from the code. Could you add a comment
about this?
Also, shouldn't we have asserts for these (at least for the
enable_checking case)?
-Geert