Towards a Standardized Intermediate Program Representation (SIR) for Performance Analysis

Thomas Fahringer, Michael Gerndt, Bernd Mohr, C. Seragiotto, Martin Schulz, H.L. Truong

Many performance tools rely on performance information (overheads, tracefiles, etc.) that is commonly obtained by statically instrumenting the source code or dynamically instrumenting an executable. Static instrumentation frequently imposes compiler dependencies whereas dynamic instrumentation may depend on symbol table information and is also very much hardware specific. In the worst case performance tool developers have to build separate instrumentation engines for every different programming language, which is a tedious and time consuming effort.

In this presentation we outline the ideas of a Standardized Intermediate Representation that can be an important interface between instrumentation engines and higher-level performance tools. The SIR is intended to be an abstract program representation for procedural and object-oriented programs. Basically a SIR contains information about statement and directive (e.g. OpenMP) types with very little details on the structure of individual statements and directives. Higher-level performance tools commonly only need to know the type of a statement in order to make a decision about specific instrumentation requests or performance analysis.

Based on the idea of the SIR, higher-level performance tools can request the generation of a SIR for arbitrary source programs. The performance tool can then traverse the SIR via a standard interface and requests for specific performance information or for instrumentation of specific code regions. Important is that the generation of a SIR based on a specific input program as well as the actual instrumentation is done by an external tool. On the basis of the SIR, higher-level performance tools can be provided with a high-level and portable instrumentation/profiling/monitoring interface for a broad variety of programming languages without dealing with low-level details such as instrumentation, tracing, etc.