RFR: 8348411: C2: Remove the control input of LoadKlassNode and LoadNKlassNode [v3]
Vladimir Ivanov
vlivanov at openjdk.org
Thu Jan 30 16:42:00 UTC 2025
On Thu, 30 Jan 2025 07:52:45 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> Indeed, control does look redundant here. Once `array_klass` becomes a constant, the corresponding `LoadKlass` node should constant fold into a constant as well and the original control is gone anyway.
>>
>> (It's worth adding an assert here that `a_e_klass` is a constant when `array_klass` is a constant (and `StressReflectiveCode == false`).
>
> I assume that asserting `StressReflectiveCode || array_klass->is_Con() == a_e_klass->is_Con()` is correct.
Yes, it looks good. I suggest to invert the order of the checks to make the intention clearer (`a_e_klass->is_Con() == array_klass->is_Con() || StressReflectiveCode`).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23274#discussion_r1935922289
More information about the hotspot-compiler-dev
mailing list