-
Notifications
You must be signed in to change notification settings - Fork 0
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
use cling or libclang for JIT C/C++ compilation in VM, and for tinycc backend replacement #705
Comments
Cling has LibClang and LLVM as dependency, that adds 3 big dependencies to the Nim compiler. |
one is based on the other; I'm still exploring but at least cling adds a REPL, and use as a binary instead of having to link in libclang as library dependency, but I'm definitely not discarding using libclang directly, this needs more though.
some of the use cases don't involve a new backend: (eg making things like this possible:
see other docs: Cling
still exploring but this could be an advantage over using libclang directly, ie by invoking cling as a binary instead of linking as a library. TBD.
that's fine if the dependency is optional. on osx (and other platforms probably the same) it's as simple as |
Another option to research: |
example use cases
links
vmhook
: user defined vmops:proc fn(): int {.vmhook.} = impl
to JIT-compile and dlopenfn
at CT (using regular backend, not VM) · Issue nim-lang/Nim#598 · timotheecour/Nimmir c2m JIT c compiler
salient points:
gcc -O2
on some benchmark (generated code quality) (tcc: 0.5x)gcc -02
, 2x faster thangcc -O0
(tcc: 180x faster than
gcc -O2
)cling
The text was updated successfully, but these errors were encountered: