5 ms·
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 wa
by UniQP 10y ago
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 https://news.ycombinator.com/item?id=11210948
[2] https://en.wikibooks.org/wiki/GNU_C_Compiler_Internals/GNU_C_Compiler_Architecture#An_Overview_of_GCC_Architecture https://en.wikibooks.org/wiki/GNU_C_Compiler_Internals/GNU_C...
- zigzigzag 10y agoI think you didn't understand Chris' post. C2 is the HotSpot Server compiler. It definitely does not use LLVM anywhere.
- UniQP 10y agoSince 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?
- zigzigzag 10y agohttps://github.com/dmlloyd/openjdk/tree/jdk9/jdk9/hotspot/src/share/vm/opto https://github.com/dmlloyd/openjdk/tree/jdk9/jdk9/hotspot/sr...