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

src/share/vm/opto/output.cpp

Print this page




1469     // Verify that the distance for generated before forward
1470     // short branches is still valid.
1471     guarantee((int)(blk_starts[i+1] - blk_starts[i]) >= (current_offset - blk_offset), "shouldn't increase block size");
1472 
1473     // Save new block start offset
1474     blk_starts[i] = blk_offset;
1475   } // End of for all blocks
1476   blk_starts[nblocks] = current_offset;
1477 
1478   non_safepoints.flush_at_end();
1479 
1480   // Offset too large?
1481   if (failing())  return;
1482 
1483   // Define a pseudo-label at the end of the code
1484   MacroAssembler(cb).bind( blk_labels[nblocks] );
1485 
1486   // Compute the size of the first block
1487   _first_block_size = blk_labels[1].loc_pos() - blk_labels[0].loc_pos();
1488 
1489   assert(cb->insts_size() < 500000, "method is unreasonably large");




1490 
1491 #ifdef ASSERT
1492   for (uint i = 0; i < nblocks; i++) { // For all blocks
1493     if (jmp_target[i] != 0) {
1494       int br_size = jmp_size[i];
1495       int offset = blk_starts[jmp_target[i]]-(blk_starts[i] + jmp_offset[i]);
1496       if (!_matcher->is_short_branch_offset(jmp_rule[i], br_size, offset)) {
1497         tty->print_cr("target (%d) - jmp_offset(%d) = offset (%d), jump_size(%d), jmp_block B%d, target_block B%d", blk_starts[jmp_target[i]], blk_starts[i] + jmp_offset[i], offset, br_size, i, jmp_target[i]);
1498         assert(false, "Displacement too large for short jmp");
1499       }
1500     }
1501   }
1502 #endif
1503 
1504 #ifndef PRODUCT
1505   // Information on the size of the method, without the extraneous code
1506   Scheduling::increment_method_size(cb->insts_size());
1507 #endif
1508 
1509   // ------------------




1469     // Verify that the distance for generated before forward
1470     // short branches is still valid.
1471     guarantee((int)(blk_starts[i+1] - blk_starts[i]) >= (current_offset - blk_offset), "shouldn't increase block size");
1472 
1473     // Save new block start offset
1474     blk_starts[i] = blk_offset;
1475   } // End of for all blocks
1476   blk_starts[nblocks] = current_offset;
1477 
1478   non_safepoints.flush_at_end();
1479 
1480   // Offset too large?
1481   if (failing())  return;
1482 
1483   // Define a pseudo-label at the end of the code
1484   MacroAssembler(cb).bind( blk_labels[nblocks] );
1485 
1486   // Compute the size of the first block
1487   _first_block_size = blk_labels[1].loc_pos() - blk_labels[0].loc_pos();
1488 
1489   // Record compilation failure and return, if method is very large.
1490   if (cb->insts_size() >= 500000) {
1491     C->record_failure("method is unreasonably large");
1492     return;
1493   }
1494 
1495 #ifdef ASSERT
1496   for (uint i = 0; i < nblocks; i++) { // For all blocks
1497     if (jmp_target[i] != 0) {
1498       int br_size = jmp_size[i];
1499       int offset = blk_starts[jmp_target[i]]-(blk_starts[i] + jmp_offset[i]);
1500       if (!_matcher->is_short_branch_offset(jmp_rule[i], br_size, offset)) {
1501         tty->print_cr("target (%d) - jmp_offset(%d) = offset (%d), jump_size(%d), jmp_block B%d, target_block B%d", blk_starts[jmp_target[i]], blk_starts[i] + jmp_offset[i], offset, br_size, i, jmp_target[i]);
1502         assert(false, "Displacement too large for short jmp");
1503       }
1504     }
1505   }
1506 #endif
1507 
1508 #ifndef PRODUCT
1509   // Information on the size of the method, without the extraneous code
1510   Scheduling::increment_method_size(cb->insts_size());
1511 #endif
1512 
1513   // ------------------


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