Some incremental inlining fixes

Roland Westrelin rwestrel at
Thu Mar 9 08:58:57 UTC 2017

With incremental inlining, an inlined call that returns a value type can
be first compiled as a call. The compiler then expects a ptr to the
result to be returned. When the method is inlined incrementally, it thus
has to return a ptr and so allocates an object for the value type. We
then rely on escape analysis + scalarization to eliminate the allocation
and obtain the same result we would get with parse time inlining. EA +
scalarization doesn't support value type ptrs. This change tweaks the
code so it is now enabled for them. Sometimes, a value type allocation
is not eliminated because it is referenced by a value type node itself
referenced by a safepoint. The change in SafePointNode::Ideal fixes
that. The change also includes some fixes to replay inlining to record
static fields that are value types and replay them.


More information about the valhalla-dev mailing list