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

src/share/vm/opto/compile.cpp

Print this page
rev 8962 : sched pressure
rev 9360 : 8137168: Replace IfNode with a new RangeCheckNode for range checks
Summary: new RangeCheckNode to enable optimization of explicit library level range checks
Reviewed-by:


3164         }
3165       } else {
3166         if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
3167           Node* shift = new AndINode(in2, ConNode::make(TypeInt::make(mask)));
3168           n->set_req(2, shift);
3169         }
3170       }
3171       if (in2->outcnt() == 0) { // Remove dead node
3172         in2->disconnect_inputs(NULL, this);
3173       }
3174     }
3175     break;
3176   case Op_MemBarStoreStore:
3177   case Op_MemBarRelease:
3178     // Break the link with AllocateNode: it is no longer useful and
3179     // confuses register allocation.
3180     if (n->req() > MemBarNode::Precedent) {
3181       n->set_req(MemBarNode::Precedent, top());
3182     }
3183     break;







3184   default:
3185     assert( !n->is_Call(), "" );
3186     assert( !n->is_Mem(), "" );
3187     assert( nop != Op_ProfileBoolean, "should be eliminated during IGVN");
3188     break;
3189   }
3190 
3191   // Collect CFG split points
3192   if (n->is_MultiBranch())
3193     frc._tests.push(n);

3194 }
3195 
3196 //------------------------------final_graph_reshaping_walk---------------------
3197 // Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
3198 // requires that the walk visits a node's inputs before visiting the node.
3199 void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) {
3200   ResourceArea *area = Thread::current()->resource_area();
3201   Unique_Node_List sfpt(area);
3202 
3203   frc._visited.set(root->_idx); // first, mark node as visited
3204   uint cnt = root->req();
3205   Node *n = root;
3206   uint  i = 0;
3207   while (true) {
3208     if (i < cnt) {
3209       // Place all non-visited non-null inputs onto stack
3210       Node* m = n->in(i);
3211       ++i;
3212       if (m != NULL && !frc._visited.test_set(m->_idx)) {
3213         if (m->is_SafePoint() && m->as_SafePoint()->jvms() != NULL) {




3164         }
3165       } else {
3166         if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
3167           Node* shift = new AndINode(in2, ConNode::make(TypeInt::make(mask)));
3168           n->set_req(2, shift);
3169         }
3170       }
3171       if (in2->outcnt() == 0) { // Remove dead node
3172         in2->disconnect_inputs(NULL, this);
3173       }
3174     }
3175     break;
3176   case Op_MemBarStoreStore:
3177   case Op_MemBarRelease:
3178     // Break the link with AllocateNode: it is no longer useful and
3179     // confuses register allocation.
3180     if (n->req() > MemBarNode::Precedent) {
3181       n->set_req(MemBarNode::Precedent, top());
3182     }
3183     break;
3184   case Op_RangeCheck: {
3185     RangeCheckNode* rc = n->as_RangeCheck();
3186     Node* iff = new IfNode(rc->in(0), rc->in(1), rc->_prob, rc->_fcnt);
3187     n->subsume_by(iff, this);
3188     frc._tests.push(iff);
3189     break;
3190   }
3191   default:
3192     assert( !n->is_Call(), "" );
3193     assert( !n->is_Mem(), "" );
3194     assert( nop != Op_ProfileBoolean, "should be eliminated during IGVN");
3195     break;
3196   }
3197 
3198   // Collect CFG split points
3199   if (n->is_MultiBranch() && !n->is_RangeCheck()) {
3200     frc._tests.push(n);
3201   }
3202 }
3203 
3204 //------------------------------final_graph_reshaping_walk---------------------
3205 // Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
3206 // requires that the walk visits a node's inputs before visiting the node.
3207 void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) {
3208   ResourceArea *area = Thread::current()->resource_area();
3209   Unique_Node_List sfpt(area);
3210 
3211   frc._visited.set(root->_idx); // first, mark node as visited
3212   uint cnt = root->req();
3213   Node *n = root;
3214   uint  i = 0;
3215   while (true) {
3216     if (i < cnt) {
3217       // Place all non-visited non-null inputs onto stack
3218       Node* m = n->in(i);
3219       ++i;
3220       if (m != NULL && !frc._visited.test_set(m->_idx)) {
3221         if (m->is_SafePoint() && m->as_SafePoint()->jvms() != NULL) {


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