RFR: aaload/aastore profiling

Roland Westrelin rwestrel at redhat.com
Thu Nov 14 09:55:57 UTC 2019


This patch adds profiling for aaload and aastore in order to improve
code generation for inline types.

Array type, element type whether the array is flat or null free are
collected for both aaload and aastore. aastore already collects some
profiling (element type). In practice, the new profile collection scheme
at aastore replaces the old one.

The patch includes changes to C2 so it leverages the new profiling. At
an aaload, if profiling reports a single array type, c2 casts the array
type to the profiled type if it helps avoid a flat array
check. Otherwise, if profiling reports no accurate type for the array,
c2 can cast the array to non flat or non null free based on profile

MonomorphicArrayCheck is also modified to take advantage of the new
profiling. So at an aastore, if profile data sugggests an array type,
the array should be always casted to that array type.


More information about the valhalla-dev mailing list