This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GC special object sizes
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: Geoff Keating <geoffk at geoffk dot org>, dnovillo at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 30 Apr 2003 17:46:25 +0200
- Subject: Re: GC special object sizes
- References: <1051633938.7385.68.camel@steven><jm7k9d6tq9.fsf@desire.geoffk.org> <1051641364.7385.80.camel@steven>
Op di 29-04-2003, om 20:36 schreef Steven Bosscher:
> Op di 29-04-2003, om 20:31 schreef Geoff Keating:
> > That's a good question. A good thing to do next would be to try
> > adding such a page (for trees with two operands) and see whether it
> > helps or hurts performance.
With the attached patch I get just over 1% better with checking
enabled. You think that's worth it?
Bootstrapped and regtested on i586-pc-linux-gnu. Timed by compiling g95
(~75000 lines) three times at -O3 with and without the patch. Goes from
89.5s avarage to 88.2s. OK?
Diego, you get this because if this goes on the trunk, you should _not_
merge it into the tree-ssa branch, because tree_common is 8 bytes larger
on the branch, so two operand tree_exps are 32 bytes.
Greetz
Steven
2003-04-30 Steven Bosscher <steven@gcc.gnu.org>
* ggc-page.c (TREE_EXP_SIZE): Define.
(extra_order_size_table): New entry for expr trees with
two operands.
Index: ggc-page.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ggc-page.c,v
retrieving revision 1.64
diff -c -3 -p -r1.64 ggc-page.c
*** ggc-page.c 17 Mar 2003 18:42:23 -0000 1.64
--- ggc-page.c 30 Apr 2003 15:05:24 -0000
*************** Software Foundation, 59 Temple Place - S
*** 173,178 ****
--- 173,181 ----
#define RTL_SIZE(NSLOTS) \
(sizeof (struct rtx_def) + ((NSLOTS) - 1) * sizeof (rtunion))
+ #define TREE_EXP_SIZE(OPS) \
+ (sizeof (struct tree_exp) + ((OPS) - 1) * sizeof (tree))
+
/* The Ith entry is the maximum size of an object to be stored in the
Ith extra order. Adding a new entry to this array is the *only*
thing you need to do to add a new special allocation size. */
*************** Software Foundation, 59 Temple Place - S
*** 180,185 ****
--- 183,189 ----
static const size_t extra_order_size_table[] = {
sizeof (struct tree_decl),
sizeof (struct tree_list),
+ TREE_EXP_SIZE (2),
RTL_SIZE (2), /* REG, MEM, PLUS, etc. */
RTL_SIZE (10), /* INSN, CALL_INSN, JUMP_INSN */
};