RVSDG: An Intermediate Representation for Optimizing Compilers

12/10/2019
by   Nico Reissmann, et al.
0

Intermediate Representations (IRs) are central to optimizing compilers as the way the program is represented may enhance or limit analyses and transformations. Suitable IRs focus on exposing the most relevant information and establish invariants that different compiler passes can rely on. While control-flow centric IRs appear to be a natural fit for imperative programming languages, analyses required by compilers have increasingly shifted to understand data dependencies and work at multiple abstraction layers at the same time. This is partially evidenced in recent developments such as the MLIR proposed by Google for deep learning. However, rigorous use of data flow centric IRs in general purpose compilers has not been evaluated for feasibility and usability as previous works provide no practical implementations. We present the Regionalized Value State Dependence Graph (RVSDG) IR for optimizing compilers. The RVSDG is a data flow centric IR where nodes represent computations, edges represent computational dependencies, and regions capture the hierarchical structure of programs. It represents programs in demand-dependence form, implicitly supports structured control flow, and models entire programs within a single IR. We provide a complete specification of the RVSDG, construction and destruction methods, as well as exemplify its utility by presenting Dead Node and Common Node Elimination optimizations. We implemented a prototype compiler and evaluate it in terms of performance, code size, compilation time, and representational overhead. Our results indicate that the RVSDG can serve as a competitive IR in optimizing compilers while reducing complexity.

READ FULL TEXT
research
09/06/2021

QSSA: An SSA-based IR for Quantum Computing

Quantum computing hardware has progressed rapidly. Simultaneously, there...
research
09/09/2023

FAIR: Flow Type-Aware Pre-Training of Compiler Intermediate Representations

While the majority of existing pre-trained models from code learn source...
research
06/01/2023

Bridging Control-Centric and Data-Centric Optimization

With the rise of specialized hardware and new programming languages, cod...
research
01/18/2022

Lambda the Ultimate SSA: Optimizing Functional Programs in SSA

Static Single Assignment (SSA) is the workhorse of modern optimizing com...
research
10/20/2021

A Data-Centric Optimization Framework for Machine Learning

Rapid progress in deep learning is leading to a diverse set of quickly c...
research
12/01/2019

PointEval: On the Impact of Pointer Analysis Frameworks

Pointer analysis is a foundational analysis leveraged by various static ...
research
04/17/2019

Relay: A High-Level IR for Deep Learning

Frameworks for writing, compiling, and optimizing deep learning (DL) mod...

Please sign up or login with your details

Forgot password? Click here to reset