This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Empty loop removal
- From: Richard Henderson <rth at redhat 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: Wed, 6 Jul 2005 12:43:24 -0700
- Subject: Re: [patch] Empty loop removal
- References: <20050630214110.GA15576@atrey.karlin.mff.cuni.cz>
On Thu, Jun 30, 2005 at 11:41:10PM +0200, Zdenek Dvorak wrote:
> + case ASM_EXPR:
> + free (body);
> + return false;
Only volatile asms need be preserved.
> + /* First, all subloops must be removed. */
> + for (sub = loop->inner; sub; sub = sub->next)
> + {
> + if (try_remove_empty_loop (sub))
> + changed = true;
> + else
> + all = false;
> + }
This is incorrect. As written, try_remove_empty_loop returns true if
there are *any* changes beneath it. It does not return a unique value
when it actually removed the given loop.
Otherwise this looks ok.
r~