RFR: 8356780: PhaseMacroExpand::_has_locks is unused [v3]

Benoît Maillard duke at openjdk.org
Fri Jun 6 15:48:56 UTC 2025


On Fri, 6 Jun 2025 15:24:11 GMT, Benoît Maillard <duke at openjdk.org> wrote:

>> This PR introduces two cleanup changes to `PhaseMacroExpand`:
>> 
>> - Removes the unused field `PhaseMacroExpand::_has_locks`
>> - Merges two `while` loops in `PhaseMacroExpand::eliminate_macro_nodes` into a single loop
>> 
>> Previously, `eliminate_macro_nodes` used two separate `while` loops:
>> 
>> - The first loop removed lock nodes
>> - The second loop removed allocation nodes
>> 
>> Both loops had the same structure and independently traversed the same set of nodes. Since their operations do not interfere, the lock node removal logic was moved into the second loop as an additional case in the `switch` statement.
>> 
>> Thanks!
>
> Benoît Maillard has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Revert "8356780: Merge both while loops in PhaseMacroExpand::eliminate_macro_nodes"
>    
>    This reverts commit 13deb61de3e2a07d51e3692bb408971f6c18cecf.
>  - Revert "8356780: Remove useless assert"
>    
>    This reverts commit 4e7ee57981b9019d030ac59dc697a2470d8eb5eb.

I have reverted the changes related to the fusing of the two loops, and have created a new issue to investigate this separately: [JDK-8358788](https://bugs.openjdk.org/browse/JDK-8358788)

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

PR Comment: https://git.openjdk.org/jdk/pull/25669#issuecomment-2949688261


More information about the hotspot-compiler-dev mailing list