From: Daniel Berlin <dberlin@dberlin.org>
To: Diego Novillo <dnovillo@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH]: Add annotations for expression and constants
Date: Thu, 10 Jun 2004 14:28:00 -0000 [thread overview]
Message-ID: <731EAB5E-BAE3-11D8-9651-000A95DA505C@dberlin.org> (raw)
In-Reply-To: <1086873868.22854.163.camel@localhost.localdomain>
On Jun 10, 2004, at 9:24 AM, Diego Novillo wrote:
> On Sun, 2004-06-06 at 12:46, Daniel Berlin wrote:
>
>> * tree-flow.h (tree_ann_type): Add CST_ANN, EXPR_ANN.
>> (struct cst_ann_d): New.
>> (struct expr_ann_d): New.
>> (union tree_ann_d): Add cst_ann, expr_ann.
>> * tree-dfa.c (create_cst_ann): New function.
>> (create_expr_ann): Ditto.
>> * tree-flow-inline.h (cst_ann): New function.
>> (expr_ann): Ditto.
>> (get_cst_ann): Ditto.
>> (get_expr_ann): Ditto..
>>
> The annotations are empty.
For now ;)
> What are you going to store in there?
A single value.
It's right now a tree, but will probably move to a hash value
eventually. We use fake VAR_DECLs for the value right now so that they
print out nicely, are easy to track, etc, but they are a bit memory
intensive for this purpose so eventually we'll move away from this, i
reckon.
> Just
> a single hash value?
yes.
> Perhaps we could make this faster and hijack tree_common.ann to store
> them directly there.
I'd have to create a new union or void *ify it, since it's currently a
union tree_ann_d *, not a void *. But i can't easily void * it
because it's GC'd.
(IE
struct tree_common GTY(())
{
tree chain;
tree type;
union tree_ann_d *ann;
)
In order to support GC on it, I'm pretty sure i have to create a union,
but the value number members would be marked deletable/skip, since we
don't need them after a ggc_collect. Either that, or i'd have to keep
a list of expressions and CST's we hijacked, and re-null them at the
end of the pass so it doesn't screw up GC.
Just thinking about this is starting to make my head hurt :(
> After all, the hash
> values will end up in a field of SSA_NAME nodes, right?
yes.
When you deleted the ssa_name_ann yesterday, i moved it to the tree
structure for SSA_NAME's.
>
> If that's the case, perhaps we would be better off just overloading
> tree_common.ann while GVN-PRE runs and then move that value into the
> corresponding SSA_NAME. If there's more state that you want to keep,
> let's use this approach.
>
Nope, no more state.
>
> Diego.
>
next prev parent reply other threads:[~2004-06-10 13:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-06 18:27 Daniel Berlin
2004-06-10 14:28 ` Diego Novillo
2004-06-10 14:28 ` Daniel Berlin [this message]
2004-06-10 14:55 ` Diego Novillo
2004-06-10 15:38 ` Daniel Berlin
2004-06-15 16:14 ` Mark Mitchell
2004-06-15 19:09 ` [PATCH]: Add documentation for functions in tree-flow-inline.h Daniel Berlin
2004-06-15 19:26 ` Mark Mitchell
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=731EAB5E-BAE3-11D8-9651-000A95DA505C@dberlin.org \
--to=dberlin@dberlin.org \
--cc=dnovillo@redhat.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).