RFR: 8302145: ddepth should be uint in PhaseIdealLoop::register_node()

Eric Nothum duke at openjdk.org
Tue Jun 6 13:29:56 UTC 2023


Changed the type of the ddepth parameter in PhaseIdealLoop::register_node from int to uint, to avoid potentially unsafe uint -> int casts.
The method is often used with uint arguments, coming from dom_depth().
I have verified the calls of PhaseIdealLoop::register_node and have removed related casts.

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

Commit messages:
 - For readability: moved "*" to the left for the loop parameter
 - 8302145: Changed type of ddepth from int to int in PhaseIdealLoop::register_node

Changes: https://git.openjdk.org/jdk/pull/14333/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14333&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8302145
  Stats: 4 lines in 2 files changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/14333.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14333/head:pull/14333

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


More information about the hotspot-compiler-dev mailing list