RFR: 8259609: C2: optimize long range checks in long counted loops

Tobias Hartmann thartmann at openjdk.java.net
Mon Jan 18 11:51:49 UTC 2021


On Wed, 13 Jan 2021 13:40:40 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> Hi Roland,
>> 
>> I haven't looked at the code in detail yet but submitted some quick testing. Unfortunately, there are failures with an internal test that I'm unable to share. Some details:
>> 
>> #  Internal Error (src/hotspot/share/utilities/globalDefinitions.hpp:460), pid=27250, tid=27265
>> #  assert(static_cast<T1>(result) == thing) failed: must be
>> 
>> Stack: [0x00007fca9cdfa000,0x00007fca9cefb000],  sp=0x00007fca9cef5360,  free space=1004k
>> Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
>> V  [libjvm.so+0x12f5a3e]  IdealLoopTree::policy_range_check(PhaseIdealLoop*) const [clone .part.0]+0x33e
>> V  [libjvm.so+0x1301e4f]  IdealLoopTree::iteration_split_impl(PhaseIdealLoop*, Node_List&) [clone .part.0]+0x6ef
>> V  [libjvm.so+0x13021bb]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x13b
>> V  [libjvm.so+0x13020b5]  IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x35
>> V  [libjvm.so+0x1330633]  PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0xc83
>> V  [libjvm.so+0xa1cbdb]  PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x32b
>> V  [libjvm.so+0xa18636]  Compile::Optimize()+0x586
>> V  [libjvm.so+0xa1b370]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x1840
>> V  [libjvm.so+0x84b1bc]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1dc
>> V  [libjvm.so+0xa2b3a8]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xe88
>> V  [libjvm.so+0xa2bff8]  CompileBroker::compiler_thread_loop()+0x5a8
>> V  [libjvm.so+0x18b06c6]  JavaThread::thread_main_inner()+0x256
>> V  [libjvm.so+0x18b70d0]  Thread::call_run()+0x100
>> V  [libjvm.so+0x1599dd6]  thread_native_entry(Thread*)+0x116
>> 
>> Hope that helps.
>
>> I haven't looked at the code in detail yet but submitted some quick testing. Unfortunately, there are failures with an internal test that I'm unable to share. Some details:
> 
> Thanks. I pushed a fix.

I think you forgot to push the fix.

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

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


More information about the hotspot-compiler-dev mailing list