<div dir="ltr">Hi,<div><br></div><div>LLVMContext was designed to support multithreading by holding the compilation context for each thread in a separate LLVMContext. If you're building modules in parallel you definitely need one LLVMContext per thread.</div>
<div><br></div><div style>If you're talking about compiling multiple modules sequentially with a single context I believe that should work, though I don't know how well tested it is. I think our tools usually create an LLVMContext for each Module to be compiled.</div>
<div style><br></div><div style>The llvm-link tool links multiple modules that share an LLVMContext (see tools/llvm-link/llvm-link.cpp), so that use case has at least been tested.</div><div style><br></div><div style>- Lang.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 30, 2013 at 10:20 PM, edA-qa mort-ora-y <span dir="ltr"><<a href="mailto:eda-qa@disemia.com" target="_blank">eda-qa@disemia.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When building multiple modules should I be using multiple LLVMContext's<br>
or just one of them shared between the modules?<br>
<br>
I'm a little bit uncertain in regards to how the types work. The IR type<br>
checking appears to check exact ptrs for equality so how would multiple<br>
contexts actually work? Or is the type checking limited to within a<br>
given module?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
edA-qa mort-ora-y<br>
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --<br>
Sign: Please digitally sign your emails.<br>
Encrypt: I'm also happy to receive encrypted mail.<br>
<br>
</font></span><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">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/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>