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: [wide-int] Reduce the size of the scratch arrays


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.

kenny


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