This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wide-int] Reduce the size of the scratch arrays
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Kenneth Zadeck <zadeck at naturalbridge dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 20 Oct 2013 14:22:21 +0100
- Subject: Re: [wide-int] Reduce the size of the scratch arrays
- Authentication-results: sourceware.org; auth=none
- References: <87wql844kz dot fsf at talisman dot default> <5263D7CA dot 4020801 at naturalbridge dot com>
Kenneth Zadeck <zadeck@naturalbridge.com> writes:
> On 10/20/2013 06:30 AM, Richard Sandiford wrote:
>> If yesterday's patch goes in, we'll only need the scratch array for
>> HWI inputs. We can therefore shrink it to 2 HWIs.
>>
>> Tested on x86_64-linux-gnu. OK for wide-int?
>>
>> Thanks,
>> Richard
>>
>>
>> Index: gcc/wide-int.h
>> ===================================================================
>> --- gcc/wide-int.h 2013-10-19 20:08:15.571987579 +0100
>> +++ gcc/wide-int.h 2013-10-19 20:09:12.299436972 +0100
>> @@ -778,7 +778,7 @@ struct wide_int_ref_storage : public wi:
>> private:
>> /* Scratch space that can be used when decomposing the original integer.
>> It must live as long as this object. */
>> - HOST_WIDE_INT scratch[WIDE_INT_MAX_ELTS];
>> + HOST_WIDE_INT scratch[2];
>>
>> public:
>> template <typename T>
> we now allow partial int precisions that are any size. this will break
> that.
Note that this was only "if yesterday's patch goes in". That patch removes
the use of the scratch array from the tree decompose routine. We already
removed the scratch array from the rtx decompose routine. So the only
decompose routines left that need scratch space are those for pure HWI inputs.
Thanks,
Richard