[lworld] RFR: 8335256: [lworld] C2: Remove larval InlineTypeNode [v5]

Tobias Hartmann thartmann at openjdk.org
Mon May 12 12:03:07 UTC 2025


On Fri, 9 May 2025 18:07:37 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> src/hotspot/share/opto/macro.cpp line 2907:
>> 
>>> 2905:   while (C->macro_count() > 0) {
>>> 2906:     if (iteration++ > 100) {
>>> 2907:       assert(false, "Too slow convergence of macro elimination");
>> 
>> Is this something that should be upstreamed to mainline?
>
> I think this mostly helps if we try to eliminate allocations without or before EA (because otherwise allocations should be scalarized at safepoints during EA already). As a result, it is necessary only if this is also done:
> 
>>  // Eliminate some macro nodes before EA to reduce analysis pressure

Sounds good. Let's leave it in Valhalla only for now.

>> src/hotspot/share/opto/macro.cpp line 2955:
>> 
>>> 2953:       case Node::Class_Unlock:
>>> 2954:         success = eliminate_locking_node(n->as_AbstractLock());
>>> 2955: #ifndef PRODUCT
>> 
>> Why is this change needed?
>
> `_has_locks` is not used any where. So I remove it and merge the 2 loops into 1. I don't see any reason why locks and allocations need to be eliminated separately.

Right but that's something that should be done in mainline (as well) then. Could you please file an RFE? We can still integrate it in Valhalla as part of this change.

>> src/hotspot/share/opto/parse2.cpp line 3600:
>> 
>>> 3598:     IdealGraphPrinter* printer = C->igv_printer();
>>> 3599:     char buffer[256];
>>> 3600:     jio_snprintf(buffer, sizeof(buffer), "Bytecode %d: %s, map: %d", bci(), Bytecodes::name(bc()), map() == nullptr ? -1 : map()->_idx);
>> 
>> Looks like this should be fixed in mainline?
>
> It can be, but it's one-line and it is nice to have so I think it can be here, too.

Right, let's leave it in Valhalla only for now.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1447#discussion_r2084516941
PR Review Comment: https://git.openjdk.org/valhalla/pull/1447#discussion_r2084518489
PR Review Comment: https://git.openjdk.org/valhalla/pull/1447#discussion_r2084519453


More information about the valhalla-dev mailing list