4 ms·
The API cut ended up being in a different place with LLVM and WebAssembly. But the core idea still stands, and has been a hot potato for many years. In some way
by jlouis 4y ago
The API cut ended up being in a different place with LLVM and WebAssembly. But the core idea still stands, and has been a hot potato for many years. In some ways, things are better now since there are fewer architectures than in the 90'es, so you don't have to support that many backends. On the other, things are worse because the amount of work you have to sink into a backend is non-trivial and ever growing.
One particular key aspect is that languages which have strong functional features tend to mismatch with typical imperative backends. This has been true for LLVM. It is unfortunate, because in reality, most IRs are essentially best described as small functional languages: they make state passing explicit, as it exposes better optimization analysis. SSA-form is functional programming in disguise.
- WalterBright 4y agoYeah, not too many people write a back end these days.
- kasajian 4y agowhat's SSA-form?
- UncleMeat 4y agoAn IR form where each variable is assigned to exactly once. It makes reasoning about a lot of local properties cleaner since you know that the value of a register is set by its single def site. The idea has also been expanded to modeling heaps for aiding reasoning about field loads and stores.