Missed roots

Jeffrey A Law law@cygnus.com
Wed Sep 22 12:32:00 GMT 1999


  In message < 19990922082929J.mitchell@codesourcery.com >you write:
  > I tried.  And I did a grep or two for globals.  And we've run with the
  > "always collect and poison" option to the GC, which tends to make bugs
  > show up.  
OK.  Just wanted to make sure -- those initializers seem like a good place
to look for hunks of rtl that are likely to have lifetimes which we would be
interested in for GC. 

I found one other one that was missed -- init_traps allocates an rtx and
stores it into trap_rtx (a file static).  Interestingly enough it has a
??? comment before it indicating it needs to be fixed for garbage collection.

Can you take care of it?  Thanks.

  > But, obviously, I didn't do as good a job as I'd thought; you're
  > spotting a few more of these.
I fully expected that we'd have to fault some of this stuff in over time;
I just wanted to make sure we went looking into the right places to find
potential roots that needed to be registers.

  > We also need to be GC-aware when adding new code/merging patches; any
  > globals that might be live across a single optimization pass must be
  > registered.
Yup.  Though in general I'd like to generally avoid stuffing things into
globals like that.

In an ideal world, once you got down into rtl a function should be described
by a series of blocks and edges between the blocks.  Within the blocks we would
have a chain of insns associated with the block.   If we find ourselves passing
information outside that model we should be asking ourselves why and whether or
not there's a better way.

Obviously, we're not at that stage, but that's the general direction I think
we need to head.  

Another think we need to keep in mind is that we should be zero-ing out roots
after we're done with them so that we can collect the nodes that had been
attached to the root.

jeff



More information about the Gcc-patches mailing list