[LLVMdev] GSOC Adaptive Compilation Framework for LLVM JIT Compiler

Eric Christopher echristo at apple.com
Sun Apr 3 12:11:40 PDT 2011

On Apr 3, 2011, at 12:01 PM, Xin Tong Utoronto wrote:

> Another way to do the patching is to first atomically inserted a self-loop jump -2 atomically (jump -2 takes 2 bytes and 2 bytes writing is atomic on x86 )  into the old branch address on x86 such that it stops all threads reaching this point. copy in the new compiled function address.  and then re-patch the jump -2 with the correct binary. 

Heh. That'd work on x86 at least. I don't know about other architectures.


More information about the llvm-dev mailing list