llir / llvm

Library for interacting with LLVM IR in pure Go.
https://llir.github.io/document/
BSD Zero Clause License
1.19k stars 78 forks source link

Bitcode Generator #170

Closed Pablo96 closed 3 years ago

Pablo96 commented 3 years ago

Hi there, I cant find the bitcode generator if it isn't supported I would like to request it and if possible help developing it

dannypsnl commented 3 years ago

We don't have bitcode generator now(at least I think so), for now, you can use llvm-as command.

mewmew commented 3 years ago

Hi @Pablo96,

Good to see you interested in the project :) As @dannypsnl mentioned the llir/llvm project currently supports only the text version of LLVM IR. As all three forms of LLVM IR are isomorphic (binary bitcode form, human readable text form, in-memory form), the current approach is to use the official LLVM toolchain (llvm-as -o foo.bc foo.ll) to convert between human readable LLVM IR and bitcode.

While I understand your wish for integrating both formats into llir/llvm, the maintenance effort to keep support for these formats up-to-date is substantial. If you do wish to join the project, we would be very glad to welcome you! There are definitely aspects we wish to dedicate more time to, but are stretched thin as we do this on our spare time.

So, to best help the project, I think the most valuable investment of time would be into continuing to update llir/llvm to support new aspects of the human readable LLVM IR form, in order to keep up with development of the official LLVM. Then, as mentioned above, to use the official LLVM tools to translate and convert between these isomorphic forms.

Just let us know if you'd be interested in joining our team and helping us develop llir/llvm. We'd be happy to point you in the right direction on where to get started :)

Cheers, Robin

mewmew commented 3 years ago

Hi there, I cant find the bitcode generator if it isn't supported I would like to request it and if possible help developing it

Closing this issue for now. @Pablo96 let us know if you'd be interested in joining development. As LLVM 12.0 has just been released, we could use help to bring llir/llvm up to speed ;) See #169 for background.

https://releases.llvm.org/12.0.0/docs/ReleaseNotes.html