[PATCH] Add utility functions to gimplify expressions

Paolo Bonzini paolo.bonzini@polimi.it
Wed Jul 14 17:36:00 GMT 2004


Richard Henderson wrote:

> On Tue, Jul 13, 2004 at 01:05:23PM +0200, Paolo Bonzini wrote:
> 
>>	* tree-cfg.c (gimplify_val): Move from tree-complex.c.
>>	(gimplify_build1): Move from tree-complex.c do_unop.
>>	(gimplify_build2): Move from tree-complex.c do_binop.
>>	(gimplify_build3): New.
>>	* tree-complex.c (gimplify_val, do_unop, do_binop): Remove.
>>	Adjust throughout to call the functions above.
>>	* tree-flow.h: Declare the functions above.
>>	* tree-nested.c (gimplify_val): Rename to...
>>	(tsi_gimplify_val): ... this.  Callers adjusted.

BTW, the reason I moved these functions from tree-complex.c is that they 
may be useful elsewhere (Roger once talked me about using something like 
these to produce GIMPLE in the builtin function folders).

I renamed them because do_unop/do_binop is not a nice name for a public 
function.  Also, the vector patch adds back the names do_unop and 
do_binop in tree-complex.c for a different thing (they are callbacks to 
lower a vector unary and binary operation respectively; I like naming 
callbacks do_something).

Paolo



More information about the Gcc-patches mailing list