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]

[PATCH] Share int_cst nodes


Nathan Sidwell writes:
 > Hi,
 > This patch implements sharing of small INTEGER_CST nodes.  Measurement
 > has shown improvement on a large (preprocessed) c++ file.  Allocated
 > memory was reduced by 1MB (~3%) and compilation time improved by ~1.5%.
 > I have not tuned the size of the integer cache, earlier measurements shows
 > that the sweetspot is probably in the range 32..128.
 > 
 > The cache is implemented by hanging a TREE_VEC off the TYPE_VALUES field
 > of integer & pointer types.  This was only used for TYPE_ORIG_SIZE_TYPE,
 > and that information is now placed in the TREE_TYPE of this new TREE_VEC.
 > I added a TYPE_CACHED_VALUES_P flag, so other places know to clear the
 > cache when copying a type.
 > 
 > I've inverted java's RADIX10 flag, so that more nodes can be shared there.

No objection from me.

Andrew.


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