RFR: 8327963: C2: fix construction of memory graph around Initialize node to prevent incorrect execution if allocation is removed [v12]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Mon Sep 29 14:17:44 UTC 2025
On Mon, 29 Sep 2025 08:39:26 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> Thanks for adding the comment. A follow-up question: the full comment below makes the argument that _re-ordering by the compiler can't happen by construction_ because _a later Store that publishes the just allocated object reference is indirectly control dependent on the Initialize node_. However, in this case, there may be no such Initialize node (`init == nullptr || init->req() < InitializeNode::RawStores`). I assume the memory barrier relaxation is still OK in this scenario because we cannot have later, publishing stores of the allocated object reference? That is, if there exists such a store then there must necessarily exist an Initialize node? Or is there any other reason I am missing? It would be good to clarify this point in the comment.
>
> I updated the comment. Can you have a look?
Thanks for the clarification and the pointer to the comment in `initialize_object`, that helps.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24570#discussion_r2388155433
More information about the graal-dev
mailing list