[lworld] Integrated: 8251442: [lworld] C2 compilation fails with assert(value->bottom_type()->higher_equal(_type))

Tobias Hartmann thartmann at openjdk.java.net
Tue Aug 18 15:58:51 UTC 2020


On Tue, 18 Aug 2020 14:29:10 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> Similar to JDK-8242453 [1], the problem is that a load from a non-flat array can be pushed through an arraycopy from a
> flat array (see LoadNode::can_see_arraycopy_value) and end up with an inconsistent memory input (oop load from a flat
> array). The checks emitted by the arraycopy intrinsic will catch this and the load will be removed but other Ideal
> transformations can still be executed before that happens and encounter this inconsistent state.  The fix is to add
> CheckCastPPNodes to the arraycopy intrinsic that propagate the information that the src/dst array is not flat. This
> makes sure that the data path consistently dies if the input array is in fact a flat array. I've also removed the
> workaround from the JDK-8242453 [1] fix.  When updating the type of CheckCastPPNodes, we need to make sure that the
> not_null_free and not_flat properties of TypeAryPtr are propagated. This is done by TypeAryPtr::update_properties. A
> CheckCastPPNode that ends up with an inconsistent input is then simply replaced by TOP.  This change also includes:
> - Optimize subtype checks based on not_null_free/not_flat properties of array types
> - New tests to verify that checkcasts are folded if one array type is known to be not null-free/flat and the other type
>   is null-free/flat
> - Test suite should detect compilation bailouts and fail (currently, only completely missing compilations were detected)
> - Renamed "flat_array" to "flatten_array" (which means "flattened in arrays") for consistency with runtime code. We
>   should think about a better name.
> - Lots of refactoring, removal of default arguments in calls and dead code
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8242453

This pull request has now been integrated.

Changeset: 5d1350ef
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/valhalla/commit/5d1350ef
Stats:     451 lines in 18 files changed: 48 ins; 257 del; 146 mod

8251442: [lworld] C2 compilation fails with assert(value->bottom_type()->higher_equal(_type))

-------------

PR: https://git.openjdk.java.net/valhalla/pull/151



More information about the valhalla-dev mailing list