News for hackers. Stuff that matters.
Re:Go 1.7 is released by Tehnix on Monday August 15, 2016 @10:04PM (#12295030)
>A new compiler back end, based on static single-assignment form (SSA), has been under development for the past year

Huh, I was under the impression that either SSA or CPS was pretty standard for any serious compiler. Does anyone know why they didn't design it for this from the beginning? It's like one of the earlier things you learn when making actual compilers.

Re:Go 1.7 is released by enneff on Monday August 15, 2016 @10:18PM (#12295096)
It was more expedient to start with the Plan 9 tool chain that we had at the time. Ken was already familiar with the code base, which was small and compiled quickly (a few seconds). Because of this we got a lot done quickly, knowing that we would eventually modernize the compiler.
Re:Go 1.7 is released by thomasahle on Tuesday August 16, 2016 @03:13AM (#12295996)
How much is Ken involved in the language today?
Re:Go 1.7 is released by bradfitz on Tuesday August 16, 2016 @10:06AM (#12297528)
Ken is not really involved in the project these days. His last commit was in 2011, before Go 1 was even released.
Re:Go 1.7 is released by nathany on Tuesday August 16, 2016 @03:40PM (#12300049)
(afaik) He retired around the Go 1.0 release, though he showed up as unixken on reddit during a Go Ask Me Anything.

https://www.reddit.com/r/golang/comments/46bd5h/ama_we_are_t...

Re:Go 1.7 is released by pcwalton on Monday August 15, 2016 @10:05PM (#12295033)
> Huh, I was under the impression that either SSA or CPS was pretty standard for any serious compiler.

It was based on the Plan 9 compilers, which didn't use SSA.

Re:Go 1.7 is released by UniQP on Tuesday August 16, 2016 @02:49AM (#12295939)
SSA is standard for the middle end but not for the backend. According to my knowledge there are only two compilers with an SSA-based backend: libFirm (www.libfirm.org) and the Go compiler.
Re:Go 1.7 is released by chrisseaton on Tuesday August 16, 2016 @06:39AM (#12296543)
Obviously no backend is in SSA format after register allocation, but before allocation what do other compilers use if not SSA? Is there some kind of low-level LLVM and GCC IR separate from the front-end and middle one? That isn't in SSA?

I know that the C2 and Graal compilers are SSA all the way until register allocation is done.

Re:Go 1.7 is released by UniQP on Tuesday August 16, 2016 @08:33AM (#12297010)
You can stay in SSA form even after register allocation. In libFirm the assigned registers are just attributes of the values in the SSA representation. There was some additional discussion regarding this in [1].

GCC uses a separate representation (RTL) for their backend that is not in SSA form [2]. LLVM stays in SSA form for some backend phases but lowers the SSA form before register allocation (as also mentioned in [1]).

I took a quick look at the C2 and the Graal compiler. C2 seems to use LLVM's code generator (and thus lowers SSA before register allocation) but Graal seems to support SSA-based register allocation, nice.

[1] https://news.ycombinator.com/item?id=11210948

[2] https://en.wikibooks.org/wiki/GNU_C_Compiler_Internals/GNU_C...

Re:Go 1.7 is released by zigzigzag on Tuesday August 16, 2016 @01:22PM (#12298968)
I think you didn't understand Chris' post.

C2 is the HotSpot Server compiler. It definitely does not use LLVM anywhere.

Re:Go 1.7 is released by UniQP on Tuesday August 16, 2016 @05:55PM (#12300926)
Since there is also a programming language called C2, I took a look at the wrong compiler.

Can you provide a link to the source code?

Re:Go 1.7 is released by zigzigzag on Sunday August 21, 2016 @07:45AM (#12330540)