[LLVMdev] Available code-generation parallism

Evan Cheng evan.cheng at apple.com
Sun Nov 2 22:55:47 PST 2008

Unfortunately, llvm code generator is not *yet* thread safe. My  
understanding is there isn't a huge amount of work to do to make it so  
but I don't have the details.


On Nov 2, 2008, at 2:20 PM, Jonathan Brandmeyer wrote:

> I am interested in making my LLVM front-end multi-threaded in a way
> similar to the GCC compiler server proposal and was wondering about  
> the
> extent that the LLVM passes support it.
> Expression-at-a-time parallel construction:
> If function definitions are built purely depth-first, such that the
> parent pointers are not provided as they are created, what will break?
> I noted that the function and module verifiers aren't complaining, at
> least not yet.  Is there a generic "fixup upward-pointing parent
> pointers" pass that can be run afterwords?  If not, do I need to
> implement and perform that pass?  I suspect that emitting code for
> individual expressions in parallel will probably end up being too
> fine-grained, which leads me to...
> Function-at-a-time parallel construction:
> Which (if any) LLVM objects support the object-level thread safety
> guarantee?  If I construct two separate function pass managers in
> separate threads and use them to optimize and emit object code for
> separate llvm::Function definitions in the program, will this work?
> Same question for llvm::Modules.
> Thanks,
> -Jonathan Brandmeyer
> _______________________________________________
> 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