[LLVMdev] One or many modules with the JIT?

Reid Kleckner reid.kleckner at gmail.com
Fri Feb 11 20:15:22 PST 2011


If you're planning on making your own interpreter and module data
structures, I'd say it's easiest to use a single module for all
machine code you end up generating.  No reason to complicate things by
tracking different LLVM modules if you don't have to.

Reid

On Fri, Feb 11, 2011 at 9:50 PM, Rob Nikander <rob.nikander at gmail.com> wrote:
> Hi,
>
> I'm at the beginning stages of building a language that uses the JIT,
> and works like a scripting language in that you run the source files
> without explicit compilation.  I'd like to start using modules in the
> source language.  Usually a module will correspond to a file.  I'm
> wondering if I should also use separate LLVM modules, or keep
> compiling everything to the single module associated with the JIT
> engine.   I see an `addModule' function in the engine, but I don't
> know what it does.  Does that take care of linking?   If that allows
> me to use separate LLVM modules, is there an advantage of doing it
> that way?
>
> thanks,
> Rob
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list