reg_known_value and copying collection

Geoff Keating geoffk@geoffk.org
Fri Dec 13 10:53:00 GMT 2002


> Date: Fri, 13 Dec 2002 11:16:08 -0500
> Cc: geoffk@geoffk.org
> From: Daniel Berlin <dberlin@dberlin.org>
> X-OriginalArrivalTime: 13 Dec 2002 16:25:47.0218 (UTC) FILETIME=[4ACF3B20:01C2A2C4]
> 
> reg_known_value is a non-root, xcalloc'd array used in alias analysis.
> It contains pointers to rtx'en, and we expect it to be available the 
> whole time from a  call to init_alias_analysis until a call to 
> end_alias_analysis.
> 
> CSE ggc_collect's during this time period (IE after init, before end).
> The RTX's reg_known_value has in its array move.
> It gets screwed.
> 
> Should reg_known_value be changed to be ggc_alloc'd and made a root?
> Anyone know of other places like this off the top of their head?

You actually have two choices:

- Make reg_known_value, and perhaps many other similar variables,
  GCed; or
- Ensure that the moving form of GC doesn't happen in places where
  this might matter.

I doubt that you really want to have every call to ggc_collect
potentially compact memory.  

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc mailing list