This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Dce & infinite loops
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Steven Bosscher <stevenb at suse dot de>
- Cc: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 18 Mar 2004 09:31:39 -0500
- Subject: Re: [tree-ssa] Dce & infinite loops
- Organization: Red Hat Canada
- References: <20040318122130.GA24448@atrey.karlin.mff.cuni.cz> <200403181331.57192.stevenb@suse.de>
On Thu, 2004-03-18 at 07:31, Steven Bosscher wrote:
> Removing an infinte loop is indeed wrong. Hence this comment
> in tree-ssa-dce.c:
>
> /* Some blocks don't have an immediate post dominator. This can happen
> for example with infinite loops. Removing an infinite loop is an
> inappropriate transformation anyway... */
>
> If we remove that infinite loop, you found a bug.
>
I've always hated this custom. Is this a language mandate? Or just
"we've always done it this way"? Why not tell the user to use a
volatile index variable if they want the infinite loop?
Diego.