[Mesa-dev] Mesa (shader-work): glsl: teach loop analysis that array dereferences are bounds on the index
Luca Barbieri
luca at luca-barbieri.com
Wed Sep 8 18:26:45 PDT 2010
Thanks!
But, does this mean that if I allocate using new(existing_ir) ir_foo()
or opposed to new(talloc_parent(existing_ir)) ir_foo() then this new
object will always remain alive as long as existing_ir is alive, even
if it's no longer referenced?
If so, why would anyone do that, which seems to occur frequently in
the codebase?
And why is an hierarchical ownership model useful at all, instead of
just doing a "mark-and-sweep" plus copying phase after all
optimizations, or maybe after a given pass if the allocated memory
grows too much?
Also, how about just keeping the context in a thread-local variable
and using it automatically, possibly in a global way with a gc root
registration mechanism?
More information about the mesa-dev
mailing list