Start with Base.llvmcall. It is not documented, yet, but there are some
examples in the tests:
https://github.com/JuliaLang/julia/blob/master/test/llvmcall.jl

The codegen part is in src/ccall.cpp.

On Wed, Mar 18, 2015 at 2:30 PM, Sebastian Good <
[email protected]> wrote:

> I've compiled a separate set of functions with another LLVM-based
> toolchain (in this case Intel's SPMD compiler, ispc). If I have it emit
> LLVM byte code (i.e. as a .bc file), is it possible to link that LLVM code
> directly into a Julia session? I can compile the library into a dynamic
> library, load it that way, and access it via ccall, but it strikes me that
> for some smaller functions, being able to directly link the LLVM in would
> enable not only a simpler work flow, but maybe even allow for inlining of
> smaller functions or better "whole program" optimization. I understand
> Cxx.jl is doing tricks vaguely of this nature. Where's the best place to
> look for attempting this sort of magic?
>

Reply via email to