The Tapir/LLVM compiler

The Tapir/LLVM compiler compiles and optimizes Cilk programs to allow for efficient parallel execution on shared-memory multicore machines. Tapir/LLVM produces more efficient parallel code than existing compilers for parallel programming languages. The current version of Tapir/LLVM is based on LLVM version 5.

What is Tapir?

Tapir enables effective compiler optimization of Cilk programs that mainstream compilers, such as GCC, ICC, and LLVM, do not perform. Mainstream compilers for Cilk and OpenMP programs treat parallel language constructs as syntactic sugar for function calls into a parallel runtime system. Consequently, these compilers cannot perform effective compiler optimization across parallel control flow.

Tapir extends LLVM with a representation of logically parallel tasks. Tapir thereby allows LLVM’s existing optimizations to effectively optimize across parallel control constructs, i.e., across a cilk_spawn, cilk_sync, or cilk_for. As a result, Tapir/LLVM produces more efficient parallel executables than those of mainstream Cilk compilers. Figure 1 presents the performance results from (Schardl, Moses, & Leiserson, 2017) comparing the work-efficiency of Cilk programs compiled with Tapir/LLVM versus the traditional compilation approach:

Comparison of the work efficiency of 20 parallel application benchmarks compiled using Tapir/LLVM (X's) and a comparable Reference compiler (O's) which lowers parallel constructs in the compiler front end. Higher values indicate better work efficiency.

Work-efficiency performance results for Tapir/LLVM.

Publications

  1. Schardl, T. B., Moses, W. S., & Leiserson, C. E. (2017). Tapir: Embedding Fork-Join Parallelism into LLVM’s Intermediate Representation. In PPoPP (pp. 249–265). ACM. https://doi.org/10.1145/3018743.3018758

Last updated: