RFR: 8366861: Phase AFTER_LOOP_OPTS printed even though the method has no loops [v2]

Saranya Natarajan snatarajan at openjdk.org
Mon Jan 26 15:32:29 UTC 2026


> **Issue**
> When a test program with no loop is run with flag `-XX:PrintPhaseLevel=3,` the output prints `PHASE_AFTER_LOOP_OPTS `but does not print `PHASE_BEFORE_LOOP_OPTS`
> 
> **Solution** 
> This simple fix introduces a variable  `_print_phase_loop_opts` that caches the value of `has_loops()` before loop opts pass to make sure that `PHASE_AFTER_LOOP_OPTS` gets printed every time `PHASE_BEFORE_LOOP_OPTS` is printed.
> 
> Before fix output
> <img width="394" height="608" alt="image" src="https://github.com/user-attachments/assets/753001da-a020-45cc-9db1-00f9c9c79bd2" />
> 
> After fix output
> <img width="394" height="608" alt="image" src="https://github.com/user-attachments/assets/cc49854f-afa1-42a9-a87c-9f763f7daeb4" />
> 
> 
> **Testing** 
>  Github Actions, Tier 1-3

Saranya Natarajan has updated the pull request incrementally with one additional commit since the last revision:

  fixing comment

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/29387/files
  - new: https://git.openjdk.org/jdk/pull/29387/files/aec3078a..ef89a737

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29387&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29387&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/29387.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29387/head:pull/29387

PR: https://git.openjdk.org/jdk/pull/29387


More information about the hotspot-compiler-dev mailing list