Commit f5938dcd by Richard Guenther Committed by Richard Biener

ggc-page.c (extra_order_size_tab): Add entries with size of struct function and basic_block.

2006-06-19  Richard Guenther  <rguenther@suse.de>

	* ggc-page.c (extra_order_size_tab): Add entries with
	size of struct function and basic_block.
	(size_lookup): Extend to cover sizes up to 511.
	(ggc_alloc_stat): Adjust user.
	(ggc_pch_count_object): Likewise.
	(ggc_pch_alloc_object): Likewise.
	(ggc_pch_write_object): Likewise.

From-SVN: r114783
parent 20fb52af
2006-06-19 Richard Guenther <rguenther@suse.de>
* ggc-page.c (extra_order_size_tab): Add entries with
size of struct function and basic_block.
(size_lookup): Extend to cover sizes up to 511.
(ggc_alloc_stat): Adjust user.
(ggc_pch_count_object): Likewise.
(ggc_pch_alloc_object): Likewise.
(ggc_pch_write_object): Likewise.
2006-06-19 Zdenek Dvorak <dvorakz@suse.cz> 2006-06-19 Zdenek Dvorak <dvorakz@suse.cz>
* tree-ssa-loop-niter.c (implies_ge_p): New function. * tree-ssa-loop-niter.c (implies_ge_p): New function.
......
...@@ -191,6 +191,8 @@ static const size_t extra_order_size_table[] = { ...@@ -191,6 +191,8 @@ static const size_t extra_order_size_table[] = {
sizeof (struct tree_parm_decl), sizeof (struct tree_parm_decl),
sizeof (struct tree_var_decl), sizeof (struct tree_var_decl),
sizeof (struct tree_list), sizeof (struct tree_list),
sizeof (struct function),
sizeof (struct basic_block_def),
TREE_EXP_SIZE (2), TREE_EXP_SIZE (2),
RTL_SIZE (2), /* MEM, PLUS, etc. */ RTL_SIZE (2), /* MEM, PLUS, etc. */
RTL_SIZE (9), /* INSN */ RTL_SIZE (9), /* INSN */
...@@ -1022,7 +1024,7 @@ release_pages (void) ...@@ -1022,7 +1024,7 @@ release_pages (void)
/* This table provides a fast way to determine ceil(log_2(size)) for /* This table provides a fast way to determine ceil(log_2(size)) for
allocation requests. The minimum allocation size is eight bytes. */ allocation requests. The minimum allocation size is eight bytes. */
static unsigned char size_lookup[257] = static unsigned char size_lookup[511] =
{ {
3, 3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 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
}; };
/* Typed allocation function. Does nothing special in this collector. */ /* Typed allocation function. Does nothing special in this collector. */
...@@ -1061,14 +1078,14 @@ ggc_alloc_stat (size_t size MEM_STAT_DECL) ...@@ -1061,14 +1078,14 @@ ggc_alloc_stat (size_t size MEM_STAT_DECL)
struct page_entry *entry; struct page_entry *entry;
void *result; void *result;
if (size <= 256) if (size < 512)
{ {
order = size_lookup[size]; order = size_lookup[size];
object_size = OBJECT_SIZE (order); object_size = OBJECT_SIZE (order);
} }
else else
{ {
order = 9; order = 10;
while (size > (object_size = OBJECT_SIZE (order))) while (size > (object_size = OBJECT_SIZE (order)))
order++; order++;
} }
...@@ -2023,11 +2040,11 @@ ggc_pch_count_object (struct ggc_pch_data *d, void *x ATTRIBUTE_UNUSED, ...@@ -2023,11 +2040,11 @@ ggc_pch_count_object (struct ggc_pch_data *d, void *x ATTRIBUTE_UNUSED,
{ {
unsigned order; unsigned order;
if (size <= 256) if (size < 512)
order = size_lookup[size]; order = size_lookup[size];
else else
{ {
order = 9; order = 10;
while (size > OBJECT_SIZE (order)) while (size > OBJECT_SIZE (order))
order++; order++;
} }
...@@ -2068,11 +2085,11 @@ ggc_pch_alloc_object (struct ggc_pch_data *d, void *x ATTRIBUTE_UNUSED, ...@@ -2068,11 +2085,11 @@ ggc_pch_alloc_object (struct ggc_pch_data *d, void *x ATTRIBUTE_UNUSED,
unsigned order; unsigned order;
char *result; char *result;
if (size <= 256) if (size < 512)
order = size_lookup[size]; order = size_lookup[size];
else else
{ {
order = 9; order = 10;
while (size > OBJECT_SIZE (order)) while (size > OBJECT_SIZE (order))
order++; order++;
} }
...@@ -2097,11 +2114,11 @@ ggc_pch_write_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED, ...@@ -2097,11 +2114,11 @@ ggc_pch_write_object (struct ggc_pch_data *d ATTRIBUTE_UNUSED,
unsigned order; unsigned order;
static const char emptyBytes[256]; static const char emptyBytes[256];
if (size <= 256) if (size < 512)
order = size_lookup[size]; order = size_lookup[size];
else else
{ {
order = 9; order = 10;
while (size > OBJECT_SIZE (order)) while (size > OBJECT_SIZE (order))
order++; order++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment