<div dir="ltr">You could probably round trip it through bitcode in memory.  I think all of the IR cloning functionality assumes that only one context is being used.  Even if the serialization isn't efficient as a clone could be, it should give you very high confidence that everything Just Works.  :)</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 18, 2013 at 1:16 PM, Andrew Clinton <span dir="ltr"><<a href="mailto:andrew@sidefx.com" target="_blank">andrew@sidefx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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?<br>

<br>
Andrew<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>