RFR: JDK-8287061: Support for rematerializing scalar replaced objects participating in allocation merges [v12]

Cesar Soares Lucas cslucas at openjdk.org
Tue May 9 19:06:36 UTC 2023


On Tue, 9 May 2023 00:03:26 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Cesar Soares Lucas has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
>> 
>>  - Merge remote-tracking branch 'origin/master' into rematerialization-of-merges
>>  - Address part of PR review 4 & fix a bug setting only_candidate
>>  - Catching up with master
>>    
>>    Merge remote-tracking branch 'origin/master' into rematerialization-of-merges
>>  - Fix tests. Remember previous reducible Phis.
>>  - Address PR review 3. Some comments and be able to abort compilation.
>>  - Merge with Master
>>  - Addressing PR review 2: refactor & reuse MacroExpand::scalar_replacement method.
>>  - Address PR feeedback 1: make ObjectMergeValue subclass of ObjectValue & create new IR class to represent scalarized merges.
>>  - Add support for SR'ing some inputs of merges used for field loads
>>  - Fix some typos and do some small refactorings.
>>  - ... and 2 more: https://git.openjdk.org/jdk/compare/561ec9c5...542c5ef1
>
> The new pass over deserialized debug info would adapt `ScopeDesc::objects()` (initialized by `decode_object_values(obj_decode_offset)` and accesses through `chunk->at(0)->scope()->objects()`) and produce 2 lists:
>   * new list of objects which enumerates all scalarized instances which needs to be rematerialized;
>   * complete set of objects referenced in the current scope (the purpose `chunk->at(0)->scope()->objects()` serves now).
> 
> It should be performed before `rematerialize_objects`.
> 
> By preprocessing I mean all the conditional checks before it is attempted to reallocate an `ObjectValue`. By the end of the new pass, it should be enough to just iterate over the new list of scalarized instances in `Deoptimization::realloc_objects`. And after `Deoptimization::realloc_objects` and `Deoptimization::reassign_fields` are over, debug info should be ready to go.

Thanks a lot for clarifying @iwanowww . I'll start working on that.

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

PR Comment: https://git.openjdk.org/jdk/pull/12897#issuecomment-1540738709


More information about the hotspot-dev mailing list