RFR: 8342941: IGV: Add new graph dumps for post loop, empty loop removal, and one iteration removal [v2]
    Christian Hagedorn 
    chagedorn at openjdk.org
       
    Mon Jul  7 08:01:45 UTC 2025
    
    
  
On Thu, 12 Jun 2025 22:47:43 GMT, Saranya Natarajan <snatarajan at openjdk.org> wrote:
>> This changeset adds BEFORE/AFTER graph dumps for creating a post loop (`insert_post_loop()`), removing an empty loop (`do_remove_empty_loop()`), and removing a one iteration loop (`do_one_iteration_loop()`).
>> 
>> Changes:
>> - Added `BEFORE_POST_LOOP` and `AFTER_POST_LOOP` for dumping graphs before and after `insert_post_loop()`.
>> - Added `BEFORE_REMOVE_EMPTY_LOOP` and `AFTER_REMOVE_EMPTY_LOOP` for dumping graphs before and after `do_remove_empty_loop()`.
>> - Added `BEFORE_ONE_ITERATION_LOOP` and `AFTER_ONE_ITERATION_LOOP` for dumping graphs before and after `do_one_iteration_loop()`.
>> 
>> Below are sample screenshots (IGV print level 4 ) mainly showing the new phase .
>> 1. `BEFORE_POST_LOOP` and `AFTER_POST_LOOP` 
>> 
>> 2. `BEFORE_POST_LOOP` and `AFTER_POST_LOOP` with SuperWordLoopUnrollAnalysis enabled
>> 
>> 3.` BEFORE_REMOVE_EMPTY_LOOP `and `AFTER_REMOVE_EMPTY_LOOP`
>> 
>> 4. `BEFORE_ONE_ITERATION_LOOP` and `AFTER_ONE_ITERATION_LOOP`
>> 
>> 
>> Question to reviewers:
>> Are the new compiler phases OK, or should we change anything?
>> 
>> Testing:
>> GitHub Actions
>> tier1 to tier5 on windows-x64, linux-x64, linux-aarch64, macosx-x64, and macosx-aarch64.
>> Tested that thousands of graphs are correctly opened and visualized with IGV using the same test used in ([JDK-8317349](https://bugs.openjdk.org/browse/JDK-8317349))
>
> Saranya Natarajan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Addressing review comments
Otherwise, looks good, thanks! You should merge in latest master to resolve the conflicts.
src/hotspot/share/opto/phasetype.hpp line 79:
> 77:   flags(AFTER_REMOVE_EMPTY_LOOP,        "After Remove Empty Loops") \
> 78:   flags(BEFORE_ONE_ITERATION_LOOP,      "Before Replacing One Iteration Loops") \
> 79:   flags(AFTER_ONE_INTERATION_LOOP,      "After Replacing One Iteration Loops") \
There is a typo for `AFTER_ONE_INTERATION_LOOP` -> `ITERATION`
Nit: We only apply it for one loop and thus you can remove the trailing `s`.
Suggestion:
  flags(BEFORE_POST_LOOP,               "Before Post Loop") \
  flags(AFTER_POST_LOOP,                "After Post Loop") \
  flags(BEFORE_REMOVE_EMPTY_LOOP,       "Before Remove Empty Loop") \
  flags(AFTER_REMOVE_EMPTY_LOOP,        "After Remove Empty Loop") \
  flags(BEFORE_ONE_ITERATION_LOOP,      "Before Replacing One Iteration Loop") \
  flags(AFTER_ONE_ITERATION_LOOP,      "After Replacing One Iteration Loop") \
-------------
Marked as reviewed by chagedorn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25756#pullrequestreview-2992625351
PR Review Comment: https://git.openjdk.org/jdk/pull/25756#discussion_r2189277869
    
    
More information about the hotspot-compiler-dev
mailing list