Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for llvm::orc2::LLJit #476

Open
JCBurnside opened this issue Feb 20, 2024 · 1 comment
Open

Support for llvm::orc2::LLJit #476

JCBurnside opened this issue Feb 20, 2024 · 1 comment

Comments

@JCBurnside
Copy link

Is your feature request related to a problem? Please describe.
The current ExecutionEngine is using an older engine that has issues with global mappings.

Describe the solution you'd like
I would like a jit engine using LLJIT. the needed c-api functions are anything in llvm_sys::orc2::lljit

Describe possible drawbacks to your solution
might be more difficult to call functions in an idiomatic way.

Describe alternatives you've considered
using the old system and using llvm_sys directly.

Additional context
small sample of how to crate an LLJIT instances https://gist.github.com/JCBurnside/e93d6b95d1caa3746b7fe72073094cc2
sample of using LLJIT (line 95 is the part I am having issues translating) https://github.com/llvm/llvm-project/blob/main/llvm/examples/HowToUseLLJIT/HowToUseLLJIT.cpp

@JCBurnside
Copy link
Author

turns out it's just a transmute to get the returned address into a usable function. also updated the gist with a fix for a double free. LLVMOrcCreateLLJIT takes ownership of the builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants