public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew MacLeod <amacleod@redhat.com>
To: Jeff Law <law@redhat.com>
Cc: Geoff Keating <geoffk@geoffk.org>, gcc mailing list <gcc@gcc.gnu.org>
Subject: Re: [tree-ssa][ GC, Virtual operands, and GCing between passes
Date: Fri, 12 Dec 2003 13:38:00 -0000	[thread overview]
Message-ID: <1071236019.14001.14.camel@p4> (raw)
In-Reply-To: <200312120358.hBC3wRHr010181@speedy.slc.redhat.com>

On Thu, 2003-12-11 at 22:58, law@redhat.com wrote:
> In message <1071199658.5712.571.camel@p4>, Andrew MacLeod writes:
>  >If it was just tree *def, we would have access to read the defs and
>  >uses, but if we wanted to actually change the value of the def or use
>  >operands in the originating stmt, you dont have a handle on the pointer
>  >in the stmt which points at that operand, so you cant change it without
>  >structure copying the tree structure.And we dont want to do that :-)
>  >tree **def lets us get a tthe things which points at the operand.
> Then how did it work previously with use_ops & def_ops?  I'm pretty sure
> we can replace uses & defs within that framework and my recollection was
> that it simply used a varray of tree *.
> 

Yessssssss....  

a varray of tree *... what is the data structure at the end of the
varray_type structure for a TREE_PTR varray?

tree *tp[1]

which is the same type as  my tree **tp, except its an in place array
instead of a dynamically allocated array.

It worked before because its a variable sized array at the end of the
varray structure, and doesnt have to have its elements marked.
so it would be sized as 

SIZEOF VARRAY_HDR + sizeof (tree *) * num_elements

and  the head of the varray is marked, and everything is wonderful.

I am using exactly the same representation, except Im trying to
dynamically allocate the array insead of having the overhead of the
varray structure.

I havent actually changed anything.

I could probably make it work with GC by declaring it as 

struct def_vector GTY(()) {
  tree * GTY((skip(""))) defs[1];
}

struct def_optype GTY(()) {
  size_y num_defs;
  struct def_vector *defs;
}

and then sizing it appropriately when malloced, but again, Im going
through contortions to make it work, My pointer to this structure will
in effect be a tree ** even though it will only be declared as a struct
'def_vector *'

I suppose I could even do it exactly the same as a varray:
struct def_optype GTY(()) {
  size_y num_defs;
  tree *def[1];
}

and size that one when malloced, except at the moment this structure
isnt malloced.

I may indeed contemplate doing that in fact, but it still doesnt change
the type of the def vector... 

Andrew

  reply	other threads:[~2003-12-12 13:33 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-09 20:26 Andrew MacLeod
2003-12-09 23:43 ` Geoff Keating
2003-12-10  4:46   ` Andrew MacLeod
2003-12-11 17:01     ` Geoff Keating
2003-12-11 17:17       ` Andrew MacLeod
2003-12-11 21:15         ` Geoff Keating
2003-12-11 23:31           ` Andrew MacLeod
2003-12-15 22:05             ` Richard Henderson
2003-12-15 22:46               ` Andrew MacLeod
2003-12-11 19:30     ` law
2003-12-11 23:13       ` Andrew MacLeod
2003-12-12  0:21         ` law
2003-12-12  3:29           ` Andrew MacLeod
2003-12-12  5:24             ` law
2003-12-12 13:38               ` Andrew MacLeod [this message]
2003-12-13  6:52                 ` law
2003-12-11 14:17   ` Andrew MacLeod
2003-12-10  0:03 ` Jan Hubicka
2003-12-10  0:18   ` Andrew MacLeod
2003-12-10  0:38     ` Jan Hubicka
2003-12-11 19:30 ` law
2003-12-11 14:27 S. Bosscher
2003-12-11 14:34 ` Andrew MacLeod
2003-12-11 15:01   ` Andrew MacLeod

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=1071236019.14001.14.camel@p4 \
    --to=amacleod@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=geoffk@geoffk.org \
    --cc=law@redhat.com \
    /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).