[LLVMdev] "Multithreaded LLVM" in "Writing an LLVM Pass"

David Chisnall David.Chisnall at cl.cam.ac.uk
Tue Oct 9 00:35:57 PDT 2012

On 8 Oct 2012, at 18:26, Lu Mitnick wrote:

> 1. Multiple threads handle different modules (Thread : Module = 1 : 1)
> or

For ModulePasses, yes.

> 2. Multiple threads handle one module (Thread : Module = N : 1)

For FunctionPasses, yes.

Note that this part is in the future work section, meaning that no one has done it yet.  FunctionPasses are independent of each other when running on different functions, so it would be fairly simple to use something like libdispatch to optimise every function within a module independently.  FunctionPasses are not (in theory) allowed to modify any module state outside of a function, so they should be able to be run concurrently.  


More information about the llvm-dev mailing list