RFR: 8344116: C2: remove slice parameter from LoadNode::make [v6]

Roland Westrelin roland at openjdk.org
Tue Apr 8 13:14:25 UTC 2025


On Sat, 5 Apr 2025 14:29:28 GMT, Zihao Lin <duke at openjdk.org> wrote:

>> This patch remove slice parameter from LoadNode::make
>> 
>> Mention in https://github.com/openjdk/jdk/pull/21834#pullrequestreview-2429164805
>> 
>> Hi team, I am new, I'd appreciate any guidance. Thank a lot!
>
> Zihao Lin has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
> 
>  - Merge branch 'openjdk:master' into 8344116
>  - Fix build
>  - Fix test failed
>  - 8344116: C2: remove slice parameter from LoadNode::make

src/hotspot/share/gc/shared/c2/barrierSetC2.cpp line 223:

> 221:     MergeMemNode* mm = opt_access.mem();
> 222:     PhaseGVN& gvn = opt_access.gvn();
> 223:     Node* mem = mm->memory_at(gvn.C->get_alias_index(access.addr().type()));

Can we get rid of all uses of `access.addr().type()`?

src/hotspot/share/gc/shared/c2/cardTableBarrierSetC2.cpp line 105:

> 103:     // stores.  In theory we could relax the load from ctrl() to
> 104:     // no_ctrl, but that doesn't buy much latitude.
> 105:     Node* card_val = __ load( __ ctrl(), card_adr, TypeInt::BYTE, T_BYTE);

We could asssert that `C->get_alias_index(kit->type(card_adr) == Compile::AliasIdxRaw`, that is that computed slice is the same as hardcoded slide. Similar asserts could be added for every location where a slice/address type is removed in this patch.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24258#discussion_r2033149694
PR Review Comment: https://git.openjdk.org/jdk/pull/24258#discussion_r2033162534


More information about the shenandoah-dev mailing list