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/gfortran] PR18283


Paul Thomas wrote:
>  > ! tmp = fold_build2 (MINUS_EXPR, gfc_charlen_type_node, len,
>  > ! convert (gfc_charlen_type_node, integer_one_node));
> 
> build_int_cst (gfc_charlen_type_node, 1)
> 
>  > ! tmp = build_range_type (gfc_array_index_type, gfc_index_zero_node,
> 
> The convert is indeed all over the place in that file; in fact I cut and 
> paste it from a few lines away What is your reason for preferring to 
> replace it with build_int_cst (type, value)?  On the face of it, I would 
> have thought that the convert is better.

That is because the constants created with build_int_cst are shared, so we
don't get a new tree everytime this code is run.

- Tobi


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