10 ms·
I object to the article just associating the term "IR" with LLVM IR. IR is short for "Internal Representation". Most complex compilers have at least one level
by the_duke 10y ago
I object to the article just associating the term "IR" with LLVM IR.
IR is short for "Internal Representation". Most complex compilers have at least one level of IR, usually multiple ones that are progressively lower level.
The point is that an IR carries more information than machine code, and so potentially allows more specific optimizations.
This should at least be mentioned in the article.
Rust and Swift, for example, both use LLVM, but have their own intermediate levels of IR ('Mir' for Rust).
LLVM IR is already stripped of a lot of information that might be important for certain higher level optimizations. For example, numbers are all unsigned, and there are different operations for signed and unsigned arithmatic.
- exDM69 10y agoIn this context, IR stands for Intermediate Representation. Many if not most compilers have one or more intermediate representations, but most of them are not as rigorously specified as LLVM's.