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] Fix PR 18965, a c++ and gimplifier fix


Please pull all of this out into a subroutine.

On Thu, Dec 16, 2004 at 09:23:32PM -0500, Andrew Pinski wrote:
> +		  var1 = value;  if value was a SAVE_EXPR

You don't have to create an assignment here.  Just gimplify_and_add
the bare SAVE_EXPR.

> +		    var = var +1;
> +		    if (var > upper) break;

Fails if upper = TYPE_MAX_VALUE (type).  It may or may not be most
efficient if you special case TYPE_MAX_VALUE 

		if (var == upper) goto out;
		var = var + 1;
		goto loop;

or

		old = var;
		var = var + 1;
		if (old == upper) goto out; else goto loop;



r~


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