[lworld] RFR: 8253113: [lworld] [lw3] C1 should avoid copying element of flattened arrays when reading a sub-element [v3]

Frederic Parain fparain at openjdk.java.net
Tue Sep 15 14:13:44 UTC 2020


On Tue, 15 Sep 2020 07:14:22 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   More refactoring
>
> src/hotspot/share/c1/c1_LIRGenerator.cpp line 1598:
> 
>> 1596: };
>> 1597:
>> 1598: void LIRGenerator::access_sub_element(LIRItem& array, LIRItem& index, LIR_Opr& result, ciField* field, int
>> sub_offset) {
> 
> There is quite some code duplication here with access_flattened_array, can we factor it out?

Code has been refactored, and the common code in access_flattened_array() and access_sub_element() is now shared in the
new method get_and_load_element_address().

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

PR: https://git.openjdk.java.net/valhalla/pull/187


More information about the valhalla-dev mailing list