OpenMP is an industry-standard API for writing portable shared-memory parallel programs in C/C++/Fortran. Almost every mainstream compiler of these languages now supports compilation of OpenMP programs. However, we are not aware of any compiler framework which was designed from the ground up taking OpenMP semantics into account. Consequently, not all components of such frameworks are generally applicable (or conforming) to OpenMP parallel semantics. This half-day tutorial presents a new open-source source-to-source compiler framework called IMOP (IIT Madras OpenMP compiler), which addresses such limitations.
Each component in IMOP has been designed and implemented by taking OpenMP syntax and semantics into account. IMOP comprises of more than 154 kLOC in Java, and works on OpenMP C programs as its input. With its numerous unique features such as OpenMP-aware compilation, automatic generation of parallel variants of the serial data-flow passes, self-stabilization of program abstractions under program modifications, integration with the Z3 SMT solver, and so on, IMOP can significantly simplify the task of writing tools for program analysis, profiling, and optimizations. In this hands-on tutorial, we will teach the fundamentals and certain advanced concepts of IMOP to the participants, which can help them in the faster development of their research prototypes.