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

Wang Huang whuang at openjdk.java.net
Wed Mar 17 07:03:09 UTC 2021


On Wed, 10 Mar 2021 18:34:29 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> The improvement you are proposing is not specific to uncommon traps, but can be generalized to any debug usage at safepoints.
>> 
>> The downside is that, in general, rematerialization logic has to use the corresponding pure function in order to materialize the eliminated instance. In this particular case (primitive boxing), it has to take into account the caching effects of primitive box factories. Otherwise, user code can encounter identity paradoxes with rematerialized primitive box instances.
>> 
>> I don't see how the scalarization logic you propose preserves identity constraints imposed by `valueOf` factories.
>
>> @iwanowww Do you think we should add checks for EnableVectorAggressiveReboxing and EliminateAutoBox into deoptimization code or guard Vector API code and this optimization with C->do_escape_analysis()?
> 
> The former (additional checks for EnableVectorAggressiveReboxing and EliminateAutoBox). 
> Vector box elimination is unrelated to escape analysis pass and should work irrespective of whether EA is turned on or off.

@iwanowww Can you review my new 06 version? I have split `is_boxing_call` from `is_pure_call`. :-)

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

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


More information about the hotspot-compiler-dev mailing list