Integrated: 8348411: C2: Remove the control input of LoadKlassNode and LoadNKlassNode

Quan Anh Mai qamai at openjdk.org
Sat Feb 8 04:23:18 UTC 2025


On Thu, 23 Jan 2025 17:22:02 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: e9278de3
Author:    Quan Anh Mai <qamai at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e9278de3f8676c288bfdce96f8348470e7c42900
Stats:     60 lines in 10 files changed: 5 ins; 18 del; 37 mod

8348411: C2: Remove the control input of LoadKlassNode and LoadNKlassNode

Reviewed-by: vlivanov, epeter

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

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


More information about the hotspot-compiler-dev mailing list