comparison src/share/vm/opto/output.cpp @ 3248:e6beb62de02d

7032963: StoreCM shouldn't participate in store elimination Reviewed-by: kvn
author never
date Tue, 05 Apr 2011 19:14:03 -0700
parents 1c0cf339481b
children 92add02409c9
comparison
equal deleted inserted replaced
2436:8f1042ff784d 3248:e6beb62de02d
1352 1352
1353 #ifdef ASSERT 1353 #ifdef ASSERT
1354 // Check that oop-store precedes the card-mark 1354 // Check that oop-store precedes the card-mark
1355 else if( mach->ideal_Opcode() == Op_StoreCM ) { 1355 else if( mach->ideal_Opcode() == Op_StoreCM ) {
1356 uint storeCM_idx = j; 1356 uint storeCM_idx = j;
1357 Node *oop_store = mach->in(mach->_cnt); // First precedence edge 1357 int count = 0;
1358 assert( oop_store != NULL, "storeCM expects a precedence edge"); 1358 for (uint prec = mach->req(); prec < mach->len(); prec++) {
1359 uint i4; 1359 Node *oop_store = mach->in(prec); // Precedence edge
1360 for( i4 = 0; i4 < last_inst; ++i4 ) { 1360 if (oop_store == NULL) continue;
1361 if( b->_nodes[i4] == oop_store ) break; 1361 count++;
1362 uint i4;
1363 for( i4 = 0; i4 < last_inst; ++i4 ) {
1364 if( b->_nodes[i4] == oop_store ) break;
1365 }
1366 // Note: This test can provide a false failure if other precedence
1367 // edges have been added to the storeCMNode.
1368 assert( i4 == last_inst || i4 < storeCM_idx, "CM card-mark executes before oop-store");
1362 } 1369 }
1363 // Note: This test can provide a false failure if other precedence 1370 assert(count > 0, "storeCM expects at least one precedence edge");
1364 // edges have been added to the storeCMNode.
1365 assert( i4 == last_inst || i4 < storeCM_idx, "CM card-mark executes before oop-store");
1366 } 1371 }
1367 #endif 1372 #endif
1368 1373
1369 else if( !n->is_Proj() ) { 1374 else if( !n->is_Proj() ) {
1370 // Remember the beginning of the previous instruction, in case 1375 // Remember the beginning of the previous instruction, in case