[tree-ssa] Garbage collector x bb annotations

Daniel Berlin dberlin@dberlin.org
Wed Oct 8 14:19:00 GMT 2003


On Oct 8, 2003, at 10:01 AM, S. Bosscher wrote:

>>> The real solution would be to
>>> finally convert basic blocks to ggc.  Volunteers?
>>
>> I may try (I need it anyway for tree-ssa-cfg branch).  The whole issue
>> is however quite ugly as this combines basically all allocation
>> mechanisms that are available in gcc (basic blocks themselves are pool
>> allocated).
>
> We already mix everything now: bitmaps that are xmalloc'ed, 
> annotations are
> ggc'ed, and bbs and edges are pool allocated.  Talk about fragile...
> BBs and edges and everything attacked to it should also be garbage
> collected.  If we ever go on to save functions as graphs then that 
> would be
> more convenient anyway.

The reason BB's are pool allocated is for locality. There is actually a 
measurable difference if you ggc allocate them and different bb's end 
up in different pages.

It seems better to allow things hanging off them to be marked, then it 
does to ggc allocate them.

We shouldn't ggc allocate things just because it's the easiest way to 
get it's children marked.


--Dan



More information about the Gcc mailing list