Chapter 6: Installing and Using Binaryen
During the compilation process, compiled languages produce their own Intermediate Representation (IR). The compilers then optimize the IR to generate optimized code. Before passing it to LLVM, compilers should convert this IR into something that LLVM understands (LLVM IR). LLVM optimizes LLVM IR and produces native code (like the WebAssembly binary). These multiple IR generations and optimizations at different levels make the compilation process slower and not very effective. Binaryen tries to eliminate these multiple IR generations and uses its own IR.
(WebAssembly) Binary + Emscripten = Binaryen
Binaryen uses its own version of IR. Binaryen's IR is a subset of WebAssembly. Thus, it makes...