RFR: 8351833: Unexpected increase in live nodes when splitting Phis through MergeMems in PhiNode::Ideal [v3]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Fri Apr 11 13:34:43 UTC 2025
On Thu, 10 Apr 2025 11:37:55 GMT, Daniel Lundén <dlunden at openjdk.org> wrote:
>> src/hotspot/share/opto/phaseX.cpp line 1058:
>>
>>> 1056: // Ensure we did not increase the live node count with more than
>>> 1057: // max_live_nodes_increase_per_iteration during the call to transform_old
>>> 1058: DEBUG_ONLY(int increase = live_nodes_after - live_nodes_before;)
>>
>> For consistency with the surrounding code, maybe you could define these as `NOT_PRODUCT`, and possibly group them under `#ifndef PRODUCT` blocks?
>
> As we discussed offline, there is a subtle difference between `NOT_PRODUCT` and `DEBUG_ONLY`. `NOT_PRODUCT` also runs in non-product "optimized" builds where asserts are disabled, and I really only want this code to run when asserts are enabled. Therefore, I believe `DEBUG_ONLY` (or alternatively `#ifdef ASSERT`) is most suitable here.
Fair enough, thanks for the clarification!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24325#discussion_r2039573857
More information about the hotspot-compiler-dev
mailing list