This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] replace fold_convert (..., integer_zero_node) with build_zero_cst
- From: Richard Henderson <rth at redhat dot com>
- To: Nathan Froyd <froydnj at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Tue, 02 Nov 2010 13:47:21 -0700
- Subject: Re: [PATCH] replace fold_convert (..., integer_zero_node) with build_zero_cst
- References: <20101102133508.GA26083@nightcrawler>
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.