Integrated: 8275847: Scheduling fails with "too many D-U pinch points" on small method

Nick Gasson ngasson at openjdk.java.net
Mon Nov 8 06:43:48 UTC 2021


On Wed, 27 Oct 2021 06:25:22 GMT, Nick Gasson <ngasson at openjdk.org> wrote:

> Since around JDK 16 the following method cannot be compiled by C2 on AArch64:
> 
> 
>   public double mergeSync() { return Math.log(Math.sin(value)); }
> 
> 
> (Reduced from a slightly larger benchmark.)
> 
> 
>   811 416 ! 3 Test::mergeSync (61 bytes)
>   813 417 ! 4 Test::mergeSync (61 bytes)
>   816 417 ! 4 Test::mergeSync (61 bytes) COMPILE SKIPPED: too many D-U pinch points (retry at different tier)
>   816 418 ! 1 Test::mergeSync (61 bytes)
> 
> 
> Scheduling::anti_do_def() will create temporary Nodes for each OptoReg killed by the MachProjs from the two runtime leaf calls.  After SVE support was added these runtime calls kill more registers, and the number of new Nodes added by anti_do_def exceeds an internal limit (which is based on the LRG map size and roughly proportional to the method size).
> 
> X86 has the same problem if OptoScheduling is enabled because of the wide AVX registers.
> 
> The fix here is to ignore OptoRegs which correspond to the high slots of wide vectors (i.e. slots above 64 bits).  The scheduler doesn't run on methods where C->max_vector_size() > 8, so we know these kills can't affect the scheduling result.
> 
> The added test fails on the current JDK with:
> 
> 
>   compiler.lib.ir_framework.shared.TestRunException: Could not compile public double
>   compiler.c2.irTests.TestScheduleSmallMethod.testSmallMethodTwoRuntimeCalls(double) at level C2
>   after 10s. Last compilation level: 3

This pull request has now been integrated.

Changeset: 3934fe54
Author:    Nick Gasson <ngasson at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/3934fe54b4c3e51add6d3fe1f145e5aebfe3b2fc
Stats:     89 lines in 4 files changed: 74 ins; 10 del; 5 mod

8275847: Scheduling fails with "too many D-U pinch points" on small method

Reviewed-by: thartmann, kvn

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

PR: https://git.openjdk.java.net/jdk/pull/6131


More information about the hotspot-compiler-dev mailing list