This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [patch] Empty loop removal


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~


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