public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [tree-ssa][ GC, Virtual operands, and GCing between passes
@ 2003-12-09 20:26 Andrew MacLeod
  2003-12-09 23:43 ` Geoff Keating
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Andrew MacLeod @ 2003-12-09 20:26 UTC (permalink / raw)
  To: gcc mailing list



Are we sure we want to GC between passes? :-|

since VDEFs and VUSEs are tree nodes, I can't allocate the structure
which holds them anywhere except GC'd memory can I?

ie

a_3 = VDEF <a_2>

This requires points to 2 trees.

the GC system has to know not to collect the trees I am pointing to in
the 2 words of the vdef vector.

but I dont want to GC the vdef vector.
I have something like:

struct v_operands_d *vops;

struct v_operands_d {
  unsigned int num
  tree *vec;
}

so I dont want the memory associated with either  'vops' or 'vec'
garbage collected, but I do want to keep around anything that
vec[0]..vec[num-1] points to.

Thats not really going to work too well is it? At least I haven't been
able to do it.  So I'll have to keep ggcing the memory for the vops
structure?.



What I'm really trying to avoid is having the actual 'tree *vec' vector
ggc allocated. I want to mamage the vector allocation myself.

So I need to mark all the elemnts of vec, but I dont want to mark vec
itself.

is that possible?

right now I have:

    typedef struct vdef_optype_d GTY(())
    {
      unsigned num_vdefs;
      tree * GTY((length ("%h.num_vdefs"))) vdefs;
    } vdef_optype_t;
    
    typedef struct vuse_optype_d GTY(())
    {
      unsigned num_vuses;
      tree * GTY((length ("%h.num_vuses"))) vuses;
    } vuse_optype_t;
    
    
    struct voperands_d GTY (())
    {
      /* List of VDEF references in this statement.  */
      struct vdef_optype_d GTY (()) vdef_ops;
    
      /* List of VUSE references in this statement.  */
      struct vuse_optype_d GTY (()) vuse_ops;
    };
    
    <...>
      /* Virtual operands (VDEF and VUSE).  */
      struct voperands_d * GTY (()) vops;
    <...>


And all the arguments of my vector are being marked, but it is also
marking 'vuses' and 'vdefs', which I *dont* want to be GC'd.

Is it possible to do this in any way, shape, or form?





Andrew


^ permalink raw reply	[flat|nested] 24+ messages in thread
* RE: [tree-ssa][ GC, Virtual operands, and GCing between passes
@ 2003-12-11 14:27 S. Bosscher
  2003-12-11 14:34 ` Andrew MacLeod
  0 siblings, 1 reply; 24+ messages in thread
From: S. Bosscher @ 2003-12-11 14:27 UTC (permalink / raw)
  To: 'Andrew MacLeod ', 'Geoff Keating '
  Cc: 'gcc mailing list '

> The problem is that gengtype will not allow me to have vevotrs of type
> tree **. It says its an unknown type.
> 
> typedef struct def_optype_d GTY(())
> {
>   unsigned num_defs;
>   tree ** defs;
> } def_optype_t;

Try this with http://gcc.gnu.org/ml/gcc-patches/2003-12/msg00593.html.

If that doesn't work, make it "PTR * GTY((skip ())) defs" (or just
"void **" if you have that patch applied anyway) and cast to tree
where needed.

Gr.
Steven


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2003-12-15 22:45 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-09 20:26 [tree-ssa][ GC, Virtual operands, and GCing between passes 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
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

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).