[LLVMdev] How will OrcJIT guarantee thread-safety when a function is asked to be re generated?
halivingston at gmail.com
Tue Mar 17 01:27:34 PDT 2015
I've been playing with OrcJIT a bit, and from the looks of it I can (like
in the previous JIT I suppose?) ask for a function to be re generated.
If I've given the address of the function that LLVM gave me to an external
party, do "I" need to ensure thread-safety?
Or is it safe to ask OrcJIT to re generate code at that address and
everything will work magically?
I'm thinking it won't because it's quite possible some thread might be
executing code, and we'll be asking LLVM to write bytes there.
How does one generally go do such updates? I'm looking for some guidance
without adding a trampoline in front of it. Do runtimes that support
re-generation of code have an if check or something before entering the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev