RFR: 8263361: Incorrect arraycopy stub selected by C2 for SATB collectors [v2]
Vladimir Ivanov
vlivanov at openjdk.java.net
Mon Mar 15 18:15:14 UTC 2021
On Mon, 15 Mar 2021 14:01:01 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:
>> src/hotspot/share/opto/library_call.cpp line 4147:
>>
>>> 4145: // Generate a direct call to the right arraycopy function(s).
>>> 4146: // Clones are always tightly coupled.
>>> 4147: ArrayCopyNode* ac = ArrayCopyNode::make(this, true, obj, intcon(0), alloc_obj, intcon(0), obj_length, true, false);
>>
>>> I also fix a bug in library_call kit where arraycopy for clones doesn't get marked as tightly coupled - The call to tightly_coupled_allocation can't be used when the IR isn't constructed yet.
>>
>> Can you elaborate, please, on the problem with `tightly_coupled_allocation()`?
>> If it can't be relied upon during parsing, then all other usages in `LibraryCallKit` have the same problem, don't they?
>
> Yes - they might all be wrong - but it depends. In this particular case - tightly_coupled_allocation tries to look at the false path too see if it is a uncommon_trap - which is the only allowed control flow. But that part hasn't been expanded yet - so it is only a safepoint holding the parsing state.
Ok. Please, file a bug to inspect other usages of `LibraryCallKit::tightly_coupled_allocation()`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3008
More information about the hotspot-compiler-dev
mailing list