[PATCH] replace fold_convert (..., integer_zero_node) with build_zero_cst

Richard Henderson rth@redhat.com
Tue Nov 2 20:48:00 GMT 2010


On 11/02/2010 06:35 AM, Nathan Froyd wrote:
> http://gcc.gnu.org/wiki/Partial_Transitions indicates that it'd be a
> good idea to replace fold_converts of integer_zero_node with
> build_int_cst.  The patch below takes the lazy route of not carefully
> examining every such instance for dealing with integer types only, but
> instead relying on build_zero_cst for dealing with real vs. integer
> vs. fixed, etc.
> 
> In order to avoid making us do:
> 
>   build_zero_cst -> fold_convert -> ... -> build_int_cst
> 
> where we were once doing:
> 
>   fold_convert -> ... -> build_int_cst
> 
> the patch also adds shortcut cases for numerical types, similar to what
> is already done in build_one_cst.


Ok.


r~



More information about the Fortran mailing list