Workshop: LLVM-HPC2026: The Twelfth Workshop on the LLVM Compiler Infrastructure in HPC
Authors: David Rivera (Ontario Tech University), Bruno Cardoso Lopes (Meta), Joseph Huber (Advanced Micro Devices (AMD)), and Konstantinos Parasyris (Intel)
Abstract: ClangIR (CIR) is a high-level, MLIR-based intermediate representation that preserves source-level semantics between the C/C++ AST and LLVM IR, but its support for heterogeneous programming models has been largely unexplored. We present a path for compiling CUDA and HIP code through CIR, and show that it requires almost no new IR surface: kernels and device functions reuse cir.func, CIR’s intrinsic-call mechanism, and a small set of carry-across attributes lets whole-module runtime registration be deferred until a later pass can synthesize it. A single principle organizes the design—each decision is made at the earliest pipeline stage that has the information it needs—so the language-parameterized pipeline serves NVPTX and AMDGPU. Across PolyBench/GPU, our implementation compiles all benchmarks for NVPTX and AMDGPU architectures and runs them at parity with original Clang on an NVIDIA H100 and an AMD MI300X, at a compile-time cost of roughly 3%.
Back to LLVM-HPC2026: The Twelfth Workshop on the LLVM Compiler Infrastructure in HPC Archive Listing
Back to Full Workshop Archive Listing