RFR: 8345067: C2: enable implicit null checks for ZGC reads [v3]

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Fri May 16 07:51:59 UTC 2025


On Thu, 15 May 2025 13:23:21 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Roberto Castañeda Lozano has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Extend comments in zLoadP implementations to explain role of reload
>
> src/hotspot/share/opto/lcm.cpp line 80:
> 
>> 78: 
>> 79: void PhaseCFG::move_node_and_its_projections_to_block(Node* n, Block* b) {
>> 80:   assert(n->bottom_type() != Type::CONTROL, "cannot move control node");
> 
> I usually check `n->is_CFG()`.
> 
> What is the bottom type of an `IfNode`?
> `virtual const Type *bottom_type() const { return TypeTuple::IFBOTH; }`
> Are you aware of that?

Note that the analysis operates at the Mach level, where `Node::is_CFG()` is not complete anymore and `If` nodes have been replaced by their platform-dependent implementations. I replaced the `n->bottom_type() != Type::CONTROL` test with `!PhaseCFG::is_CFG(n)`, which is analogous to `Node::is_CFG()` at the Mach level (and covers some additional nodes without control type that should not be moved anyway), see commit b92500a2.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25066#discussion_r2092524938


More information about the hotspot-compiler-dev mailing list