Tapir: Embedding Fork-Join Parallelism into LLVM's Intermediate Representation

Tuesday, March 13, 2018
11:00 a.m.-12:00 p.m.
1146 AV Williams
Kara Stamets
301 405 4471

Speaker:  Dr. Tao B. Schardl, MIT


The Tapir/LLVM compiler embeds fork-join parallelism, as supported by concurrency platforms such as Cilk and OpenMP, into a compiler's intermediate representation (IR).  Mainstream compilers typically treat parallel linguistic constructs as syntactic sugar for function calls into a parallel runtime. These calls prevent the compiler from performing optimizations across parallel control constructs.  Remedying this situation has generally been thought to require an extensive reworking of compiler analyses and code transformations to handle parallel semantics.

Tapir is a compiler IR that represents logically parallel tasks asymmetrically in the program's control flow graph.  Tapir allows the compiler to optimize across parallel control constructs with only minor changes to its existing analyses and code transformations.  To prototype Tapir in the LLVM compiler, for example, we added or modified about 6000 lines of LLVM's 4-million-line codebase. These changes suffice to enable LLVM's existing compiler optimizations for serial code — including loop-invariant-code motion, common-subexpression elimination, and tail-recursion elimination — to work with parallel control constructs such as Cilk's spawn keyword and parallel loops.  Tapir also supports parallel optimizations such as loop scheduling. By making use of existing LLVM optimizations and parallel optimizations, Tapir/LLVM is able to optimize fork-join parallel programs more effectively than traditional compilation methods.

Biography: Tao B. Schardl is a Research Scientist in the MIT Computer Science and Artificial Intelligence Laboratory (CSAIL).  His research draws from both algorithms and systems to develop technologies that support principled, scientific approaches to writing fast code.  He has previously worked on parallel programming models, theories of performance, diagnostic tools, and compilers to simplify the task of software performance engineering.  His work on the Tapir/LLVM compiler earned the best paper award at the ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming in 2017. Dr. Schardl received his S.B. in Computer Science and Electrical Engineering from MIT in 2009, his M.Eng. in Computer Science and Electrical Engineering from MIT in 2010, and his Ph.D. in Computer Science and Engineering from MIT in 2016.

Audience: Graduate  Undergraduate  Faculty  Post-Docs 


February 2020

26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
1 2 3 4 5 6 7
Submit an Event