RFR: 8320649: C2: Optimize scoped values [v4]
Roland Westrelin
roland at openjdk.org
Tue Jan 30 09:24:24 UTC 2024
On Wed, 17 Jan 2024 15:13:37 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Roland Westrelin has updated the pull request incrementally with one additional commit since the last revision:
>>
>> merge fix
>
> src/hotspot/share/opto/intrinsicnode.cpp line 388:
>
>> 386: assert(in(0)->in(0)->in(1)->is_Bool(), "");
>> 387: assert(in(0)->in(0)->in(1)->in(1)->Opcode() == Op_ScopedValueGetHitsInCache, "");
>> 388: assert(in(0)->in(0)->in(1)->in(1) == in(1), "");
>
> Why not use your beautiful enum for addressing the inputs?
It's verifying that the ScopedValueGetLoadFromCache is indeed guarded by a ScopedValueGetHitsInCache. No use of the beautiful enum here.
> src/hotspot/share/opto/node.cpp line 977:
>
>> 975: }
>> 976:
>> 977: Node* Node::find_unique_out_with(int opcode) const {
>
> Random idea:
> Would it not be nice if this method automatically casted the node to that node-class?
> Suggestions:
> - using templates: give the class name and the opcode. A bit annoying to use
> - using macros: give it the node-type name: i.e. `Add` for `AddNode`. The macro then uses the template, filling in `AddNode` and `Op_Add`. What do you think?
Yes, it would but that out of scope for this PR.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16966#discussion_r1470830173
PR Review Comment: https://git.openjdk.org/jdk/pull/16966#discussion_r1470834145
More information about the hotspot-compiler-dev
mailing list