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 {llvm-base}.
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 {% cite SchardlMoLe17 %} comparing the
work-efficiency of Cilk programs compiled with Tapir/LLVM versus the
traditional compilation approach: