You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
This needs some exploration, but I think it should be pretty straight forward to implement a pure Go LLVM IR builder/writer for use in llgo. This would:
Enable us to work around deficiencies in the LLVM C API (e.g. no support for cyclic metadata)
Speed up builds, and vastly cut down the size of llgo's binaries (no huge libraries to statically link in)
Potentially better runtime performance, since there's no need to call through cgo.
No need for LD_LIBRARY_PATH shenanigans when only dynamic libraries are available.
No need for unsafe code (so llgo could used inside a web application)
I'm sure there's more.
The text was updated successfully, but these errors were encountered:
Is there any functionality lost by not linking in the llvm libs and having direct access to LLVM's internals? Code optimization passes, performance tuning for specific cpu generations and architectures, etc are all available via llvm-as, llc, llvm-link et al, right?
Code optimization passes, performance tuning for specific cpu generations and architectures, etc are all available via llvm-as, llc, llvm-link et al, right?
Right. LLVM's nicely modular like that, so llgo can just write out IR, and we can pump it through "opt" for optimisation. llvm-link understands both IR and bitcode, as does clang.
Is there any functionality lost by not linking in the llvm libs and having direct access to LLVM's internals?
The only thing I can think of is knowledge of available target triples, which gets baked into libLLVM. We can just as well do that with llgo, though, using something similar to llvm-tblgen.
This needs some exploration, but I think it should be pretty straight forward to implement a pure Go LLVM IR builder/writer for use in llgo. This would:
The text was updated successfully, but these errors were encountered: