< prev index next >

src/hotspot/share/opto/gcm.cpp

Print this page

 223           if (n == NULL) {
 224             n = m;
 225           } else {
 226             assert(is_dominator(n, m) || is_dominator(m, n), "one must dominate the other");
 227             n = is_dominator(n, m) ? m : n;
 228           }
 229         } else {
 230           assert(node->is_Mach(), "sanity");
 231           assert(node->as_Mach()->ideal_Opcode() == Op_StoreCM, "must be StoreCM node");
 232         }
 233       }
 234       if (n != NULL) {
 235         assert(node->in(0), "control should have been set");
 236         assert(is_dominator(n, node->in(0)) || is_dominator(node->in(0), n), "one must dominate the other");
 237         if (!is_dominator(n, node->in(0))) {
 238           node->set_req(0, n);
 239         }
 240       }
 241 
 242       // process all inputs that are non NULL
 243       for (int i = node->req()-1; i >= 0; --i) {
 244         if (node->in(i) != NULL) {
 245           spstack.push(node->in(i));
 246         }
 247       }
 248     }
 249   }
 250 }
 251 
 252 #ifdef ASSERT
 253 // Assert that new input b2 is dominated by all previous inputs.
 254 // Check this by by seeing that it is dominated by b1, the deepest
 255 // input observed until b2.
 256 static void assert_dom(Block* b1, Block* b2, Node* n, const PhaseCFG* cfg) {
 257   if (b1 == NULL)  return;
 258   assert(b1->_dom_depth < b2->_dom_depth, "sanity");
 259   Block* tmp = b2;
 260   while (tmp != b1 && tmp != NULL) {
 261     tmp = tmp->_idom;
 262   }
 263   if (tmp != b1) {

 223           if (n == NULL) {
 224             n = m;
 225           } else {
 226             assert(is_dominator(n, m) || is_dominator(m, n), "one must dominate the other");
 227             n = is_dominator(n, m) ? m : n;
 228           }
 229         } else {
 230           assert(node->is_Mach(), "sanity");
 231           assert(node->as_Mach()->ideal_Opcode() == Op_StoreCM, "must be StoreCM node");
 232         }
 233       }
 234       if (n != NULL) {
 235         assert(node->in(0), "control should have been set");
 236         assert(is_dominator(n, node->in(0)) || is_dominator(node->in(0), n), "one must dominate the other");
 237         if (!is_dominator(n, node->in(0))) {
 238           node->set_req(0, n);
 239         }
 240       }
 241 
 242       // process all inputs that are non NULL
 243       for (int i = node->len()-1; i >= 0; --i) {
 244         if (node->in(i) != NULL) {
 245           spstack.push(node->in(i));
 246         }
 247       }
 248     }
 249   }
 250 }
 251 
 252 #ifdef ASSERT
 253 // Assert that new input b2 is dominated by all previous inputs.
 254 // Check this by by seeing that it is dominated by b1, the deepest
 255 // input observed until b2.
 256 static void assert_dom(Block* b1, Block* b2, Node* n, const PhaseCFG* cfg) {
 257   if (b1 == NULL)  return;
 258   assert(b1->_dom_depth < b2->_dom_depth, "sanity");
 259   Block* tmp = b2;
 260   while (tmp != b1 && tmp != NULL) {
 261     tmp = tmp->_idom;
 262   }
 263   if (tmp != b1) {
< prev index next >