src/share/vm/c1/c1_Optimizer.cpp

changeset 9715
e0e66aba375a
parent 6198
55fb97c4c58d
child 9756
2be326848943
     1.1 --- a/src/share/vm/c1/c1_Optimizer.cpp	Wed Jun 19 09:42:12 2019 +0900
     1.2 +++ b/src/share/vm/c1/c1_Optimizer.cpp	Tue Feb 19 08:58:55 2019 +0100
     1.3 @@ -175,6 +175,12 @@
     1.4    for_each_phi_fun(t_block, phi, return; );
     1.5    for_each_phi_fun(f_block, phi, return; );
     1.6  
     1.7 +  // Only replace safepoint gotos if state_before information is available (if is a safepoint)
     1.8 +  bool is_safepoint = if_->is_safepoint();
     1.9 +  if (!is_safepoint && (t_goto->is_safepoint() || f_goto->is_safepoint())) {
    1.10 +    return;
    1.11 +  }
    1.12 +
    1.13    // 2) substitute conditional expression
    1.14    //    with an IfOp followed by a Goto
    1.15    // cut if_ away and get node before
    1.16 @@ -203,7 +209,7 @@
    1.17  
    1.18    // append Goto to successor
    1.19    ValueStack* state_before = if_->state_before();
    1.20 -  Goto* goto_ = new Goto(sux, state_before, if_->is_safepoint() || t_goto->is_safepoint() || f_goto->is_safepoint());
    1.21 +  Goto* goto_ = new Goto(sux, state_before, is_safepoint);
    1.22  
    1.23    // prepare state for Goto
    1.24    ValueStack* goto_state = if_state;

mercurial