-
Notifications
You must be signed in to change notification settings - Fork 39
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
Mid-level intermediate representation (possibly using MLIR)? #28
Comments
Yeah, I've thought about it, though it would actually be most powerful if done in the upstream compiler such that both the nlvm and C backends (which are quite similar at the end of the day) would use / benefit - one of the more difficult issues to deal with in Ideally it would also integrate with an llvm-based CTFE engine such that the nim VM is no longer used (currently there's a VM in nim which quite significantly differs from the runtime code, which incidentally also has its own IR) and instead, the same ir is used for both VM and final compile. |
|
Perhaps, CIL : Common MLIR abstraction for C / C++/ Fortran might help (if and only if this or similar technologies are implemented in MLIR one day)? |
Out of curiosity, I wonder if nlvm has any plans to implement IR like
other languages:
Julia https://docs.julialang.org/en/v1/devdocs/ssair/
Rust https://rustc-dev-guide.rust-lang.org/mir/index.html#the-mir-mid-level-ir
Swift https://github.com/apple/swift/blob/main/docs/SIL.rst
Flang https://github.com/llvm/llvm-project/tree/main/flang
Any comments will be greatly appreciated. Thanks!
The text was updated successfully, but these errors were encountered: