RFC: Shark llvm2.6 api changes to Threads and JIT Initialization
xerxes at zafena.se
Wed Jun 17 07:35:07 PDT 2009
Hi this the second issue of the Shark daily digest, today we will talk
about changes to the llvm API for the next llvm version 2.6 that are
allready in use in the 2.6svn trunk.
If you want to be a early shark then this is for you!
API issue 1
LLVM are adding multi-threaded support and clients who make us of the
LLVM API have to change accordingly.
"The major CHANGE is: the JIT will no longer be safe for executing
threaded applications without first invoking llvm_start_multithreaded ()."
API issue 2
Another change are to the Initialization of the JIT.
Before the creation of the ExecutionEngine the JIT for the target shark
are running on have to explicitly be initialized.
Without the initialization creation of the execution engine will return
null and makes shark segfault.
The functions used for this Initialization are named:
fix 1: we have to invent a large #if block to deal with this
fix 2: or persuade the llvm people to create a llvm::InitializeMyTarget()
fix 3: do like llvm internally and add some macros to convert
LLVM_NATIVE_ARCH into the correct methodname: here are the llvm fix for lli
The attached patch fixes issue 1 and gives an example for issue 2 on X86.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1621 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090617/3f4ac711/llvm_api_breakage_3.patch
More information about the distro-pkg-dev