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.
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.
https://www.reddit.com/r/golang/comments/46bd5h/ama_we_are_t...
It was based on the Plan 9 compilers, which didn't use SSA.
I know that the C2 and Graal compilers are SSA all the way until register allocation is done.
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...
C2 is the HotSpot Server compiler. It definitely does not use LLVM anywhere.
Can you provide a link to the source code?