RFR: 8348411: C2: Remove the control input of LoadKlassNode and LoadNKlassNode [v4]

Quan Anh Mai qamai at openjdk.org
Thu Jan 30 17:11:08 UTC 2025


> Hi,
> 
> This patch removes the control input of `LoadKlassNode` and `LoadNKlassNode`. They can only have a control input if created inside `Parse::array_store_check()`, the reason given is:
> 
>     // We are allowed to use the constant type only if cast succeeded
> 
> But this seems incorrect, the load from the constant type can be done regardless, and it will be constant-folded. This patch only makes that more formal and cleanup `LoadKlassNode::can_remove_control`.
> 
> Please take a look and leave your reviews, thanks a lot.

Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:

  format

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/23274/files
  - new: https://git.openjdk.org/jdk/pull/23274/files/c6761889..175232a6

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23274&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23274&range=02-03

  Stats: 5 lines in 1 file changed: 2 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/23274.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23274/head:pull/23274

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


More information about the hotspot-compiler-dev mailing list