| ▲ | pizlonator 7 hours ago | |
> Industry trend of building high-level language-specific IRs "Trend"? This was always the best practice. It's not a "trend". | ||
| ▲ | sjrd 5 hours ago | parent [-] | |
It seems to me that there's a certain "blindness" between two compiler worlds. Compiler engineers for mostly linear-memory languages tend to only think in terms of SSA, and assume it's the only reasonable way to perform optimizations. That transpires in this particular article: the only difference between an AST and what they call IR is that the latter is SSA-based. So it's like for them something that's not SSA is not a "serious" data structure in which you can perform optimizations, i.e., it can't be an IR. On the other side, you actually have a bunch of languages, typically GC-based for some reason, whose compilers use expression-based structures. Either in the form of an AST or stack-based IR. These compilers don't lack any optimization opportunities compared to SSA-based ones. However it often happens that compiler authors for those (I am one of them) don't always realize all the optimization set that SSA compilers do, although they could very well be applied in their AST/stack-based IR as well. | ||