RFR: 8252505: C1/C2 compiler support for blackholes [v11]
Aleksey Shipilev
shade at openjdk.java.net
Tue Dec 1 13:15:55 UTC 2020
On Tue, 1 Dec 2020 12:23:44 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Cleanup BlackholeCallGenerator
>
> src/hotspot/share/c1/c1_GraphBuilder.cpp line 3469:
>
>> 3467: Values* args = state()->pop_arguments(callee->arg_size());
>> 3468:
>> 3469: // Blackhole everything except the receiver itself
>
> Does it make sense to limit blackhole candidates to static methods only?
> Otherwise, you end up with a null check in the generated code.
Unfortunately, not. In JMH, `Blackhole` methods are instance methods (they have state), and that plays nicely with compatibility: when JIT fails to provide blackholing, it would naturally fall back to old behavior. I think null check for receiver is the fair behavior here, as subsequent optimization may expect receiver null-checked after the call. I have not seen null-checks in my `perfasm` runs with C1, though.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1203
More information about the hotspot-dev
mailing list