[Mesa-dev] Mesa (shader-work): glsl: teach loop analysis that array dereferences are bounds on the index
luca at luca-barbieri.com
Thu Sep 9 16:31:31 PDT 2010
I think I understand: since you reparent everything to the new root
and then call talloc_free on the old root, everything dies anyway
whatever its parent was.
However, this makes me think that a copying garbage collection scheme
would be more efficient, since you already have support for visiting
everything alive and are not really using any hierarchical ownership
features, at least for the IR proper.
BTW, are you sure that talloc actually works as expected?
Clearly, you can't have an allocator that both allocates by just
incrementing a pointer, can free memory without fragmentation, and
never copies the objects.
However it seems that's the way talloc is being expected to work,
which is impossible: I guess it might not actually manage to free
memory, because "stealing" does not copy objects and they thus keep
alive the old pool, which results in talloc_free() not freeing nothing
or less than it should. I haven't checked though.
More information about the mesa-dev