The LLVM backend. Loading this plugin (mim foo.mim -p ll) appends an emission phase to the compilation pipeline that writes the LLVM IR of the fully lowered program to <world>.ll (or a.ll if the world is unnamed). The output path can be overridden via the -X ll:o=<file> command-line argument; see Command-Line Arguments. Some intrinsics are lowered to calls into a small C runtime (rt/mim_rt.c) whose LLVM IR is embedded into or linked with the output, controlled via -X ll:rt=embed/extern.
This plugin reads the following plugin arguments (-X ll:<arg>):
| Argument | Effect |
|---|---|
| o=<file> output=<file> | Write the LLVM IR to <file> instead of the default <world>.ll/a.ll. |
| rt=embed rt=extern | How the C runtime wrappers reach the output: embed (default) splices their LLVM IR into the emitted module (self-contained); extern only declares them so the runtime is linked in separately. |
Emits the LLVM IR of the current world to <world>.ll (or to the path given via -X ll:o=<file>). This phase is spliced into the default pipeline (see opt) whenever the ll plugin is loaded.