RFR: 8350756: C2 SuperWord Multiversioning: remove useless slow loop when the fast loop disappears [v2]
Emanuel Peter
epeter at openjdk.org
Tue Mar 4 09:23:23 UTC 2025
On Tue, 4 Mar 2025 07:53:04 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> for Christian v1
>
> src/hotspot/share/opto/opaquenode.hpp line 104:
>
>> 102: private:
>> 103: bool _is_delayed_slow_loop;
>> 104: bool _is_useful;
>
> I suggest to flip it to `_uselss` to be in line with what we have in `ParsePredicateNode`:
> https://github.com/openjdk/jdk/blob/1f10ffba88119caab169b1fc43ccfd143e3b85a6/src/hotspot/share/opto/cfgnode.hpp#L487-L489
>
> Then we could also add a `dump_spec()` method that print `#useless` if it becomes useless (similar to what we have for `ParsePredicateNode`):
> https://github.com/openjdk/jdk/blob/1f10ffba88119caab169b1fc43ccfd143e3b85a6/src/hotspot/share/opto/ifnode.cpp#L2227-L2229
>
> This is also useful to check in IGV if such an opaque node is useless or not.
>
> Side note: I'm in the process of having such a `_useless` flag for `OpaqueTemplateAssertionPredicate` nodes as well instead of directly replacing it with a constant. This seems cleaner and does not interfere with pattern matching.
Refactored `_is_useful` -> `_uselss`. Added `dump_spec`.
> src/hotspot/share/opto/opaquenode.hpp line 121:
>
>> 119: }
>> 120:
>> 121: void set_useless() {
>
> I suggest `mark_useless()` to be in line with `ParsePredicateNode`.
> Suggestion:
>
> void mark_useless() {
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23865#discussion_r1978980527
PR Review Comment: https://git.openjdk.org/jdk/pull/23865#discussion_r1978981017
More information about the hotspot-compiler-dev
mailing list