How to get to 100% precise tracing GC?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Sun Nov 15 22:47:07 UTC 2020
On Sunday, 15 November 2020 at 22:29:27 UTC, Rainer Schuetze
> Indeed, that could work, although the "stack map" seems a bit
> too simple. It prevents some common optimizations, like having
> pointers only in registers, or reusing the same stack area in
> different scopes inside a function.
My understanding is that LLVM use the term "stack map" for two
different solutions. The old one is based on registering gc-roots
"manually", but the newer one that is for patch-points (points
where you can inject code at runtime) including register
information. It does inhibit some optimizations as that point is
assumed to write state, but the docs says that it can be marked
as "read only", which should work out, I think? But it isn't
trivial to make use of it and it will have some performance
impact compared to manual allocations.
My personal opinion is that if one reduce collection to a single
thread and also reduce the number of pointers, then one can get
to a good place. One way to reduce scanned pointers would be to
allow developers to also mark pointers as non-owning, and there
are more tricks available...
More information about the Digitalmars-d