Lazy Sparse Conditional Constant Propagation in the Sea of Nodes
Conditional constant propagation is a compiler optimization that detects and propagates constant values for expressions in the input program taking unreachable branches into account. It uses a data flow analysis that traverses the program's control flow graph to discover instructions that produce constant values.
In this paper we document our work to adapt conditional constant propagation to the Sea of Nodes program representation of GraalVM. In the Sea of Nodes, the program is represented as a graph in which most nodes `float' and are only restricted by data flow edges. Classical data flow analysis is not possible in this setting because most operations are not ordered and not assigned to basic blocks.
We present a novel approach to data flow analysis optimized for the Sea of Nodes. The analysis starts from known constant nodes in the graph and propagates information directly along data flow edges. Most nodes in the graph can never contribute new constants and are therefore never visited, a property we call lazy iteration. Dependences on control flow are taken into account by evaluating SSA $\phi$ nodes in a particular order according to a carefully defined priority metric.
Our analysis is implemented in the GraalVM compiler. Experiments on the Renaissance benchmark suite show that lazy iteration only visits 20.5,% of all nodes in the graph. With the constants and unreachable branches found by our analysis, and previously undetected by the GraalVM compiler, we achieve an average speedup of 1.4,% over GraalVM's optimized baseline.
Thu 19 SepDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
10:30 - 11:50 | |||
10:30 25mPaper | Lazy Sparse Conditional Constant Propagation in the Sea of Nodes MPLR DOI | ||
10:55 25mPaper | Mutator-Driven Object Placement using Load Barriers MPLR A: Jonas Norlinder Uppsala University, A: Albert Mingkun Yang Oracle, A: David Black-Schaffer Uppsala University, A: Tobias Wrigstad Uppsala University DOI | ||
11:20 25mPaper | Interactive Programming for Microcontrollers by Offloading Dynamic Incremental Compilation MPLR A: Fumika Mochizuki University of Tokyo, A: Tetsuro Yamazaki University of Tokyo, A: Shigeru Chiba University of Tokyo DOI |