<div dir="ltr"><div>I already did this for HLVM. Check it out:</div><div><br></div><div><a href="http://www.ffconsultancy.com/ocaml/hlvm/">http://www.ffconsultancy.com/ocaml/hlvm/</a></div><div class="gmail_extra"><br></div>
<div class="gmail_extra">Note that I used per-thread shadow stacks but none of the LLVM GC support. I used a technique similar to Henderson's accurate garbage collection in an uncooperative environment.</div><div class="gmail_extra">
<br></div><div class="gmail_extra">Parallel performance was extremely good:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="http://flyingfrogblog.blogspot.com/2010/01/naive-parallelism-with-hlvm.html">http://flyingfrogblog.blogspot.com/2010/01/naive-parallelism-with-hlvm.html</a></div>
<div class="gmail_extra"><br></div><div class="gmail_extra">HLVM can be faster than Java, Haskell, OCaml, MLton and almost as fast as C/C++:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="http://flyingfrogblog.blogspot.com/2010/01/hlvm-on-ray-tracer-language-comparison.html">http://flyingfrogblog.blogspot.com/2010/01/hlvm-on-ray-tracer-language-comparison.html</a></div>
<div class="gmail_extra"><br></div><div class="gmail_extra">The design of HLVM is very simple. The GC that handles concurrent mutators is only 100 lines of code. The entire garbage collected VM is only 2,000 lines of OCaml code.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,</div><div class="gmail_extra">Jon.<br><br></div><div class="gmail_quote">On Mon, Feb 17, 2014 at 7:27 AM, Paweł Batko <span dir="ltr"><<a href="mailto:pawel.batko@gmail.com" target="_blank">pawel.batko@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><p style="margin:0px 0px 1em;padding:0px;border:0px currentColor;line-height:17.8px;clear:both;font-family:Arial,"Liberation Sans","DejaVu Sans",sans-serif;font-size:14px;vertical-align:baseline">
Hi all,<br><br>I would like to implement GC for a language supporting multiple threads. There will be no shared state between threads as communication will be based on message passing. I do not care much about performance. The priority for me is to get things working.</p>
<p style="margin:0px 0px 1em;padding:0px;border:0px currentColor;line-height:17.8px;clear:both;font-family:Arial,"Liberation Sans","DejaVu Sans",sans-serif;font-size:14px;vertical-align:baseline">
I have read LLVM guide on writing GC: <a style="margin:0px;padding:0px;border:0px currentColor;color:rgb(74,107,130);text-decoration:none;vertical-align:baseline;background-color:transparent" href="http://llvm.org/docs/GarbageCollection.html" target="_blank" rel="nofollow">http://llvm.org/docs/GarbageCollection.html</a>. Shadow stack approach looks very promising. The problem is, as described in the guide, shadow stack is single thread solution. It would be ideal if I could get LLVM to create a shadow stack on per thread basis. How could this be achieved?<br>
<br>Thanks,<br>Paweł.</p></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><div class="gmail_extra"><br></div></div>