RFR: 8261137: Optimization of Box nodes in uncommon_trap [v8]

Vladimir Kozlov kvn at openjdk.java.net
Tue Mar 23 17:20:46 UTC 2021


On Fri, 19 Mar 2021 15:34:21 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Wang Huang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   refactor
>
> src/hotspot/share/opto/callGenerator.cpp line 597:
> 
>> 595:     Node* sobj = new SafePointScalarObjectNode(gvn.type(res)->isa_oopptr(),
>> 596: #ifdef ASSERT
>> 597:                                                   call->isa_Allocate(),
> 
> It is always `NULL` since `call` can't be an `Allocate`.

It was my suggestion to pass `call` node as allocation so that we could trace back for what node SafePointScalarObject was created because you may have several Box objects for which we create SafePointScalarObject nodes.
I think we can change argument (and field type) to CallNode. And have assert in SafePointScalarObject constructor to check that it is either Allocate node or Boxing Call node.

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

PR: https://git.openjdk.java.net/jdk/pull/2401


More information about the hotspot-compiler-dev mailing list