-
Notifications
You must be signed in to change notification settings - Fork 6
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
Integration with llvm-ir
crate?
#3
Comments
Hi there! I love that idea -- it looks like you've put an incredible amount of effort into providing high-quality Rust mappings for LLVM's IR, which would save me a correspondingly incredible amount of time :-) I'll have a clearer picture of what I'd like to see in |
I found a first potential touchpoint between our two ecosystems! Both the high level (IR) and low level (bitstream) representations need to be able to reference a variety of constants/enums, like the valid calling convention constants. It looks like To whit: what do you think both ecosystems using the |
(One slightly tricky thing is that |
I think I have an idea for a cleaner approach. In your particular example, this also allows Thoughts on this? Am I off base? |
That sounds much cleaner! Yeah, that’ll keep the concerns much more separate.
Sent from mobile. Please excuse my brevity.
… On Aug 14, 2021, at 12:21 PM, Craig Disselkoen ***@***.***> wrote:
I think I have an idea for a cleaner approach. llvm-ir could make its llvm-sys dependency optional, and also have an optional dependency on one or more of the mollusc crates. Users of llvm-ir could then choose between llvm-sys and mollusc for bitcode parsing, via a Cargo feature. llvm-ir::function::CallingConvention would have both the current implementation to construct it using llvm_sys::LLVMCallConv, and a new implementation to construct it from an llvm_constants::CallingConvention. Essentially the code to convert from the low-level mollusc representation to llvm-ir would live in the llvm-ir crate alongside (and as an alternative to) the llvm-sys code. I think it makes more sense for the high-level representation crate to depend on the low-level representation crate than vice versa, anyway.
In your particular example, this also allows llvm-ir to keep its CallingConvention as an opaque enumeration, while mollusc has the same-valued enumeration which better befits a low-level interface.
Thoughts on this? Am I off base?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Hi,
Someone else just pointed this repo out to me and it looks great! I noticed in your README that some of the higher-level representation of LLVM IR is listed as todo. As the maintainer of the
llvm-ir
crate, I'm of course very interested in this; it seems like our crates might be able to work well together, with yours having the capability to parse LLVM bitcode in pure Rust, and mine having a high-level interface to LLVM IR. I guess my question is have you considered integrating withllvm-ir
, and if there's anything inllvm-ir
that you would want to see changed or done differently to work with your use case. I'm a volunteer maintainer but if there are things you'd like to see inllvm-ir
I'm interested to hear.The text was updated successfully, but these errors were encountered: