[lworld] RFR: 8335256: [lworld] C2: Remove larval InlineTypeNode [v5]
Quan Anh Mai
qamai at openjdk.org
Fri May 9 18:03:13 UTC 2025
On Fri, 9 May 2025 09:11:06 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Quan Anh Mai has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits:
>>
>> - move progress check
>> - Merge branch 'lworld' into larvaloop
>> - fast path for non intrinsics
>> - fix test failures
>> - Merge branch 'lworld' into larvaloop
>> - remove larval InlineTypeNode
>
> src/hotspot/share/opto/inlinetypenode.cpp line 1100:
>
>> 1098: Node* base = is_loaded(phase);
>> 1099: if (base != nullptr && !base->is_InlineType() && !phase->type(base)->maybe_null() && AllocateNode::Ideal_allocation(base) == nullptr) {
>> 1100: if (oop != base || phase->type(is_buffered) != TypeInt::ONE) {
>
> Maybe use `InlineTypeNode::is_allocated` here instead?
`InlineTypeNode::is_allocated` tries to see if an `InlineTypeNode` is buffered, while this check tries to see if the node has `is_buffered` being `true` and `oop` being exactly `base`, not a random value. So it cannot be used here.
> 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.
> 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.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1447#discussion_r2082234017
PR Review Comment: https://git.openjdk.org/valhalla/pull/1447#discussion_r2082238906
PR Review Comment: https://git.openjdk.org/valhalla/pull/1447#discussion_r2082237006
More information about the valhalla-dev
mailing list