[lworld] RFR: 8266086: [lworld][lw3] C1 produces incorrect code when GlobalValueNumbering is used [v2]
fparain at openjdk.java.net
Thu Apr 29 14:19:16 UTC 2021
On Thu, 29 Apr 2021 14:14:33 GMT, Frederic Parain <fparain at openjdk.org> wrote:
>> Please review this fix in C1 GlobalValueNumbering.
>> The problem is that C1 doesn't track that a flattened field has been updated when it writes the individual values of this flattened field. The proposed fix is to record the enclosing flattened field with the StoreField node of each individual field, and use this information when the GlobalValueNumbering processes those nodes to kill the flattened field in the ValueMap.
>> Tested locally (Linux 64) with hotspot_valhalla (including new unit test) and jdk_valhalla test suites.
>> Thank you,
> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision:
> Fixes after initial review
Thank you for the review.
Most of the issues you spotted have been fixed on the latest commit.
Regarding the `all_offset == true` issue, it is needed to invalidate all field entries in the ValueMap. We would like to only invalidate the entries of the nested fields related to the flattened field. But there's no infrastructure yet to easily identity which fields are related to a given flattened field. So the conservative approach is to invalidate all field entries.
More information about the valhalla-dev