From: Aldy Hernandez <aldyh@redhat.com>
To: Diego Novillo <dnovillo@google.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [tuples] memory statistics gathering for tuples
Date: Fri, 14 Mar 2008 15:03:00 -0000 [thread overview]
Message-ID: <20080314150008.GA24330@redhat.com> (raw)
In-Reply-To: <47D7F8B1.1060502@google.com>
> 3- The easiest approach will probably be comparing statement lists versus
> gimple sequences. We still haven't gone through making sure we release all
> the expression trees that are gimplified.
Yes, I'm noticing benchmarking is going to be non-trivial, and probably
not an exact science until we have exact code paths, and we can
benchmark right before RTL generation, not after gimplification like I
will be forced to do now.
I think comparing statement lists versus gimple sequences will be the
most straightforward way. Of course I will have to adjust the size of
tuples for extra things we have in there, like USE/DEF information, BB
information, etc.
>> @@ -186,9 +212,14 @@ gimple_alloc (enum gimple_code code)
>> static void
>> gimple_alloc_ops (gimple stmt, size_t num_ops)
>> {
>> - stmt->with_ops.op = ggc_alloc_cleared (sizeof (tree) * num_ops);
>> + unsigned int size = sizeof (tree) * num_ops;
>
> Here you're just counting the size of the pointer. You need to call
> tree_code_size for each operand added.
Are you sure? It looks like the tree counterpart is only adding
pointers for operands. See tree_code_size:
case tcc_reference: /* a reference */
case tcc_expression: /* an expression */
case tcc_statement: /* an expression with side effects */
case tcc_comparison: /* a comparison expression */
case tcc_unary: /* a unary arithmetic expression */
case tcc_binary: /* a binary arithmetic expression */
return (sizeof (struct tree_exp)
+ (TREE_CODE_LENGTH (code) - 1) * sizeof (tree));
case tcc_gimple_stmt:
return (sizeof (struct gimple_stmt)
+ (TREE_CODE_LENGTH (code) - 1) * sizeof (char *));
Aldy
next prev parent reply other threads:[~2008-03-14 15:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-11 19:13 Aldy Hernandez
2008-03-12 15:38 ` Diego Novillo
2008-03-14 15:03 ` Aldy Hernandez [this message]
2008-03-14 15:25 ` Diego Novillo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080314150008.GA24330@redhat.com \
--to=aldyh@redhat.com \
--cc=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).