Introduction

IMOP is a self-stabilizing source-to-IR-to-source transformation and analysis framework for OpenMP shared memory parallel programs written in ANSI C. The framework itself has been developed in the Java language. 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. By generating an OpenMP C program as its output, IMOP complements all the other standard compiler frameworks, such as LLVM and GCC, that are better suited for lower-level optimizations.

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 in response to 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. IMOP also provides the compiler writers access to lower level abstractions that can be used to hide the issues that may occur due to syntactic sugar inherent in the higher levels of program representations.

Currently, we support most of the OpenMP 4.0 specification for ANSI C. We are planning to handle OpenMP 5.0 as well as all the GCC extensions of C in future.

Intended Audience

Compiler Researchers for OpenMP C Parallel Programs
IMOP provides various basic building-blocks that you can use to implement new optimization tools for OpenMP C programs. Since IMOP works at the source-code level, implementation of source-to-source transformations and of source code analyses for OpenMP C programs is feasible. IMOP is specifically designed for shared memory OpenMP C programs, and thereby it already contains various elementary analyses (e.g., concurrency analysis) that are specific to such programs. We hope that these reusable modules will result in significant reduction in the development time of new tools.
Compiler Researchers for Sequential C Programs
Along with the OpenMP specific utilities, IMOP also provides various standard analyses and transformations for sequential C programs. Kindly refer to the FAQ page to know what is new in IMOP as compared to the other existing frameworks.
OpenMP C Programmers (End-users)
End-users can directly use command-line switches to enable required analyses/transformations provided by IMOP to ease the debugging, comprehension, and profiling of their OpenMP C programs. Furthermore, IMOP aims to ease the creation of new tools to such an extent that even the end-users can write basic customized tools as per their requirements.

Pedagogical Usecase

In a graduate-level course, Program Analysis (EVEN 2019), offered by Dr. Rupesh Nasre at the Department of CSE, IIT Madras, a short tutorial on IMOP was given to a class of about 30-35 students. IMOP was used by about half of the students as an alternative to the LLVM compiler framework, for implementing the final course assignment. Towards the end of the course, in a feedback form, the students gave an average rating of more than 4 (out of 5) each, while comparing IMOP to LLVM, in terms of programmability, code readability, and ease of debugging. The overall average rating for IMOP was 4.29/5.