RFR: 8356780: PhaseMacroExpand::_has_locks is unused [v2]
    Vladimir Kozlov 
    kvn at openjdk.org
       
    Fri Jun  6 14:44:50 UTC 2025
    
    
  
On Fri, 6 Jun 2025 09:37:30 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 one additional commit since the last revision:
> 
>   8356780: Update copyright
They are dependent. Allocation may be referenced in locks and will not be eliminated if locks are still in graph. That is why locks are eliminated first,
-------------
PR Review: https://git.openjdk.org/jdk/pull/25669#pullrequestreview-2905146374
    
    
More information about the hotspot-compiler-dev
mailing list