< prev index next >

src/share/vm/opto/matcher.cpp

Print this page




2100       case Op_CatchProj:
2101       case Op_CProj:
2102       case Op_JumpProj:
2103       case Op_JProj:
2104       case Op_NeverBranch:
2105         set_dontcare(n);
2106         break;
2107       case Op_Jump:
2108         mstack.push(n->in(1), Pre_Visit);     // Switch Value (could be shared)
2109         mstack.push(n->in(0), Pre_Visit);     // Visit Control input
2110         continue;                             // while (mstack.is_nonempty())
2111       case Op_StrComp:
2112       case Op_StrEquals:
2113       case Op_StrIndexOf:
2114       case Op_StrIndexOfChar:
2115       case Op_AryEq:
2116       case Op_HasNegatives:
2117       case Op_StrInflatedCopy:
2118       case Op_StrCompressedCopy:
2119       case Op_EncodeISOArray:


2120         set_shared(n); // Force result into register (it will be anyways)
2121         break;
2122       case Op_ConP: {  // Convert pointers above the centerline to NUL
2123         TypeNode *tn = n->as_Type(); // Constants derive from type nodes
2124         const TypePtr* tp = tn->type()->is_ptr();
2125         if (tp->_ptr == TypePtr::AnyNull) {
2126           tn->set_type(TypePtr::NULL_PTR);
2127         }
2128         break;
2129       }
2130       case Op_ConN: {  // Convert narrow pointers above the centerline to NUL
2131         TypeNode *tn = n->as_Type(); // Constants derive from type nodes
2132         const TypePtr* tp = tn->type()->make_ptr();
2133         if (tp && tp->_ptr == TypePtr::AnyNull) {
2134           tn->set_type(TypeNarrowOop::NULL_PTR);
2135         }
2136         break;
2137       }
2138       case Op_Binary:         // These are introduced in the Post_Visit state.
2139         ShouldNotReachHere();


2286         n->del_req(4);
2287         break;
2288       }
2289       case Op_StrComp:
2290       case Op_StrIndexOf: {
2291         Node *pair1 = new BinaryNode(n->in(2),n->in(3));
2292         n->set_req(2,pair1);
2293         Node *pair2 = new BinaryNode(n->in(4),n->in(5));
2294         n->set_req(3,pair2);
2295         n->del_req(5);
2296         n->del_req(4);
2297         break;
2298       }
2299       case Op_StrCompressedCopy:
2300       case Op_StrInflatedCopy:
2301       case Op_EncodeISOArray: {
2302         // Restructure into a binary tree for Matching.
2303         Node* pair = new BinaryNode(n->in(3), n->in(4));
2304         n->set_req(3, pair);
2305         n->del_req(4);









2306         break;
2307       }
2308       default:
2309         break;
2310       }
2311     }
2312     else {
2313       ShouldNotReachHere();
2314     }
2315   } // end of while (mstack.is_nonempty())
2316 }
2317 
2318 #ifdef ASSERT
2319 // machine-independent root to machine-dependent root
2320 void Matcher::dump_old2new_map() {
2321   _old2new_map.dump();
2322 }
2323 #endif
2324 
2325 //---------------------------collect_null_checks-------------------------------




2100       case Op_CatchProj:
2101       case Op_CProj:
2102       case Op_JumpProj:
2103       case Op_JProj:
2104       case Op_NeverBranch:
2105         set_dontcare(n);
2106         break;
2107       case Op_Jump:
2108         mstack.push(n->in(1), Pre_Visit);     // Switch Value (could be shared)
2109         mstack.push(n->in(0), Pre_Visit);     // Visit Control input
2110         continue;                             // while (mstack.is_nonempty())
2111       case Op_StrComp:
2112       case Op_StrEquals:
2113       case Op_StrIndexOf:
2114       case Op_StrIndexOfChar:
2115       case Op_AryEq:
2116       case Op_HasNegatives:
2117       case Op_StrInflatedCopy:
2118       case Op_StrCompressedCopy:
2119       case Op_EncodeISOArray:
2120       case Op_FmaD:
2121       case Op_FmaF:
2122         set_shared(n); // Force result into register (it will be anyways)
2123         break;
2124       case Op_ConP: {  // Convert pointers above the centerline to NUL
2125         TypeNode *tn = n->as_Type(); // Constants derive from type nodes
2126         const TypePtr* tp = tn->type()->is_ptr();
2127         if (tp->_ptr == TypePtr::AnyNull) {
2128           tn->set_type(TypePtr::NULL_PTR);
2129         }
2130         break;
2131       }
2132       case Op_ConN: {  // Convert narrow pointers above the centerline to NUL
2133         TypeNode *tn = n->as_Type(); // Constants derive from type nodes
2134         const TypePtr* tp = tn->type()->make_ptr();
2135         if (tp && tp->_ptr == TypePtr::AnyNull) {
2136           tn->set_type(TypeNarrowOop::NULL_PTR);
2137         }
2138         break;
2139       }
2140       case Op_Binary:         // These are introduced in the Post_Visit state.
2141         ShouldNotReachHere();


2288         n->del_req(4);
2289         break;
2290       }
2291       case Op_StrComp:
2292       case Op_StrIndexOf: {
2293         Node *pair1 = new BinaryNode(n->in(2),n->in(3));
2294         n->set_req(2,pair1);
2295         Node *pair2 = new BinaryNode(n->in(4),n->in(5));
2296         n->set_req(3,pair2);
2297         n->del_req(5);
2298         n->del_req(4);
2299         break;
2300       }
2301       case Op_StrCompressedCopy:
2302       case Op_StrInflatedCopy:
2303       case Op_EncodeISOArray: {
2304         // Restructure into a binary tree for Matching.
2305         Node* pair = new BinaryNode(n->in(3), n->in(4));
2306         n->set_req(3, pair);
2307         n->del_req(4);
2308         break;
2309       }
2310       case Op_FmaD:
2311       case Op_FmaF: {
2312         // Restructure into a binary tree for Matching.
2313         Node* pair = new BinaryNode(n->in(1), n->in(2));
2314         n->set_req(2, pair);
2315         n->set_req(1, n->in(3));
2316         n->del_req(3);
2317         break;
2318       }
2319       default:
2320         break;
2321       }
2322     }
2323     else {
2324       ShouldNotReachHere();
2325     }
2326   } // end of while (mstack.is_nonempty())
2327 }
2328 
2329 #ifdef ASSERT
2330 // machine-independent root to machine-dependent root
2331 void Matcher::dump_old2new_map() {
2332   _old2new_map.dump();
2333 }
2334 #endif
2335 
2336 //---------------------------collect_null_checks-------------------------------


< prev index next >