src/share/vm/opto/matcher.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6695810 Sdiff src/share/vm/opto

src/share/vm/opto/matcher.cpp

Print this page




 863       for (i = oldn->req(); (uint)i < oldn->len(); i++) {
 864         Node *m = oldn->in(i);
 865         if (m == NULL) break;
 866         // set -1 to call add_prec() instead of set_req() during Step1
 867         mstack.push(m, Visit, n, -1);
 868       }
 869 
 870       // For constant debug info, I'd rather have unmatched constants.
 871       int cnt = n->req();
 872       JVMState* jvms = n->jvms();
 873       int debug_cnt = jvms ? jvms->debug_start() : cnt;
 874 
 875       // Now do only debug info.  Clone constants rather than matching.
 876       // Constants are represented directly in the debug info without
 877       // the need for executable machine instructions.
 878       // Monitor boxes are also represented directly.
 879       for (i = cnt - 1; i >= debug_cnt; --i) { // For all debug inputs do
 880         Node *m = n->in(i);          // Get input
 881         int op = m->Opcode();
 882         assert((op == Op_BoxLock) == jvms->is_monitor_use(i), "boxes only at monitor sites");
 883         if( op == Op_ConI || op == Op_ConP ||
 884             op == Op_ConF || op == Op_ConD || op == Op_ConL
 885             // || op == Op_BoxLock  // %%%% enable this and remove (+++) in chaitin.cpp
 886             ) {
 887           m = m->clone();
 888           mstack.push(m, Post_Visit, n, i); // Don't neet to visit
 889           mstack.push(m->in(0), Visit, m, 0);
 890         } else {
 891           mstack.push(m, Visit, n, i);
 892         }
 893       }
 894 
 895       // And now walk his children, and convert his inputs to new-space.
 896       for( ; i >= 0; --i ) { // For all normal inputs do
 897         Node *m = n->in(i);  // Get input
 898         if(m != NULL)
 899           mstack.push(m, Visit, n, i);
 900       }
 901 
 902     }
 903     else if (nstate == Post_Visit) {


1708       case Op_CProj:
1709       case Op_JumpProj:
1710       case Op_JProj:
1711       case Op_NeverBranch:
1712         set_dontcare(n);
1713         break;
1714       case Op_Jump:
1715         mstack.push(n->in(1), Visit);         // Switch Value
1716         mstack.push(n->in(0), Pre_Visit);     // Visit Control input
1717         continue;                             // while (mstack.is_nonempty())
1718       case Op_StrComp:
1719         set_shared(n); // Force result into register (it will be anyways)
1720         break;
1721       case Op_ConP: {  // Convert pointers above the centerline to NUL
1722         TypeNode *tn = n->as_Type(); // Constants derive from type nodes
1723         const TypePtr* tp = tn->type()->is_ptr();
1724         if (tp->_ptr == TypePtr::AnyNull) {
1725           tn->set_type(TypePtr::NULL_PTR);
1726         }
1727         break;








1728       }
1729       case Op_Binary:         // These are introduced in the Post_Visit state.
1730         ShouldNotReachHere();
1731         break;
1732       case Op_StoreB:         // Do match these, despite no ideal reg
1733       case Op_StoreC:
1734       case Op_StoreCM:
1735       case Op_StoreD:
1736       case Op_StoreF:
1737       case Op_StoreI:
1738       case Op_StoreL:
1739       case Op_StoreP:
1740       case Op_StoreN:
1741       case Op_Store16B:
1742       case Op_Store8B:
1743       case Op_Store4B:
1744       case Op_Store8C:
1745       case Op_Store4C:
1746       case Op_Store2C:
1747       case Op_Store4I:




 863       for (i = oldn->req(); (uint)i < oldn->len(); i++) {
 864         Node *m = oldn->in(i);
 865         if (m == NULL) break;
 866         // set -1 to call add_prec() instead of set_req() during Step1
 867         mstack.push(m, Visit, n, -1);
 868       }
 869 
 870       // For constant debug info, I'd rather have unmatched constants.
 871       int cnt = n->req();
 872       JVMState* jvms = n->jvms();
 873       int debug_cnt = jvms ? jvms->debug_start() : cnt;
 874 
 875       // Now do only debug info.  Clone constants rather than matching.
 876       // Constants are represented directly in the debug info without
 877       // the need for executable machine instructions.
 878       // Monitor boxes are also represented directly.
 879       for (i = cnt - 1; i >= debug_cnt; --i) { // For all debug inputs do
 880         Node *m = n->in(i);          // Get input
 881         int op = m->Opcode();
 882         assert((op == Op_BoxLock) == jvms->is_monitor_use(i), "boxes only at monitor sites");
 883         if( op == Op_ConI || op == Op_ConP || op == Op_ConN ||
 884             op == Op_ConF || op == Op_ConD || op == Op_ConL
 885             // || op == Op_BoxLock  // %%%% enable this and remove (+++) in chaitin.cpp
 886             ) {
 887           m = m->clone();
 888           mstack.push(m, Post_Visit, n, i); // Don't neet to visit
 889           mstack.push(m->in(0), Visit, m, 0);
 890         } else {
 891           mstack.push(m, Visit, n, i);
 892         }
 893       }
 894 
 895       // And now walk his children, and convert his inputs to new-space.
 896       for( ; i >= 0; --i ) { // For all normal inputs do
 897         Node *m = n->in(i);  // Get input
 898         if(m != NULL)
 899           mstack.push(m, Visit, n, i);
 900       }
 901 
 902     }
 903     else if (nstate == Post_Visit) {


1708       case Op_CProj:
1709       case Op_JumpProj:
1710       case Op_JProj:
1711       case Op_NeverBranch:
1712         set_dontcare(n);
1713         break;
1714       case Op_Jump:
1715         mstack.push(n->in(1), Visit);         // Switch Value
1716         mstack.push(n->in(0), Pre_Visit);     // Visit Control input
1717         continue;                             // while (mstack.is_nonempty())
1718       case Op_StrComp:
1719         set_shared(n); // Force result into register (it will be anyways)
1720         break;
1721       case Op_ConP: {  // Convert pointers above the centerline to NUL
1722         TypeNode *tn = n->as_Type(); // Constants derive from type nodes
1723         const TypePtr* tp = tn->type()->is_ptr();
1724         if (tp->_ptr == TypePtr::AnyNull) {
1725           tn->set_type(TypePtr::NULL_PTR);
1726         }
1727         break;
1728       }
1729       case Op_ConN: {  // Convert narrow pointers above the centerline to NUL
1730         TypeNode *tn = n->as_Type(); // Constants derive from type nodes
1731         const TypePtr* tp = tn->type()->is_narrowoop()->make_oopptr();
1732         if (tp->_ptr == TypePtr::AnyNull) {
1733           tn->set_type(TypeNarrowOop::NULL_PTR);
1734         }
1735         break;
1736       }
1737       case Op_Binary:         // These are introduced in the Post_Visit state.
1738         ShouldNotReachHere();
1739         break;
1740       case Op_StoreB:         // Do match these, despite no ideal reg
1741       case Op_StoreC:
1742       case Op_StoreCM:
1743       case Op_StoreD:
1744       case Op_StoreF:
1745       case Op_StoreI:
1746       case Op_StoreL:
1747       case Op_StoreP:
1748       case Op_StoreN:
1749       case Op_Store16B:
1750       case Op_Store8B:
1751       case Op_Store4B:
1752       case Op_Store8C:
1753       case Op_Store4C:
1754       case Op_Store2C:
1755       case Op_Store4I:


src/share/vm/opto/matcher.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File