455 void MethodLiveness::BasicBlock::compute_gen_kill_range(ciBytecodeStream *bytes) {
456 _gen.clear();
457 _kill.clear();
458
459 while (bytes->next() != ciBytecodeStream::EOBC()) {
460 compute_gen_kill_single(bytes);
461 }
462 }
463
464 void MethodLiveness::BasicBlock::compute_gen_kill_single(ciBytecodeStream *instruction) {
465 // We prohibit _gen and _kill from having locals in common. If we
466 // know that one is definitely going to be applied before the other,
467 // we could save some computation time by relaxing this prohibition.
468
469 switch (instruction->cur_bc()) {
470 case Bytecodes::_nop:
471 case Bytecodes::_goto:
472 case Bytecodes::_goto_w:
473 case Bytecodes::_aconst_null:
474 case Bytecodes::_new:
475 case Bytecodes::_iconst_m1:
476 case Bytecodes::_iconst_0:
477 case Bytecodes::_iconst_1:
478 case Bytecodes::_iconst_2:
479 case Bytecodes::_iconst_3:
480 case Bytecodes::_iconst_4:
481 case Bytecodes::_iconst_5:
482 case Bytecodes::_fconst_0:
483 case Bytecodes::_fconst_1:
484 case Bytecodes::_fconst_2:
485 case Bytecodes::_bipush:
486 case Bytecodes::_sipush:
487 case Bytecodes::_lconst_0:
488 case Bytecodes::_lconst_1:
489 case Bytecodes::_dconst_0:
490 case Bytecodes::_dconst_1:
491 case Bytecodes::_ldc2_w:
492 case Bytecodes::_ldc:
493 case Bytecodes::_ldc_w:
494 case Bytecodes::_iaload:
|
455 void MethodLiveness::BasicBlock::compute_gen_kill_range(ciBytecodeStream *bytes) {
456 _gen.clear();
457 _kill.clear();
458
459 while (bytes->next() != ciBytecodeStream::EOBC()) {
460 compute_gen_kill_single(bytes);
461 }
462 }
463
464 void MethodLiveness::BasicBlock::compute_gen_kill_single(ciBytecodeStream *instruction) {
465 // We prohibit _gen and _kill from having locals in common. If we
466 // know that one is definitely going to be applied before the other,
467 // we could save some computation time by relaxing this prohibition.
468
469 switch (instruction->cur_bc()) {
470 case Bytecodes::_nop:
471 case Bytecodes::_goto:
472 case Bytecodes::_goto_w:
473 case Bytecodes::_aconst_null:
474 case Bytecodes::_new:
475 case Bytecodes::_aconst_init:
476 case Bytecodes::_withfield:
477 case Bytecodes::_iconst_m1:
478 case Bytecodes::_iconst_0:
479 case Bytecodes::_iconst_1:
480 case Bytecodes::_iconst_2:
481 case Bytecodes::_iconst_3:
482 case Bytecodes::_iconst_4:
483 case Bytecodes::_iconst_5:
484 case Bytecodes::_fconst_0:
485 case Bytecodes::_fconst_1:
486 case Bytecodes::_fconst_2:
487 case Bytecodes::_bipush:
488 case Bytecodes::_sipush:
489 case Bytecodes::_lconst_0:
490 case Bytecodes::_lconst_1:
491 case Bytecodes::_dconst_0:
492 case Bytecodes::_dconst_1:
493 case Bytecodes::_ldc2_w:
494 case Bytecodes::_ldc:
495 case Bytecodes::_ldc_w:
496 case Bytecodes::_iaload:
|