RFR: JDK-8277139 Improve code readability in PredecessorValidator (c1_IR.cpp) [v2]

Ludvig Janiuk duke at openjdk.java.net
Wed Nov 24 12:50:38 UTC 2021


> Refactor PredecessorValidator, more or less applying the following:
> 
> declare variables where used
> redeclare instead of reuse variables
> move assert to a more logical place
> remove unused length variable
> inline variables where senseful
> split loops
> extract methods
> 
> this is done in preparation for work on optimizing IR::verify. IR::verify calls PredecessorValidator. If the work of PredecessorValidator is made clearer, it will be easier to reason about where IR::verify doesn't need to be called (or where a subset of it would suffice).

Ludvig Janiuk has updated the pull request incrementally with one additional commit since the last revision:

  formatting: type asterisks

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6394/files
  - new: https://git.openjdk.java.net/jdk/pull/6394/files/71067986..8ed15361

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6394&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6394&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6394.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6394/head:pull/6394

PR: https://git.openjdk.java.net/jdk/pull/6394


More information about the hotspot-compiler-dev mailing list