RFR: 8259316: [REDO] C1/C2 compiler support for blackholes

Doug Simon dnsimon at openjdk.java.net
Wed Mar 31 15:47:27 UTC 2021


On Thu, 25 Mar 2021 15:06:40 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/hotspot/share/ci/ciMethod.cpp line 160:
>> 
>>> 158: 
>>> 159:   if (CompilerOracle::should_blackhole(h_m)) {
>>> 160:     h_m->set_intrinsic_id(vmIntrinsics::_blackhole);
>> 
>> Wouldn't it be better to do this in `Method::init_intrinsic_id` so that JVMCI will also see the method as an intrinsic? Either that or a similar bit of logic should be added to `JVMCIRuntime::compile_method`.
>
> The way C1 and C2 see this as synthetic intrinsic is modeled after `vmIntrinsics::_compiledLambdaForm`. Unfortunately, `Method::init_intrinsic_id` does not have access to `CompilerOracle` (which is solvable), and current placement in `ciMethod` constructor guarantees the method is resolved. I wonder if JVMCI would benefit from the direct `shouldBlackholeMethod`, like it already has `shouldInlineMethod`?

I think it would be better in `JVMCIEnv::get_jvmci_method` which is the JVMCI equivalent of `ciMethod::ciMethod`.

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

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


More information about the hotspot-dev mailing list