Earlier quoted context omitted.
Go already has its own intermediate representation to solve this problem, so this project must solve some other problem.
Go having its own intermediate representation "solves" the problem but requires go-specific backends/lowering mechanisms. LLVM is arguably a more generic place for backends to live. (though in practice it does serve clang's needs best). If you design a new processor, you generally take it upon yourself to do the work necessary for folks to use C compilers that target your processors. I'd argue that they're more likel…
Gollvm from Google
41–50 of 51 posts
Re: Gollvm from Google
#42Earlier quoted context omitted.
Go already has its own intermediate representation to solve this problem, so this project must solve some other problem.
But go ir != llvm ir. The idea is you can leave behind optimizations passes and backend, simply maintaining a frontend, when you adopt the llvm ir and toolchain.
Re: Gollvm from Google
#43Earlier quoted context omitted.
But gccgo already exists, and provides an optimizing compiler backend and extended platform support. And the tools in LLVM's ecosystem seem largely useless to Go (no need for asan et al when you have a GC, and no need for tsan when Go already has an optional race detector). Other than the compiler itself having a permissive license, I see no urgent impetus for an LLVM backend for Go, which likely explains why it's ta…
> But gccgo already exists, and provides an optimizing compiler backend and extended platform support. We (SUSE / openSUSE) had an incredible amount of issues with gccgo. The main problem was that the runtime wasn't updated often enough, they had some odd patches that broke the runtime, and you generally had to update the compiler to update the Go version (quite difficult in enterprise distributions).
Re: Gollvm from Google
#44Earlier quoted context omitted.
But gccgo already exists, and provides an optimizing compiler backend and extended platform support. And the tools in LLVM's ecosystem seem largely useless to Go (no need for asan et al when you have a GC, and no need for tsan when Go already has an optional race detector). Other than the compiler itself having a permissive license, I see no urgent impetus for an LLVM backend for Go, which likely explains why it's ta…
LLVM has better support for moving GC, due to Azul's efforts. That's a big difference.
Re: Gollvm from Google
#45This means we could write numerical code in Go and get auotvectorized assembly and use GPUs via the nvptx backend. Neat!
Go is a GC language. Only a strict subset would be amenable to running on a GPU.
I didn't mean anyone would want to do this but just that it's an interesting parallelism for a language.
Re: Gollvm from Google
#46Earlier quoted context omitted.
LLVM has better support for moving GC, due to Azul's efforts. That's a big difference.
Doesn't gccgo reuse the standard Go runtime, and wouldn't integrating LLVM'S GC support require pretty much writing a brand-new runtime?
Re: Gollvm from Google
#47Earlier quoted context omitted.
> But gccgo already exists, and provides an optimizing compiler backend and extended platform support. We (SUSE / openSUSE) had an incredible amount of issues with gccgo. The main problem was that the runtime wasn't updated often enough, they had some odd patches that broke the runtime, and you generally had to update the compiler to update the Go version (quite difficult in enterprise distributions).
Wouldn't you have those same problems with an LLVM-based backend? LLVM moves very quickly, and AFAICT upgrades are non-trivial.
Re: Gollvm from Google
#48So question for llvm devs here: what benefit does this provide? How does it enhance go? Does it make go programs compile into more efficient binaries targeted to specific cpu architectures?
Re: Gollvm from Google
#49I am somewhat confused by this. The LLVM project already has an official Go frontend that lowers to LLVM IR: * https://llvm.org/svn/llvm-project/llgo/trunk/README.TXT
> You attempted to reach llvm.org, but the server presented a certificate signed using a weak signature algorithm (such as SHA-1). This means that the security credentials the server presented could have been forged, and the server may not be the server you expected (you may be communicating with an attacker).
Re: Gollvm from Google
#50Earlier quoted context omitted.
But go ir != llvm ir. The idea is you can leave behind optimizations passes and backend, simply maintaining a frontend, when you adopt the llvm ir and toolchain.
I don't disagree, but this is a different problem than the one cited above.