[LLVMdev] LLVM and threading
Martin C. Martin
mmartin at Endeca.com
Wed Aug 18 14:08:34 PDT 2010
I'd like to run LLVM in a threaded application, where different threads
will be compiling separate, unrelated code. I'm compiling using the JIT
so I can execute the code as soon as it's compiled.
How should I use LLVM? Should I create an ExecutionEngine for each
thread, or only a single, global instance?
I noticed that JIT::getPointerToFunction() contains:
and it seems to hold the lock until the method returns. Does this mean
that lazy compilation will be serialized? Would non-lazy compilation be
any better? Can compilation be done in parallel by different threads?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev