873 // When using CallRuntime mark SOE registers as killed by the call
874 // so values that could show up in the RegisterMap aren't live in a
875 // callee saved register since the register wouldn't know where to
876 // find them. CallLeaf and CallLeafNoFP are ok because they can't
877 // have debug info on them. Strictly speaking this only needs to be
878 // done for oops since idealreg2debugmask takes care of debug info
879 // references but there no way to handle oops differently than other
880 // pointers as far as the kill mask goes.
881 bool exclude_soe = op == Op_CallRuntime;
882
883 // If the call is a MethodHandle invoke, we need to exclude the
884 // register which is used to save the SP value over MH invokes from
885 // the mask. Otherwise this register could be used for
886 // deoptimization information.
887 if (op == Op_CallStaticJava) {
888 MachCallStaticJavaNode* mcallstaticjava = (MachCallStaticJavaNode*) mcall;
889 if (mcallstaticjava->_method_handle_invoke)
890 proj->_rout.OR(Matcher::method_handle_invoke_SP_save_mask());
891 }
892
893 if (UseShenandoahGC && mcall->entry_point() == StubRoutines::shenandoah_wb_C()) {
894 assert(op == Op_CallLeafNoFP, "shenandoah_wb_C should be called with Op_CallLeafNoFP");
895 add_call_kills(proj, regs, save_policy, exclude_soe, true);
896 } else {
897 add_call_kills(proj, regs, save_policy, exclude_soe, false);
898 }
899
900 return node_cnt;
901 }
902
903 void PhaseCFG::push_ready_nodes(Node* n, Node* m, Block* block, GrowableArray<int>& ready_cnt, Node_List& worklist, uint max_idx, int c) {
904 if (get_block_for_node(m) != block) {
905 return;
906 }
907 if (m->is_Phi()) {
908 return;
909 }
910 if (m->_idx >= max_idx) { // new node, skip it
911 assert(m->is_MachProj() && n->is_Mach() && n->as_Mach()->has_call(), "unexpected node types");
912 return;
913 }
914 int m_cnt = ready_cnt.at(m->_idx) - c;
915 ready_cnt.at_put(m->_idx, m_cnt);
916 if (m_cnt == 0) {
917 worklist.push(m);
918 }
|
873 // When using CallRuntime mark SOE registers as killed by the call
874 // so values that could show up in the RegisterMap aren't live in a
875 // callee saved register since the register wouldn't know where to
876 // find them. CallLeaf and CallLeafNoFP are ok because they can't
877 // have debug info on them. Strictly speaking this only needs to be
878 // done for oops since idealreg2debugmask takes care of debug info
879 // references but there no way to handle oops differently than other
880 // pointers as far as the kill mask goes.
881 bool exclude_soe = op == Op_CallRuntime;
882
883 // If the call is a MethodHandle invoke, we need to exclude the
884 // register which is used to save the SP value over MH invokes from
885 // the mask. Otherwise this register could be used for
886 // deoptimization information.
887 if (op == Op_CallStaticJava) {
888 MachCallStaticJavaNode* mcallstaticjava = (MachCallStaticJavaNode*) mcall;
889 if (mcallstaticjava->_method_handle_invoke)
890 proj->_rout.OR(Matcher::method_handle_invoke_SP_save_mask());
891 }
892
893 add_call_kills(proj, regs, save_policy, exclude_soe, false);
894
895 return node_cnt;
896 }
897
898 void PhaseCFG::push_ready_nodes(Node* n, Node* m, Block* block, GrowableArray<int>& ready_cnt, Node_List& worklist, uint max_idx, int c) {
899 if (get_block_for_node(m) != block) {
900 return;
901 }
902 if (m->is_Phi()) {
903 return;
904 }
905 if (m->_idx >= max_idx) { // new node, skip it
906 assert(m->is_MachProj() && n->is_Mach() && n->as_Mach()->has_call(), "unexpected node types");
907 return;
908 }
909 int m_cnt = ready_cnt.at(m->_idx) - c;
910 ready_cnt.at_put(m->_idx, m_cnt);
911 if (m_cnt == 0) {
912 worklist.push(m);
913 }
|