[LLVMdev] Thread-safe cloning

Andrew Clinton andrew at sidefx.com
Tue Jun 18 10:16:16 PDT 2013


I have a Module/LLVMContext that I'd like to clone and manipulate in 
different threads (each thread may perform different translation / 
optimization, so they need unique copies).  Currently this process has 
to be locked, since each clone of the Module still refers to the same 
LLVMContext.  Is there a way to clone both the Module and LLVMContext so 
that the copies can be manipulated independently in different threads?

Andrew



More information about the llvm-dev mailing list