JDK-8289943 : [Umbrella] Simplify some object allocation merges
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 20
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-07-07
  • Updated: 2024-11-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
C2 Scalar Replacement implementation doesn't scalar replace allocation merges. There are some common cases where such merges can be scalar replaced if we first replace the Phi node that merges the allocations by a temporary node and then scalar replacing the Phi inputs in turn.
Comments
I'm going to use this issue as an umbrella issue. There are a few other improvements that we are already working on that fits under this work item.
24-07-2023

I see the PR for this issue was closed in favor of JDK-8287061 enhancement. Is this a dup of JDK-8287061 then?
21-07-2023

Setting fix version to 'tbd' because the JDK 20 fork is approaching.
06-12-2022

java/util/concurrent/tck/JSR166TestCase.java failed in Tier6 (ran with -Xcomp -ea -esa -XX:CompileThreshold=100 -XX:-TieredCompilation): java.lang.IncompatibleClassChangeError: Class java.lang.Object does not implement the requested interface java.util.concurrent.Executor vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java failed in Tier6 (ran with -XX:+UseZGC) # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000000000000, pid=30588, tid=35580
30-09-2022

New test compiler/c2/irTests/scalarReplacement/AllocationMergesTests.java failed in tier2 and tier3 when run with `-ea -esa -XX:CompileThreshold=100 -XX:-TieredCompilation` flags.: Failed IR Rules (2) of Methods (2) ---------------------------------- 1) Method "int compiler.c2.irTests.scalarReplacement.AllocationMergesTests.testCmpMergeWithNull(boolean,int,int)" - [Failed IR rules: 1]: * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeatureOr={}, applyIfCPUFeature={}, counts={}, applyIfAnd={}, failOn={"(.*precise .*\\\\R((.*(?i:mov|xorl|nop|spill).*|\\\\s*|.*LGHI.*)\\\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java)"}, applyIfOr={}, applyIfNot={})" - failOn: Graph contains forbidden nodes: * Regex 1: (.*precise .*\\R((.*(?i:mov|xorl|nop|spill).*|\\s*|.*LGHI.*)\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java) - Matched forbidden nodes (2): * 10e movq RSI, precise compiler/c2/irTests/scalarReplacement/AllocationMergesTests$Point: 0x00007fc8206ea068:Constant:exact * # ptr nop # 3 bytes pad for loops and calls 11b call,static wrapper for: _new_instance_Java * 128 movq RSI, precise compiler/c2/irTests/scalarReplacement/AllocationMergesTests$Point: 0x00007fc8206ea068:Constant:exact * # ptr nop # 1 bytes pad for loops and calls 133 call,static wrapper for: _new_instance_Java 2) Method "int compiler.c2.irTests.scalarReplacement.AllocationMergesTests.testMultiwayMerge(int,int)" - [Failed IR rules: 1]: * @IR rule 1: "@compiler.lib.ir_framework.IR(applyIfCPUFeatureAnd={}, applyIf={}, applyIfCPUFeatureOr={}, applyIfCPUFeature={}, counts={}, applyIfAnd={}, failOn={"(.*precise .*\\\\R((.*(?i:mov|xorl|nop|spill).*|\\\\s*|.*LGHI.*)\\\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java)"}, applyIfOr={}, applyIfNot={})" - failOn: Graph contains forbidden nodes: * Regex 1: (.*precise .*\\R((.*(?i:mov|xorl|nop|spill).*|\\s*|.*LGHI.*)\\R)*.*(?i:call,static).*wrapper for: _new_instance_Java) - Matched forbidden node: * 10a movq RSI, precise compiler/c2/irTests/scalarReplacement/AllocationMergesTests$Point: 0x00007fc8201c00b0:Constant:exact * # ptr 114 movl RBP, RDX # spill nop # 1 bytes pad for loops and calls 117 call,static wrapper for: _new_instance_Java
28-09-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9073 Date: 2022-06-07 23:24:02 +0000
07-07-2022