Y
Hacker News
new
|
ask
|
show
|
jobs
by
lowbloodsugar
1253 days ago
Have to assign variables to a bit of memory on the stack because SSA??
1 comments
int_19h
1253 days ago
LLVM has an optimization pass that takes care of that.
https://llvm.org/docs/Passes.html#passes-mem2reg
link
lowbloodsugar
1253 days ago
That's not the only way to do that tho? Or is that the recommended way to do it?
link
int_19h
1252 days ago
You can write your code generator to produce the optimized output right away, of course. But the whole point of LLVM is to not have every compiler worry about doing stuff like this well.
link
https://llvm.org/docs/Passes.html#passes-mem2reg