Comparing Rapid Type Analysis with Points-To Analysis in GraalVM Native Image

Citation Author(s):
David
Kozák
Submitted by:
David Kozak
Last updated:
Mon, 07/08/2024 - 15:58
DOI:
10.21227/1z0r-vh96
Data Format:
License:
10 Views
Categories:
Keywords:
0
0 ratings - Please login to submit your rating.

Abstract 

Whole-program analysis is an essential technique that enables advanced compiler

optimizations. An important example of such a method is points-to analysis used

by ahead-of-time (AOT) compilers to discover program elements (classes, methods,

fields) that may be used on at least one program path during the run of the

program and hence need to be compiled. GraalVM Native Image uses a points-to

analysis to optimize Java applications, which is a time-consuming step of the

build. We explore how much the analysis time can be improved by replacing the

points-to analysis with a rapid type analysis (RTA), which computes reachable

elements faster by allowing more imprecision. We propose several extensions of

previous approaches to RTA, making it parallel, incremental, and supporting heap

snapshotting. We present an extensive experimental evaluation of the effects of

using RTA instead of points-to analysis, showing, e.g., that the analysis time

of Spring PetClinic can be reduced by 64 \% and the overall build time

by 35 \% at the cost of increasing the image size by 15 \%.

Instructions: 

The CSV contains the aggregated data of all our experiments. Rapid type analysis columns are denoted with the suffix 'reach', points-to analysis columns are denoted with the suffix 'points'. Otherwise, the format should be self-explanatory.