RFR: 8330853: Add missing checks for ConnectionGraph::can_reduce_cmp() call [v2]

Vladimir Kozlov kvn at openjdk.org
Wed Apr 24 18:14:28 UTC 2024


On Wed, 24 Apr 2024 17:46:47 GMT, Igor Veresov <iveresov at openjdk.org> wrote:

>> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove redundant opcode check
>
> src/hotspot/share/opto/escape.cpp line 576:
> 
>> 574:             if ((opc == Op_CmpP || opc == Op_CmpN) && !can_reduce_cmp(n, iff_cmp)) {
>> 575:               NOT_PRODUCT(if (TraceReduceAllocationMerges) tty->print_cr("Can NOT reduce Phi %d on invocation %d. CastPP %d doesn't have simple control.", n->_idx, _invocation, use->_idx);)
>> 576:               NOT_PRODUCT(n->dump(5);)
> 
> It's a preexisting problem but do you want to call `dump()` unconditionally? Shouldn't it be under `if (TraceReduceAllocationMerges)` ?

Thank oyu, @veresov 
Yes, it should be under flag. Thank you for spotting it. I will check other places in EA too.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18916#discussion_r1578322472


More information about the hotspot-compiler-dev mailing list