Re:Golang dev.ssa branch merged into tip
by witty_username on Wednesday March 02, 2016 @05:30AM
(#11209120)
The LLVM docs say that clang uses mem2reg for mutable local variables, so it can't be very slow.
From the end of
http://llvm.org/docs/tutorial/LangImpl7.html#memory-in-llvm
> Proven and well tested: clang uses this technique for local mutable variables. As such, the most common clients of LLVM are using this to handle a bulk of their variables. You can be sure that bugs are found fast and fixed early.
Also LLVM requires you to either write your IR in SSA or add another expensive optimisation pass to make it SSA (mem2reg). Perhaps they thought writing an SSA generator would be too much of a headache.