MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
The ll_nvptx Plugin

See also
-X ll_nvptx:<arg>
mim::plug::ll_nvptx

An LLVM backend that targets NVIDIA GPUs. Loading this plugin (mim foo.mim -p ll_nvptx) appends an emission phase to the compilation pipeline that splits the fully lowered program into a host world and a device world. It writes the host LLVM IR to <world>.ll and the device LLVM IR (with PTX intrinsics) to <world>_dev.ll, and — on Linux by default — compiles and embeds the device binary into the host LLVM IR. The output paths and the embedding behavior can be overridden via -X ll_nvptx:<arg>.

Dependencies

plugin gpu;
plugin nvptx;
plugin opt;
import compile;

Phases

emit

Emits the LLVM IR with PTX intrinsics for the host and device worlds split from the current world. This phase is spliced into the default pipeline (see opt) whenever the ll_nvptx plugin is loaded.

axm emit: compile.Phase;