From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2987 invoked by alias); 9 Dec 2003 23:56:37 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 2980 invoked from network); 9 Dec 2003 23:56:36 -0000 Received: from unknown (HELO atrey.karlin.mff.cuni.cz) (195.113.31.123) by sources.redhat.com with SMTP; 9 Dec 2003 23:56:36 -0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 4018) id 8F80C4C000A; Wed, 10 Dec 2003 00:56:35 +0100 (CET) Date: Wed, 10 Dec 2003 00:03:00 -0000 From: Jan Hubicka To: Andrew MacLeod Cc: gcc mailing list Subject: Re: [tree-ssa][ GC, Virtual operands, and GCing between passes Message-ID: <20031209235635.GA12561@atrey.karlin.mff.cuni.cz> References: <1070998524.17667.2860.camel@p4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1070998524.17667.2860.camel@p4> User-Agent: Mutt/1.5.4i X-SW-Source: 2003-12/txt/msg00604.txt.bz2 > > > 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 > > 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?. Yes. Everything that points to GGC memory must be GGC alloced too. > > > > 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? No, you must manage arrays to be in GGC. What is preventing you from doing that? Honza (feels happy that we was faster with GGCying patch:) > > > > > > Andrew >