[lworld] Integrated: 8264586: [lworld] C2 compilation fails due to infinite loop in PhaseIterGVN::optimize

Tobias Hartmann thartmann at openjdk.java.net
Tue Apr 6 14:34:34 UTC 2021


On Tue, 6 Apr 2021 12:39:58 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> The problem is an `InlineTypePtrNode` that becomes dead after CCP removes a redundant null check and then keeps several other nodes alive. Since we don't run any loop opts anymore after CCP, the dead subgraph is not removed and the dead nodes are also not re-processed by `PhaseCCP::transform_once` to update their bottom types. As a result, two `LoadNodes` only used by a `ValueTypePtrNode` end up with types that are inconsistent with their bottom types and are re-enqueued for IGVN indefinitely by this code:
> https://github.com/openjdk/valhalla/blob/28a4ec0249fd86fe17f2b816c6f5f8eed31abfeb/src/hotspot/share/opto/memnode.cpp#L352-L358
> 
> I think we should aggressively remove `InlineTypePtrNodes` if they are no longer needed to keep track of the individual field values. I've added an Ideal transformation to take care of that.
> 
> The patch also includes a fix for an unrelated "Control flow was added although the intrinsic bailed out" failure and some cleanup/refactoring.
> 
> Thanks,
> Tobias

This pull request has now been integrated.

Changeset: 937f9b34
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/valhalla/commit/937f9b34
Stats:     66 lines in 6 files changed: 55 ins; 8 del; 3 mod

8264586: [lworld] C2 compilation fails due to infinite loop in PhaseIterGVN::optimize

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

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


More information about the valhalla-dev mailing list