For whoever is concerned about memory usage, I didn't measure a real
increase, besides a few KB. These are very hot allocation pools and
allocating too many blocks of 10 elements is suboptimal.
2011-08-22 Dimitrios Apostolou <ji...@gmx.net>
* cselib.c (cselib_init): Increased initial size of elt_list_pool,
elt_loc_list_pool, cselib_val_pool, value_pool allocation pools
since they are very frequently used.
=== modified file 'gcc/cselib.c'
--- gcc/cselib.c 2011-05-31 19:14:21 +0000
+++ gcc/cselib.c 2011-08-17 14:03:56 +0000
@@ -2484,12 +2484,12 @@ void
cselib_init (int record_what)
{
elt_list_pool = create_alloc_pool ("elt_list",
- sizeof (struct elt_list), 10);
+ sizeof (struct elt_list), 128);
elt_loc_list_pool = create_alloc_pool ("elt_loc_list",
- sizeof (struct elt_loc_list), 10);
+ sizeof (struct elt_loc_list), 128);
cselib_val_pool = create_alloc_pool ("cselib_val_list",
- sizeof (cselib_val), 10);
- value_pool = create_alloc_pool ("value", RTX_CODE_SIZE (VALUE), 100);
+ sizeof (cselib_val), 128);
+ value_pool = create_alloc_pool ("value", RTX_CODE_SIZE (VALUE), 128);
cselib_record_memory = record_what & CSELIB_RECORD_MEMORY;
cselib_preserve_constants = record_what & CSELIB_PRESERVE_CONSTANTS;