Compiler Technologies for Exascale Research

The ROSE source-to-source compiler framework, developed at LLNL and with a wide community of external contributors, uses a pragmatic approach to allow average programmers to write customized analyses and optimizations for abstractions. ROSE is an open source compiler infrastructure to build source-to-source program transformation and analysis tools for large-scale C/C++, Fortran, OpenMP and UPC applications (with additional languages also being added). Given its fully type-resolved Abstract Syntax Tree (AST), ROSE faithfully preserves the representation of high-level abstractions at the source level, no required information to recognize such abstractions is lost, and the associated semantics can be reliably inferred. Using a source-to-source approach, ROSE complements existing vendor compilers by providing a fundamentally extensible way to simplify the optimization of standard and user-defined abstractions, thus achieving high performance without losing high productivity. It allows even non-expert users to exploit compiler techniques to address the analysis and transformation of abstractions.

Internal design of ROSE.

The figure shows the internal design of ROSE, divided into common compiler parts: Front-end (for language processing), Mid-end (for high-level analysis and optimization), and Back-end (for low level analysis, optimization, plus code generation). ROSE includes two levels of Intermediate Representation (IR), both a high-level IR and low-level IR. The high-level IR defines the structure of the original program without any loss in detail, thus permits modifications of the source code and its regeneration as source code. As an alternative to source code generation, the high level IR can be used to generate the low-level (LLVM) IR (a contribution from Rice and funded by DARPA). The low-level IR uses LLVM directly to support a common and well-defined low-level IR used widely for low-level optimizations. Existing program analysis in ROSE is packaged for use to define and build new architecture or domain specific optimizations and/or tools. ROSE includes a rich set of transformation capabilities (existing HPC loop optimizations, support for custom transformations, also a new AST rewrite system not yet released in ROSE).

ROSE has been used to take advantage of high-level abstractions to enhance performance, productivity, and portability. The ROSE team has developed a set of sophisticated semantic annotations to enable conventional sequential loop optimizations on user-defined array classes. These have been leveraged in prior work to define the parallelization opportunities solely using the high-level semantics of sophisticated C++ abstractions from libraries and user-defined C++ containers without using dependence analysis. Related work has combined both standard and user-defined semantics with Compiler analysis to further broaden the applicable scenarios of automatic parallelization on multi-core architectures. ROSE is an open source project that includes contributions from a wide range of compiler research groups to make it an attractive basis for compiler research within DOE.

For more information, please contact Dr. Dan Quinlan of Lawrence Livermore National Laboratory at [email protected].

 

 

ExaCT is funded by the DoE office of Advanced Scientific Computing Research (ASCR). Dr. Karen Pao is the program manager and Dr. William Harrod is the director of the ASCR Research Division. U.S. Department of Energy: Office of Science Stanford University The University of Utah Georgia Institute of Technology Lawrence Berkeley National Laboratory Lawrence Livermore National Laboratory Oak Ridge National Laboratory The University of Texas at Austin Rutgers: The State University of New Jersey National Renewable Energy Laboratory (NREL) Los Alamos National Laboratory Sandia National Laboratories