Integrated: 8276455: C2: iterative EA
Vladimir Kozlov
kvn at openjdk.java.net
Tue Dec 14 19:28:40 UTC 2021
On Wed, 3 Nov 2021 01:44:49 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
> Resolve C2 issue with nested initialization when Escape Analysis can not scalarize allocations: `new A(new B( new C)))`
> Implemented iterative EA when C2 invokes it again if there are progress and candidates.
>
> I added JMH microbenchmark with cases which show improvements. Improvements are due to removed allocation code.
>
> Before:
>
> Benchmark Mode Cnt Score Error Units
> IterativeEA.test1 avgt 5 11.489 ± 3.037 ns/op
> IterativeEA.test2 avgt 5 16.103 ± 3.686 ns/op
> IterativeEA.test3 avgt 5 1988.827 ± 217.831 ns/op
>
> With these changes:
>
> IterativeEA.test1 avgt 5 2.182 ± 0.022 ns/op
> IterativeEA.test2 avgt 5 2.375 ± 0.001 ns/op
> IterativeEA.test3 avgt 5 821.011 ± 8.268 ns/op
>
>
> An other JMH test:
>
> PointerBenchmarkFlat.test avgt 30 23.232 ± 6.507 ms/op
>
> vs
>
> PointerBenchmarkFlat.test avgt 30 0.299 ± 0.001 ms/op
This pull request has now been integrated.
Changeset: a1dfe572
Author: Vladimir Kozlov <kvn at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/a1dfe57249db15c0c05d33a0014ac914a7093089
Stats: 571 lines in 10 files changed: 541 ins; 14 del; 16 mod
8276455: C2: iterative EA
Reviewed-by: iveresov, neliasso, roland
-------------
PR: https://git.openjdk.java.net/jdk/pull/6222
More information about the hotspot-compiler-dev
mailing list