[PATCH] Gimplify result of ccp_fold_builtin if not already gimple

Paolo Bonzini bonzini@gnu.org
Tue Sep 21 08:17:00 GMT 2004


> -	  if (set_rhs (stmtp, result))
> -	    modify_stmt (*stmtp);
> +	  if (!set_rhs (stmtp, result))
> +	    {
> +	      result = convert_to_gimple_builtin (&i, result);
> +	      if (result && !set_rhs (stmtp, result))
> +		abort ();
> +	    }

Maybe this snippet is worth building a separate function, as in 
gimplify_and_set_rhs?  Nothing in set_rhs (in tree-ssa-propagate.c) 
seems to be dependent on the value propagation engine.

Roger, you had in mind something like that, hadn't you?  Jakub, you 
could do it in take 2 or if you want I can prepare the patch once this 
one is in.

Paolo



More information about the Gcc-patches mailing list