RFR: JDK-8316756: C2 EA fails with "missing memory path" when encountering unsafe_arraycopy stub call [v3]

Christian Hagedorn chagedorn at openjdk.org
Tue Jan 16 12:35:23 UTC 2024


On Tue, 16 Jan 2024 11:37:19 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Tobias Holenstein has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   added testcase
>
> src/hotspot/share/opto/escape.cpp line 4010:
> 
>> 4008:       }
>> 4009:     } else if (n->is_CallLeaf()) {
>> 4010:       // Runtime calls with narrow memory input (no MergeMem node)
> 
> Could we somehow assert here that we have a call with an intended narrow memory input? Directly asserting that this is an unsafe arraycopy might be too specific. But maybe we can add the following sanity check?
> 
> n->as_CallLeaf()->adr_type()->is_rawptr()

Okay, it does not always need to be raw memory. But maybe we still want to assert that we have an unsafe arraycopy in this case? If we ever have more valid cases, the assert could easily be adjusted to allow them. 

But given how close we are to RDP 2, I suggest to go with this general fix and follow up with an RFE to add that assert if you all agree with that.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17347#discussion_r1453362468


More information about the hotspot-compiler-dev mailing list