3 ms·
The IR doesn't have to cater to programmers in the same way, and can support many choices of semantics simultaneously in a single program. For example, LLVM IR
by Rusky 2y ago
The IR doesn't have to cater to programmers in the same way, and can support many choices of semantics simultaneously in a single program.
For example, LLVM IR is used to compile C both with and without strict aliasing. The choice is lowered into metadata applied to individual pointer operations. Similarly with signed integer overflow.
Nim could even have gotten some of this benefit when compiling to C if it had been willing to target a specific set of C compilers, rather than standard C.