Re: Managing the JIT

Eric Christopher <echristo@gmail.com>
Fri, 24 Jul 2009 15:32:19 -0700

          From comp.compilers

Related articles
Managing the JIT herron.philip@googlemail.com (Philip Herron) (2009-07-22)
Re: Managing the JIT echristo@gmail.com (Eric Christopher) (2009-07-24)
Re: Managing the JIT herron.philip@googlemail.com (Philip Herron) (2009-07-25)
Re: Managing the JIT armelasselin@hotmail.com (Armel) (2009-07-25)
Re: Managing the JIT herron.philip@googlemail.com (Philip Herron) (2009-07-27)
Re: Managing the JIT cr88192@hotmail.com (BGB / cr88192) (2009-07-27)
Re: Managing the JIT cr88192@hotmail.com (BGB / cr88192) (2009-07-28)
Re: Managing the JIT armelasselin@hotmail.com (Armel) (2009-07-29)
[7 later articles]
| List of all articles for this month |

From: Eric Christopher <echristo@gmail.com>
Newsgroups: comp.compilers
Date: Fri, 24 Jul 2009 15:32:19 -0700
Organization: Compilers Central
References: 09-07-079
Keywords: code
Posted-Date: 24 Jul 2009 18:48:26 EDT

Hi Philip,


> So to 'just in time compile' this we would generate the appropriate code
> for your architecture, to multiply and return the result. Thats fine, so
> say we generated this assembly and assembled it, then what do you do? I
> mean you can't just have tonnes of small binaries in /tmp that you some
> how manage in your runtime to keep ./tmp_multiply and read the result or
> something. I am having trouble finding more stuff on how this works
> would be great if you could point me in the right direction?! :)
>
> --Phil
> http://redbrain.co.uk
> [If I were doing a JIT compiler, I would store the generated code in RAM. If
> you're putting it in files, that's not JIT, that's ordinary dynamic linking. -John]




John is absolutely correct here, what you'll want is an llvm ExecutionEngine
to manage your jitted code via the modules that you put intermediate code
into. There's a simple example for a toy language up on the llvm
website:


http://llvm.org/docs/tutorial/index.html


I'd read the Kaleidoscope tutorial.


-eric



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.