On Wed, 3 Jun 2026 16:43:15 GMT, Vladimir Kozlov <[email protected]> wrote:

> Few comments/questions.

Thanks for looking at this. I pushed a small update.

> src/hotspot/share/opto/escape.cpp line 4550:
> 
>> 4548:   if (es >= PointsToNode::GlobalEscape) {
>> 4549:     return false;
>> 4550:   }
> 
> Why not check here?  Asserts will not be needed then.
> 
>   const TypeOopPtr* t_base = _igvn->type(base)->is_oopptr();
>   if (t_base->instance_id() == toop->instance_id()) {
>     return true;
>   }

That method should return the same as:

t_base->instance_id() == toop->instance_id()


The problem is that igvn hasn't run so types haven't propagated and `t_base` 
has a good chance to be a value that's not up to date and can't be relied on.

So yes, what you suggest would work but if feels safer to me to checks that the 
types and the result of the method are consistent.

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

PR Comment: https://git.openjdk.org/valhalla/pull/2489#issuecomment-4623794591
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2489#discussion_r3357232825

Reply via email to