1.1 --- a/src/share/vm/opto/parse2.cpp Wed Dec 05 09:00:00 2007 -0800 1.2 +++ b/src/share/vm/opto/parse2.cpp Wed Dec 05 09:01:00 2007 -0800 1.3 @@ -885,6 +885,9 @@ 1.4 void Parse::do_ifnull(BoolTest::mask btest) { 1.5 int target_bci = iter().get_dest(); 1.6 1.7 + Block* branch_block = successor_for_bci(target_bci); 1.8 + Block* next_block = successor_for_bci(iter().next_bci()); 1.9 + 1.10 float cnt; 1.11 float prob = branch_prediction(cnt, btest, target_bci); 1.12 if (prob == PROB_UNKNOWN) { 1.13 @@ -902,13 +905,16 @@ 1.14 uncommon_trap(Deoptimization::Reason_unreached, 1.15 Deoptimization::Action_reinterpret, 1.16 NULL, "cold"); 1.17 + if (EliminateAutoBox) { 1.18 + // Mark the successor blocks as parsed 1.19 + branch_block->next_path_num(); 1.20 + next_block->next_path_num(); 1.21 + } 1.22 return; 1.23 } 1.24 1.25 // If this is a backwards branch in the bytecodes, add Safepoint 1.26 maybe_add_safepoint(target_bci); 1.27 - Block* branch_block = successor_for_bci(target_bci); 1.28 - Block* next_block = successor_for_bci(iter().next_bci()); 1.29 1.30 explicit_null_checks_inserted++; 1.31 Node* a = null(); 1.32 @@ -935,6 +941,10 @@ 1.33 1.34 if (stopped()) { // Path is dead? 1.35 explicit_null_checks_elided++; 1.36 + if (EliminateAutoBox) { 1.37 + // Mark the successor block as parsed 1.38 + branch_block->next_path_num(); 1.39 + } 1.40 } else { // Path is live. 1.41 // Update method data 1.42 profile_taken_branch(target_bci); 1.43 @@ -950,6 +960,10 @@ 1.44 1.45 if (stopped()) { // Path is dead? 1.46 explicit_null_checks_elided++; 1.47 + if (EliminateAutoBox) { 1.48 + // Mark the successor block as parsed 1.49 + next_block->next_path_num(); 1.50 + } 1.51 } else { // Path is live. 1.52 // Update method data 1.53 profile_not_taken_branch(); 1.54 @@ -962,6 +976,9 @@ 1.55 void Parse::do_if(BoolTest::mask btest, Node* c) { 1.56 int target_bci = iter().get_dest(); 1.57 1.58 + Block* branch_block = successor_for_bci(target_bci); 1.59 + Block* next_block = successor_for_bci(iter().next_bci()); 1.60 + 1.61 float cnt; 1.62 float prob = branch_prediction(cnt, btest, target_bci); 1.63 float untaken_prob = 1.0 - prob; 1.64 @@ -980,6 +997,11 @@ 1.65 uncommon_trap(Deoptimization::Reason_unreached, 1.66 Deoptimization::Action_reinterpret, 1.67 NULL, "cold"); 1.68 + if (EliminateAutoBox) { 1.69 + // Mark the successor blocks as parsed 1.70 + branch_block->next_path_num(); 1.71 + next_block->next_path_num(); 1.72 + } 1.73 return; 1.74 } 1.75 1.76 @@ -1018,15 +1040,17 @@ 1.77 untaken_branch = tmp; 1.78 } 1.79 1.80 - Block* branch_block = successor_for_bci(target_bci); 1.81 - Block* next_block = successor_for_bci(iter().next_bci()); 1.82 - 1.83 // Branch is taken: 1.84 { PreserveJVMState pjvms(this); 1.85 taken_branch = _gvn.transform(taken_branch); 1.86 set_control(taken_branch); 1.87 1.88 - if (!stopped()) { 1.89 + if (stopped()) { 1.90 + if (EliminateAutoBox) { 1.91 + // Mark the successor block as parsed 1.92 + branch_block->next_path_num(); 1.93 + } 1.94 + } else { 1.95 // Update method data 1.96 profile_taken_branch(target_bci); 1.97 adjust_map_after_if(taken_btest, c, prob, branch_block, next_block); 1.98 @@ -1039,7 +1063,12 @@ 1.99 set_control(untaken_branch); 1.100 1.101 // Branch not taken. 1.102 - if (!stopped()) { 1.103 + if (stopped()) { 1.104 + if (EliminateAutoBox) { 1.105 + // Mark the successor block as parsed 1.106 + next_block->next_path_num(); 1.107 + } 1.108 + } else { 1.109 // Update method data 1.110 profile_not_taken_branch(); 1.111 adjust_map_after_if(untaken_btest, c, untaken_prob,