RFR: 8266951: Partial in-lining for vectorized mismatch operation using AVX512 masked instructions [v7]

Jatin Bhateja jbhateja at openjdk.java.net
Mon May 31 15:18:53 UTC 2021


On Mon, 31 May 2021 07:55:40 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> src/hotspot/share/opto/library_call.cpp line 5251:
>> 
>>> 5249:       Node* cmp_res = _gvn.transform(new BoolNode(length_cmp, BoolTest::le));
>>> 5250: 
>>> 5251:       fast_path = generate_guard(cmp_res, NULL, PROB_MAX);
>> 
>> It looks confusing because `LibraryCallKit::generate_guard()` advertises the opposite.  
>> 
>> // In all cases, GraphKit::control() is updated to the fast path.
>> // The returned value represents the control for the slow path.
>> 
>> Is there a bug there (fast and slow path code swapped)?
>
> Also, what happens when the control implicitly set (fast path) is dead? I'd expect a `stopped()` check, but don't see any.

generate_guard() prefers a slow path if condition is evaluated to true. Thus I chose to pass the condition ( SIZE < ArrayOperationPartialInlineSize) as it is instead of negating the condition before passing to generate_guard(). 

When the condition is evaluated to false then fast path will be NULL and only slow path exist (i.e. implicit control), so all the nodes control dependent on fast path will be sweeped out during GVN.  I have added a detailed comment in the code on this.

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

PR: https://git.openjdk.java.net/jdk/pull/3999


More information about the hotspot-compiler-dev mailing list