RFR: 8353341: C2: removal of a Mod[DF]Node crashes when the node is already dead [v2]
Marc Chevalier
mchevalier at openjdk.org
Wed Apr 2 07:57:22 UTC 2025
On Wed, 2 Apr 2025 07:41:01 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Marc Chevalier has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address review comments
>
> src/hotspot/share/opto/divnode.cpp line 1522:
>
>> 1520: bool result_is_unused = proj_out_or_null(TypeFunc::Parms) == nullptr;
>> 1521: bool is_dead = proj_out_or_null(TypeFunc::Control) == nullptr;
>> 1522: if (result_is_unused && !is_dead) {
>
> Might be easier to read when it's flipped to avoid negation with `!` but I leave it up to you to decide which one you prefer :-)
>
> bool not_dead = proj_out_or_null(TypeFunc::Control) != nullptr;
> if (result_is_unused && not_dead) {
I'd agree if I wrote `!not_dead`. But between writing `! a_positive_property` and `a_negative_property`, I'm much less decided.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24375#discussion_r2024275097
More information about the hotspot-compiler-dev
mailing list