RFR: 8260473: [vector] ZGC: VectorReshape test produces incorrect results with ZGC enabled [v4]
Nils Eliasson
neliasso at openjdk.java.net
Fri Jan 29 16:34:40 UTC 2021
On Fri, 29 Jan 2021 08:24:13 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
>>> > ArrayCopyNode::load performs the same work as it does here in PhaseVector::optimize_vector_boxes .
>>> > Is there a need to provide a similar function in PhaseVector or GraphKit?
>>>
>>> My point is since PhaseVector effectively enters the parsing phase (by signaling about the possibility of post-parse inlining), technically I don't see why `GraphKit::access_load_at` won't work. But I need to spend more time looking into the details.
>>>
>>> So far, I took a look at the review thread of 8212243 (which introduced `ArrayCopyNode::load`) and found the following discussion between Roland and Erik:
>>> https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2018-October/030971.html
>>>
>>> ```
>>> > ... Also it beats me that this is strictly speaking a load barrier for loads performed in
>>> > arraycopy. Would it be possible to use something like access_load_at instead? ...
>>> ...
>>> GraphKit is a parse time only thing. So the existing gc interface
>>> doesn't offer any way to add barriers once parsing is over. This code
>>> runs after parsing in optimization phases.
>>> ...
>>> ```
>>>
>>> Considering `PhaseVector::optimize_vector_boxes()` already has access to a usable `GraphKit` instance, it is possible that `GraphKit::access_load_at` will "just work".
>>
>> As far as I can see, during the parse phase, GraphKit contains the jvm state info which can be used to get the control and memory for creating new nodes. But during optimization, the jvm state info may be missing like the situation in `PhaseVector::optimize_vector_boxes` or Macro Expansion. So it should use C2OptAccess to create the Load Node directly by providing control and memory nodes.
>>
>> I think a similar api like `GraphKit::access_load_at ` should be provided for usage during optimization stages, but where should the API be placed? GraphKit or PhaseIterGVN or somewhere else?
>
>> Considering `PhaseVector::optimize_vector_boxes()` already has access to a usable `GraphKit` instance, it is possible that `GraphKit::access_load_at` will "just work".
>
> The main thing to make sure you get right, is the aliasing. I'm not sure that will work right after parsing, the way it works now.
I suggest you keep this CR as it is since 16 is in rampdown and we need to get approval and push it before Feb 4th (and we do want some margin).
Open an enhancement on 17 to fix the api.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2253
More information about the hotspot-gc-dev
mailing list