There's an "official answer" in the FAQ [1] (
"We considered using LLVM for gc but we felt it was too large and slow to meet our performance goals." Note: lowercase
gc refers to Go compiler, whereas uppercase
GC would refer to Garbage Collector). That said, I seem to recall other additional/more detailed reasons were given on various occasions too, including:
- ease of iteration and freedom to make huge breaking changes (and they did make use of it, see e.g. various generations of the GC, or the SSA work);
- thorough knowledge of the internals of the compiler they used (given they were it's authors; also this is linked to the reason I listed above);
- one of the explicit goals for the Go toolchain was that it must compile very fast (which I believe is also somewhat at odds with advanced optimizations, like those used in LLVM) - they even quipped something like "we designed Go while waiting for C++ to compile";
- additionally, though I'm not sure if it was ever spelled explicitly, I suppose they wouldn't want to get tied to the LLVM as a huge dependency, including having to adjust to each and every change in LLVM API, regardless if sensible or not (I seem to recall from so me articles that LLVM does introduce breaking changes in API from time to time?);
[1] https://golang.org/doc/faq#What_compiler_technology_is_used_...