We consider an Ada program compiled with its native GCC-based toolchain (GNAT). The Ada front end parses and type-checks the source, and GCC lowers the program to GIMPLE-IR as part of its normal optimization pipeline. Instead of continuing to RTL and generating code for a GCC-supported architecture, we intercept the compilation at the GIMPLE level and feed the GIMPLE dump to our model IRIS.
IRIS translates the GIMPLE-IR into semantically equivalent LLVM-IR, which we then pass to the LLVM toolchain and compile to WebAssembly, a target not currently supported by GCC. At the time of writing, either GNAT LLVM provide direct support for compiling Ada to WebAssembly.
This pipeline effectively enables Ada code to run in WebAssembly environments without modifying the Ada front end or implementing a dedicated Ada-to-WebAssembly backend. It illustrates how IR-to-IR translation can decouple language front ends from specific back ends and open new deployment targets with minimal changes to existing comp