src/share/vm/opto/library_call.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/library_call.cpp

Print this page




 288   Node* get_state_from_sha_object(Node *sha_object);
 289   Node* get_state_from_sha5_object(Node *sha_object);
 290   Node* inline_digestBase_implCompressMB_predicate(int predicate);
 291   bool inline_encodeISOArray();
 292   bool inline_updateCRC32();
 293   bool inline_updateBytesCRC32();
 294   bool inline_updateByteBufferCRC32();
 295   Node* get_table_from_crc32c_class(ciInstanceKlass *crc32c_class);
 296   bool inline_updateBytesCRC32C();
 297   bool inline_updateDirectByteBufferCRC32C();
 298   bool inline_updateBytesAdler32();
 299   bool inline_updateByteBufferAdler32();
 300   bool inline_multiplyToLen();
 301   bool inline_squareToLen();
 302   bool inline_mulAdd();
 303   bool inline_montgomeryMultiply();
 304   bool inline_montgomerySquare();
 305 
 306   bool inline_profileBoolean();
 307   bool inline_isCompileConstant();


 308 };
 309 
 310 //---------------------------make_vm_intrinsic----------------------------
 311 CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) {
 312   vmIntrinsics::ID id = m->intrinsic_id();
 313   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
 314 
 315   if (!m->is_loaded()) {
 316     // Do not attempt to inline unloaded methods.
 317     return NULL;
 318   }
 319 
 320   C2Compiler* compiler = (C2Compiler*)CompileBroker::compiler(CompLevel_full_optimization);
 321   bool is_available = false;
 322 
 323   {
 324     // For calling is_intrinsic_supported and is_intrinsic_disabled_by_flag
 325     // the compiler must transition to '_thread_in_vm' state because both
 326     // methods access VM-internal data.
 327     VM_ENTRY_MARK;


 694   case vmIntrinsics::_updateBytesCRC32:
 695     return inline_updateBytesCRC32();
 696   case vmIntrinsics::_updateByteBufferCRC32:
 697     return inline_updateByteBufferCRC32();
 698 
 699   case vmIntrinsics::_updateBytesCRC32C:
 700     return inline_updateBytesCRC32C();
 701   case vmIntrinsics::_updateDirectByteBufferCRC32C:
 702     return inline_updateDirectByteBufferCRC32C();
 703 
 704   case vmIntrinsics::_updateBytesAdler32:
 705     return inline_updateBytesAdler32();
 706   case vmIntrinsics::_updateByteBufferAdler32:
 707     return inline_updateByteBufferAdler32();
 708 
 709   case vmIntrinsics::_profileBoolean:
 710     return inline_profileBoolean();
 711   case vmIntrinsics::_isCompileConstant:
 712     return inline_isCompileConstant();
 713 



 714   default:
 715     // If you get here, it may be that someone has added a new intrinsic
 716     // to the list in vmSymbols.hpp without implementing it here.
 717 #ifndef PRODUCT
 718     if ((PrintMiscellaneous && (Verbose || WizardMode)) || PrintOpto) {
 719       tty->print_cr("*** Warning: Unimplemented intrinsic %s(%d)",
 720                     vmIntrinsics::name_at(intrinsic_id()), intrinsic_id());
 721     }
 722 #endif
 723     return false;
 724   }
 725 }
 726 
 727 Node* LibraryCallKit::try_to_predicate(int predicate) {
 728   if (!jvms()->has_method()) {
 729     // Root JVMState has a null method.
 730     assert(map()->memory()->Opcode() == Op_Parm, "");
 731     // Insert the memory aliasing node
 732     set_all_memory(reset_memory());
 733   }


6312     // It enables full speed execution once optimized code is generated.
6313     Node* profile = _gvn.transform(new ProfileBooleanNode(result, false_cnt, true_cnt));
6314     C->record_for_igvn(profile);
6315     set_result(profile);
6316     return true;
6317   } else {
6318     // Continue profiling.
6319     // Profile data isn't available at the moment. So, execute method's bytecode version.
6320     // Usually, when GWT LambdaForms are profiled it means that a stand-alone nmethod
6321     // is compiled and counters aren't available since corresponding MethodHandle
6322     // isn't a compile-time constant.
6323     return false;
6324   }
6325 }
6326 
6327 bool LibraryCallKit::inline_isCompileConstant() {
6328   Node* n = argument(0);
6329   set_result(n->is_Con() ? intcon(1) : intcon(0));
6330   return true;
6331 }











 288   Node* get_state_from_sha_object(Node *sha_object);
 289   Node* get_state_from_sha5_object(Node *sha_object);
 290   Node* inline_digestBase_implCompressMB_predicate(int predicate);
 291   bool inline_encodeISOArray();
 292   bool inline_updateCRC32();
 293   bool inline_updateBytesCRC32();
 294   bool inline_updateByteBufferCRC32();
 295   Node* get_table_from_crc32c_class(ciInstanceKlass *crc32c_class);
 296   bool inline_updateBytesCRC32C();
 297   bool inline_updateDirectByteBufferCRC32C();
 298   bool inline_updateBytesAdler32();
 299   bool inline_updateByteBufferAdler32();
 300   bool inline_multiplyToLen();
 301   bool inline_squareToLen();
 302   bool inline_mulAdd();
 303   bool inline_montgomeryMultiply();
 304   bool inline_montgomerySquare();
 305 
 306   bool inline_profileBoolean();
 307   bool inline_isCompileConstant();
 308 
 309   bool inline_deoptimize();
 310 };
 311 
 312 //---------------------------make_vm_intrinsic----------------------------
 313 CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) {
 314   vmIntrinsics::ID id = m->intrinsic_id();
 315   assert(id != vmIntrinsics::_none, "must be a VM intrinsic");
 316 
 317   if (!m->is_loaded()) {
 318     // Do not attempt to inline unloaded methods.
 319     return NULL;
 320   }
 321 
 322   C2Compiler* compiler = (C2Compiler*)CompileBroker::compiler(CompLevel_full_optimization);
 323   bool is_available = false;
 324 
 325   {
 326     // For calling is_intrinsic_supported and is_intrinsic_disabled_by_flag
 327     // the compiler must transition to '_thread_in_vm' state because both
 328     // methods access VM-internal data.
 329     VM_ENTRY_MARK;


 696   case vmIntrinsics::_updateBytesCRC32:
 697     return inline_updateBytesCRC32();
 698   case vmIntrinsics::_updateByteBufferCRC32:
 699     return inline_updateByteBufferCRC32();
 700 
 701   case vmIntrinsics::_updateBytesCRC32C:
 702     return inline_updateBytesCRC32C();
 703   case vmIntrinsics::_updateDirectByteBufferCRC32C:
 704     return inline_updateDirectByteBufferCRC32C();
 705 
 706   case vmIntrinsics::_updateBytesAdler32:
 707     return inline_updateBytesAdler32();
 708   case vmIntrinsics::_updateByteBufferAdler32:
 709     return inline_updateByteBufferAdler32();
 710 
 711   case vmIntrinsics::_profileBoolean:
 712     return inline_profileBoolean();
 713   case vmIntrinsics::_isCompileConstant:
 714     return inline_isCompileConstant();
 715 
 716   case vmIntrinsics::_deoptimize:
 717     return inline_deoptimize();
 718 
 719   default:
 720     // If you get here, it may be that someone has added a new intrinsic
 721     // to the list in vmSymbols.hpp without implementing it here.
 722 #ifndef PRODUCT
 723     if ((PrintMiscellaneous && (Verbose || WizardMode)) || PrintOpto) {
 724       tty->print_cr("*** Warning: Unimplemented intrinsic %s(%d)",
 725                     vmIntrinsics::name_at(intrinsic_id()), intrinsic_id());
 726     }
 727 #endif
 728     return false;
 729   }
 730 }
 731 
 732 Node* LibraryCallKit::try_to_predicate(int predicate) {
 733   if (!jvms()->has_method()) {
 734     // Root JVMState has a null method.
 735     assert(map()->memory()->Opcode() == Op_Parm, "");
 736     // Insert the memory aliasing node
 737     set_all_memory(reset_memory());
 738   }


6317     // It enables full speed execution once optimized code is generated.
6318     Node* profile = _gvn.transform(new ProfileBooleanNode(result, false_cnt, true_cnt));
6319     C->record_for_igvn(profile);
6320     set_result(profile);
6321     return true;
6322   } else {
6323     // Continue profiling.
6324     // Profile data isn't available at the moment. So, execute method's bytecode version.
6325     // Usually, when GWT LambdaForms are profiled it means that a stand-alone nmethod
6326     // is compiled and counters aren't available since corresponding MethodHandle
6327     // isn't a compile-time constant.
6328     return false;
6329   }
6330 }
6331 
6332 bool LibraryCallKit::inline_isCompileConstant() {
6333   Node* n = argument(0);
6334   set_result(n->is_Con() ? intcon(1) : intcon(0));
6335   return true;
6336 }
6337 
6338 bool LibraryCallKit::inline_deoptimize() {
6339   assert(WhiteBoxAPI, "");
6340   PreserveReexecuteState preexecs(this);
6341   jvms()->set_should_reexecute(false);
6342   uncommon_trap(Deoptimization::Reason_intrinsic,
6343                 Deoptimization::Action_none);
6344   return true;
6345 }
src/share/vm/opto/library_call.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File