search for: ut_scopedptr

Displaying 3 results from an estimated 3 matches for "ut_scopedptr".

2013 Nov 05
1
[LLVMdev] Thread-safe cloning
...// and optimization to proceed in parallel for different // modules. std::string str; raw_string_ostream stream(str); WriteBitcodeToFile(other.myModule, stream); StringRef ref(stream.str()); UT_ScopedPtr<MemoryBuffer> buf(MemoryBuffer::getMemBuffer(ref)); myModule = ParseBitcodeFile(buf.get(), myContext); UT_ASSERT(myModule); } On 06/18/2013 01:29 PM, Reid Kleckner wrote: > You could probably round trip it through bitcode in memory. I think > al...
2013 Jun 18
0
[LLVMdev] Thread-safe cloning
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. :) On Tue, Jun 18, 2013 at 1:16 PM, Andrew Clinton <andrew at sidefx.com> wrote: > I have a
2013 Jun 18
2
[LLVMdev] Thread-safe cloning
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