[LLVMdev] Improving Garbage Collection

Sebastian Redl sebastian.redl at getdesigned.at
Thu Jul 7 01:50:47 PDT 2011

On 07.07.2011 08:31, Nate Fries wrote:
> On 7/6/2011 6:24 PM, Talin wrote:
>> The LLVM code generators and analysis passes have a much more 
>> thorough knowledge of SSA value lifetimes than frontends do, and 
>> therefore could avoid spilling and reloading of values when it wasn't 
>> needed.
> Although this would indeed be nice, it is not done by similar 
> platforms in practice. I have investigated [very] briefly into whether 
> the CLR or JVM implement garbage collection in their IR, and it does 
> not seem that they do (meaning, the CLR/JVM implementation itself is 
> responsible for garbage collection, not the code generated by the 
> CLR/Java language compilers).
I'm not sure this is a valid comparison. CLR and JVM IRs are typed, and 
by nature of those VMs, *all* pointers on the stack and in registers are 
automatically GC roots. Unlike LLVM, the JVM (and I think the CLR) 
doesn't even have a concept of a non-GC pointer.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110707/789d671e/attachment.html>

More information about the llvm-dev mailing list