src/share/vm/opto/library_call.cpp

Print this page
rev 3898 : 8005031: Some cleanup in c2 to prepare for incremental inlining support
Summary: collection of small changes to prepare for incremental inlining.
Reviewed-by:

*** 410,429 **** case vmIntrinsics::_numberOfTrailingZeros_l: if (!Matcher::match_rule_supported(Op_CountTrailingZerosL)) return NULL; break; case vmIntrinsics::_reverseBytes_c: ! if (!Matcher::match_rule_supported(Op_ReverseBytesUS)) return false; break; case vmIntrinsics::_reverseBytes_s: ! if (!Matcher::match_rule_supported(Op_ReverseBytesS)) return false; break; case vmIntrinsics::_reverseBytes_i: ! if (!Matcher::match_rule_supported(Op_ReverseBytesI)) return false; break; case vmIntrinsics::_reverseBytes_l: ! if (!Matcher::match_rule_supported(Op_ReverseBytesL)) return false; break; case vmIntrinsics::_Reference_get: // Use the intrinsic version of Reference.get() so that the value in // the referent field can be registered by the G1 pre-barrier code. --- 410,429 ---- case vmIntrinsics::_numberOfTrailingZeros_l: if (!Matcher::match_rule_supported(Op_CountTrailingZerosL)) return NULL; break; case vmIntrinsics::_reverseBytes_c: ! if (!Matcher::match_rule_supported(Op_ReverseBytesUS)) return NULL; break; case vmIntrinsics::_reverseBytes_s: ! if (!Matcher::match_rule_supported(Op_ReverseBytesS)) return NULL; break; case vmIntrinsics::_reverseBytes_i: ! if (!Matcher::match_rule_supported(Op_ReverseBytesI)) return NULL; break; case vmIntrinsics::_reverseBytes_l: ! if (!Matcher::match_rule_supported(Op_ReverseBytesL)) return NULL; break; case vmIntrinsics::_Reference_get: // Use the intrinsic version of Reference.get() so that the value in // the referent field can be registered by the G1 pre-barrier code.
*** 534,544 **** const int bci = kit.bci(); // Try to inline the intrinsic. if (kit.try_to_inline()) { if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { ! CompileTask::print_inlining(callee, jvms->depth() - 1, bci, is_virtual() ? "(intrinsic, virtual)" : "(intrinsic)"); } C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_worked); if (C->log()) { C->log()->elem("intrinsic id='%s'%s nodes='%d'", vmIntrinsics::name_at(intrinsic_id()), --- 534,544 ---- const int bci = kit.bci(); // Try to inline the intrinsic. if (kit.try_to_inline()) { if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { ! C->print_inlining(callee, jvms->depth() - 1, bci, is_virtual() ? "(intrinsic, virtual)" : "(intrinsic)"); } C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_worked); if (C->log()) { C->log()->elem("intrinsic id='%s'%s nodes='%d'", vmIntrinsics::name_at(intrinsic_id()),
*** 553,563 **** // The intrinsic bailed out if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { if (jvms->has_method()) { // Not a root compile. const char* msg = is_virtual() ? "failed to inline (intrinsic, virtual)" : "failed to inline (intrinsic)"; ! CompileTask::print_inlining(callee, jvms->depth() - 1, bci, msg); } else { // Root compile tty->print("Did not generate intrinsic %s%s at bci:%d in", vmIntrinsics::name_at(intrinsic_id()), (is_virtual() ? " (virtual)" : ""), bci); --- 553,563 ---- // The intrinsic bailed out if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { if (jvms->has_method()) { // Not a root compile. const char* msg = is_virtual() ? "failed to inline (intrinsic, virtual)" : "failed to inline (intrinsic)"; ! C->print_inlining(callee, jvms->depth() - 1, bci, msg); } else { // Root compile tty->print("Did not generate intrinsic %s%s at bci:%d in", vmIntrinsics::name_at(intrinsic_id()), (is_virtual() ? " (virtual)" : ""), bci);
*** 583,593 **** const int bci = kit.bci(); Node* slow_ctl = kit.try_to_predicate(); if (!kit.failing()) { if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { ! CompileTask::print_inlining(callee, jvms->depth() - 1, bci, is_virtual() ? "(intrinsic, virtual)" : "(intrinsic)"); } C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_worked); if (C->log()) { C->log()->elem("predicate_intrinsic id='%s'%s nodes='%d'", vmIntrinsics::name_at(intrinsic_id()), --- 583,593 ---- const int bci = kit.bci(); Node* slow_ctl = kit.try_to_predicate(); if (!kit.failing()) { if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { ! C->print_inlining(callee, jvms->depth() - 1, bci, is_virtual() ? "(intrinsic, virtual)" : "(intrinsic)"); } C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_worked); if (C->log()) { C->log()->elem("predicate_intrinsic id='%s'%s nodes='%d'", vmIntrinsics::name_at(intrinsic_id()),
*** 600,613 **** // The intrinsic bailed out if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { if (jvms->has_method()) { // Not a root compile. const char* msg = "failed to generate predicate for intrinsic"; ! CompileTask::print_inlining(kit.callee(), jvms->depth() - 1, bci, msg); } else { // Root compile ! tty->print("Did not generate predicate for intrinsic %s%s at bci:%d in", vmIntrinsics::name_at(intrinsic_id()), (is_virtual() ? " (virtual)" : ""), bci); } } C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_failed); --- 600,613 ---- // The intrinsic bailed out if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { if (jvms->has_method()) { // Not a root compile. const char* msg = "failed to generate predicate for intrinsic"; ! C->print_inlining(kit.callee(), jvms->depth() - 1, bci, msg); } else { // Root compile ! C->print_inlining_stream()->print("Did not generate predicate for intrinsic %s%s at bci:%d in", vmIntrinsics::name_at(intrinsic_id()), (is_virtual() ? " (virtual)" : ""), bci); } } C->gather_intrinsic_statistics(intrinsic_id(), is_virtual(), Compile::_intrinsic_failed);
*** 3317,3327 **** int which_arg; for (which_arg = 0; which_arg <= 1; which_arg++) { Node* arg = args[which_arg]; arg = null_check(arg); if (stopped()) break; ! args[which_arg] = _gvn.transform(arg); Node* p = basic_plus_adr(arg, class_klass_offset); Node* kls = LoadKlassNode::make(_gvn, immutable_memory(), p, adr_type, kls_type); klasses[which_arg] = _gvn.transform(kls); } --- 3317,3327 ---- int which_arg; for (which_arg = 0; which_arg <= 1; which_arg++) { Node* arg = args[which_arg]; arg = null_check(arg); if (stopped()) break; ! args[which_arg] = arg; Node* p = basic_plus_adr(arg, class_klass_offset); Node* kls = LoadKlassNode::make(_gvn, immutable_memory(), p, adr_type, kls_type); klasses[which_arg] = _gvn.transform(kls); }