[LLVMdev] writing llvm ir not in c++

Jonathan Roelofs jonathan at codesourcery.com
Mon Oct 13 12:20:40 PDT 2014



On 10/13/14 12:27 PM, Dave Pitsbawn wrote:
> Ah ok. I should check that out.
> 
> My first time implementing something like this, so apologies if this is an
> obvious question -- but why is that JIT and GC go hand-in-hand? I'm trying
> to think what is the relationship between converting source code to LLVM
> IR, that if I want it be like Java or even more dynamic typing sorts --
> what is the rationale that a GC is required. And that somehow JIT and GC
> are related in this.
It depends on the features of the language you're trying to implement. GC is
needed when the language has automatic memory management (i.e. you don't see
delete/free in java/python/lisp, but you do see them in C++/C), whereas JIT is
desired in places where the compiler can do a better job if you give it more
information at runtime (things that are not available statically at compile
time)....   You'll often see JIT and GC together because languages happen to
have features that make having both desirable, but that does not imply that one
/necessitates/ the other.

> 
> Would love to know if I could pick up these concepts somewhere.

Hmm. Can't think of one single reference off the top of my head.


Cheers,

Jon

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded



More information about the llvm-dev mailing list