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




 294   Node* get_state_from_sha5_object(Node *sha_object);
 295   Node* inline_digestBase_implCompressMB_predicate(int predicate);
 296   bool inline_encodeISOArray();
 297   bool inline_updateCRC32();
 298   bool inline_updateBytesCRC32();
 299   bool inline_updateByteBufferCRC32();
 300   Node* get_table_from_crc32c_class(ciInstanceKlass *crc32c_class);
 301   bool inline_updateBytesCRC32C();
 302   bool inline_updateDirectByteBufferCRC32C();
 303   bool inline_updateBytesAdler32();
 304   bool inline_updateByteBufferAdler32();
 305   bool inline_multiplyToLen();
 306   bool inline_hasNegatives();
 307   bool inline_squareToLen();
 308   bool inline_mulAdd();
 309   bool inline_montgomeryMultiply();
 310   bool inline_montgomerySquare();
 311 
 312   bool inline_profileBoolean();
 313   bool inline_isCompileConstant();


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


 729     return inline_updateByteBufferCRC32();
 730 
 731   case vmIntrinsics::_updateBytesCRC32C:
 732     return inline_updateBytesCRC32C();
 733   case vmIntrinsics::_updateDirectByteBufferCRC32C:
 734     return inline_updateDirectByteBufferCRC32C();
 735 
 736   case vmIntrinsics::_updateBytesAdler32:
 737     return inline_updateBytesAdler32();
 738   case vmIntrinsics::_updateByteBufferAdler32:
 739     return inline_updateByteBufferAdler32();
 740 
 741   case vmIntrinsics::_profileBoolean:
 742     return inline_profileBoolean();
 743   case vmIntrinsics::_isCompileConstant:
 744     return inline_isCompileConstant();
 745 
 746   case vmIntrinsics::_hasNegatives:
 747     return inline_hasNegatives();
 748 



 749   default:
 750     // If you get here, it may be that someone has added a new intrinsic
 751     // to the list in vmSymbols.hpp without implementing it here.
 752 #ifndef PRODUCT
 753     if ((PrintMiscellaneous && (Verbose || WizardMode)) || PrintOpto) {
 754       tty->print_cr("*** Warning: Unimplemented intrinsic %s(%d)",
 755                     vmIntrinsics::name_at(intrinsic_id()), intrinsic_id());
 756     }
 757 #endif
 758     return false;
 759   }
 760 }
 761 
 762 Node* LibraryCallKit::try_to_predicate(int predicate) {
 763   if (!jvms()->has_method()) {
 764     // Root JVMState has a null method.
 765     assert(map()->memory()->Opcode() == Op_Parm, "");
 766     // Insert the memory aliasing node
 767     set_all_memory(reset_memory());
 768   }


6489     // It enables full speed execution once optimized code is generated.
6490     Node* profile = _gvn.transform(new ProfileBooleanNode(result, false_cnt, true_cnt));
6491     C->record_for_igvn(profile);
6492     set_result(profile);
6493     return true;
6494   } else {
6495     // Continue profiling.
6496     // Profile data isn't available at the moment. So, execute method's bytecode version.
6497     // Usually, when GWT LambdaForms are profiled it means that a stand-alone nmethod
6498     // is compiled and counters aren't available since corresponding MethodHandle
6499     // isn't a compile-time constant.
6500     return false;
6501   }
6502 }
6503 
6504 bool LibraryCallKit::inline_isCompileConstant() {
6505   Node* n = argument(0);
6506   set_result(n->is_Con() ? intcon(1) : intcon(0));
6507   return true;
6508 }











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


 731     return inline_updateByteBufferCRC32();
 732 
 733   case vmIntrinsics::_updateBytesCRC32C:
 734     return inline_updateBytesCRC32C();
 735   case vmIntrinsics::_updateDirectByteBufferCRC32C:
 736     return inline_updateDirectByteBufferCRC32C();
 737 
 738   case vmIntrinsics::_updateBytesAdler32:
 739     return inline_updateBytesAdler32();
 740   case vmIntrinsics::_updateByteBufferAdler32:
 741     return inline_updateByteBufferAdler32();
 742 
 743   case vmIntrinsics::_profileBoolean:
 744     return inline_profileBoolean();
 745   case vmIntrinsics::_isCompileConstant:
 746     return inline_isCompileConstant();
 747 
 748   case vmIntrinsics::_hasNegatives:
 749     return inline_hasNegatives();
 750 
 751   case vmIntrinsics::_deoptimize:
 752     return inline_deoptimize();
 753 
 754   default:
 755     // If you get here, it may be that someone has added a new intrinsic
 756     // to the list in vmSymbols.hpp without implementing it here.
 757 #ifndef PRODUCT
 758     if ((PrintMiscellaneous && (Verbose || WizardMode)) || PrintOpto) {
 759       tty->print_cr("*** Warning: Unimplemented intrinsic %s(%d)",
 760                     vmIntrinsics::name_at(intrinsic_id()), intrinsic_id());
 761     }
 762 #endif
 763     return false;
 764   }
 765 }
 766 
 767 Node* LibraryCallKit::try_to_predicate(int predicate) {
 768   if (!jvms()->has_method()) {
 769     // Root JVMState has a null method.
 770     assert(map()->memory()->Opcode() == Op_Parm, "");
 771     // Insert the memory aliasing node
 772     set_all_memory(reset_memory());
 773   }


6494     // It enables full speed execution once optimized code is generated.
6495     Node* profile = _gvn.transform(new ProfileBooleanNode(result, false_cnt, true_cnt));
6496     C->record_for_igvn(profile);
6497     set_result(profile);
6498     return true;
6499   } else {
6500     // Continue profiling.
6501     // Profile data isn't available at the moment. So, execute method's bytecode version.
6502     // Usually, when GWT LambdaForms are profiled it means that a stand-alone nmethod
6503     // is compiled and counters aren't available since corresponding MethodHandle
6504     // isn't a compile-time constant.
6505     return false;
6506   }
6507 }
6508 
6509 bool LibraryCallKit::inline_isCompileConstant() {
6510   Node* n = argument(0);
6511   set_result(n->is_Con() ? intcon(1) : intcon(0));
6512   return true;
6513 }
6514 
6515 bool LibraryCallKit::inline_deoptimize() {
6516   assert(WhiteBoxAPI, "");
6517   PreserveReexecuteState preexecs(this);
6518   jvms()->set_should_reexecute(false);
6519   uncommon_trap(Deoptimization::Reason_intrinsic,
6520                 Deoptimization::Action_none);
6521   return true;
6522 }
src/share/vm/opto/library_call.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File