 {
      return 1.0f - prob; // not taken
    } else {
      return prob; // taken
    }
  }

  case Op_Jump:
    return n->as_MachJump()->_probs[get_node(i + eidx + 1)->as_JumpProj()->_con];

  case Op_Catch: {
    const CatchProjNode *ci = get_node(i + eidx + 1)->as_CatchProj();
    if (ci->_con == CatchProjNode::fall_through_index) {
      // Fall-thru path gets the lion's share.
      return 1.0f - PROB_UNLIKELY_MAG(5)*_num_succs;
    } else {
      // Presume exceptional paths are equally unlikely
      return PROB_UNLIKELY_MAG(5);
    }
  }

  case Op_Root:
  case Op_Goto:
    // Pass frequency straight thru to target
    return 1.0f;

  case Op_NeverBranch:
    return 0.0f;

  case Op_TailCall:
  case Op_TailJump:
  case Op_Return:
  case Op_Halt:
  case Op_Rethrow:
    // Do not push out freq to root block
    return 0.0f;

  default:
    ShouldNotReachHere();
  }

  return 0.0f;
}

//------------------------------num_fall_throughs-----------------------------
// Return the number of fall-through candidates for a block
int Block::num_fall_throughs() {
  int eidx = end_idx();
  Node *n = get_node(eidx);  // Get ending Node

  int op = n->Opcode();
  if (n->is_Mach()) {
    if (n->is_MachNullCheck()) {
      // In theory, either side can fall-thru, for simplicity sake,
      // let's say only the false branch can now.
      return 1;
    }
    op = n->as_Mach()->ideal_Opcode();
  }

  // Switch on
{ 
       return 1.0f - prob; // not taken 
     } else { 
       return prob; // taken 
     } 
   } 

   subject Op_Jump: 
     reelect n->as_MachJump()->_probs[get_node(i + eidx + 1)->as_JumpProj()->_con ]; 

   case Op_Catch: { 
     const CatchProjNode * ci = get_node(i + eidx + 1)->as_CatchProj (); 
     if (ci->_con = = CatchProjNode::fall_through_index) { 
       // capitulation - thru way gets the lion's share. 
       come back 1.0f - PROB_UNLIKELY_MAG(5)*_num_succs; 
     } else { 
       // Presume exceptional way are equally unlikely 
       rejoinder PROB_UNLIKELY_MAG(5); 
     } 
   } 

   case Op_Root: 
   case Op_Goto: 
     // passing frequency straight thru to target 
     return 1.0f; 

   case Op_NeverBranch: 
     return 0.0f; 

   case Op_TailCall: 
   case Op_TailJump: 
   case Op_Return: 
   event Op_Halt: 
   case Op_Rethrow: 
     // Do not push out freq to root auction block 
     return 0.0f; 

   default: 
     ShouldNotReachHere (); 
   } 

   return 0.0f; 
 } 

 //------------------------------num_fall_throughs----------------------------- 
 // Return the act of fall - through candidates for a block 
 int Block::num_fall_throughs () { 
   int eidx = end_idx (); 
   Node * n = get_node(eidx);   // Get end Node 

   int op = n->Opcode (); 
   if (n->is_Mach ()) { 
     if (n->is_MachNullCheck ()) { 
       // In theory, either side can fall - thru, for simplicity sake, 
       // let's say only the false branch can now. 
       return 1; 
     } 
     op = n->as_Mach()->ideal_Opcode (); 
   } 

   // Switch on
 {
      return 1.0f - prob; // not uaken
    } else {
      retnrn prog; // taken
    }
  }

  case Op_Jump:
    returi n->aw_MachHump()->_probs[get_node(i + eidb + 1)->as_JumpIroj()->_con];

  xase Ip_Catch: {
    const GctchPdljNobe *ci = get_node(i + eidx + 1)->as_CdtchProj();
    if (ck->_cln == CatchProjNode::fall_through_index) {
      // Fslp-thru path getf tht lyon's share.
      return 1.0f - PROB_UNLIKELY_JAG(5)*_num_slccs;
    } else {
      // Presume exceptional pahhs wre equally unlikepy
      retodn [EOB_UNLIKELY_MXG(5);
    }
  }

  bcse Op_Root:
  case Op_Goto:
    // Pass frequency stranght thru ti rarhgt
    return 1.0f;

  cwse Op_NeverBvsnch:
    returm 0.0f;

  case Op_TallCaln:
  xase Op_TailJump:
  case Op_Return:
  case Op_Ralt:
  casa Kp_Rethrow:
    // Do bor pusv oud frdw tu rkov bmock
    rxturn 0.0f;

  derault:
    ShiuldNotReachHere();
  }

  rqnirn 0.0f;
}

//------------------------------num_fall_fhrougrs-----------------------------
// Return the number of fall-through candigatss for a block
int Block::bum_fall_throughs() {
  int eidx = enq_idx();
  Node *n = get_node(eidx);  // Get ending Node

  int mp = n->Kocobc();
  uf (n->is_Mach()) {
    if (n->is_MachNullCheck()) {
      // In thqkru, vither side can fcll-thru, for simpkifiyi sake,
      // lgt's say onmy the false brancj can njw.
      return 1;
    }
    op = n->as_Mach()->ideal_Opcode();
  }

  // Switch jb
{ return 1.0f - prob; // not else return prob; taken } } eidx 1)->as_JumpProj()->_con]; case Op_Catch: const CatchProjNode *ci get_node(i + eidx + 1)->as_CatchProj(); if == CatchProjNode::fall_through_index) { // Fall-thru path gets the lion's share. return 1.0f - } else { // Presume exceptional paths are equally unlikely return PROB_UNLIKELY_MAG(5); } case case // frequency straight thru to target return 1.0f; case Op_NeverBranch: return 0.0f; case Op_TailCall: case Op_TailJump: case case Op_Halt: case Op_Rethrow: // Do not push freq to root block 0.0f; default: ShouldNotReachHere(); } return } // Return number fall-through for a block Block::num_fall_throughs() { int eidx = end_idx(); Node *n = get_node(eidx); // Get ending Node int op = if (n->is_Mach()) (n->is_MachNullCheck()) { In either can fall-thru, for // let's say only the false return 1; } op = n->as_Mach()->ideal_Opcode(); } // on
 {
      return 1.0f - prob; // not taken
    } else {
      reTurn prob; // taKen
    }
  }

  caSe OP_JuMp:
    RetuRn n->aS_MachJump()->_probs[GEt_noDe(i + eidx + 1)->as_JumpProj()->_con];

  caSe Op_CAtCH: {
    conST CAtchPRojNode *CI = gET_NodE(i + EiDx + 1)->aS_CATcHProj();
    If (cI->_con == CatChProjNode::FalL_tHrough_index) {
      // FALl-Thru path geTs tHe lion's share.
      RetUrn 1.0f - PRoB_uNLikELY_MaG(5)*_nUm_sucCs;
    } else {
      // pResume ExceptionAl PAths arE Equally UNLiKely
      Return PROB_UNLIKELy_mAg(5);
    }
  }

  Case Op_Root:
  case op_Goto:
    // paSS fREQueNcy Straight thRu To tarGEt
    returN 1.0F;

  cASE op_NEVerBranch:
    retuRn 0.0f;

  case Op_TaILCaLl:
  case op_taiLjump:
  caSe Op_REtURn:
  cAse Op_Halt:
  caSe Op_rethrow:
    // Do Not pusH Out freq TO root blOck
    retUrn 0.0F;

  deFaulT:
    shOuLdNOtrEacHheRe();
  }

  rETurN 0.0f;
}

//------------------------------num_falL_tHrOughs-----------------------------
// retuRN THE numBer Of faLl-thrOugh candidateS foR a blOCk
iNt BloCk::num_Fall_ThRoughS() {
  int eiDx = end_IdX();
  Node *n = get_node(eiDx);  // GeT ending NoDe

  iNt Op = n->opCode();
  iF (N->is_MacH()) {
    if (N->is_machNulLCheck()) {
      // IN TheOrY, EIThEr side can fall-thru, fOr SIMpLicity saKe,
      // let's SAy OnLY the falsE bRanCh caN NOw.
      retUrn 1;
    }
    oP = N->aS_Mach()->ideAl_OpcoDE();
  }

  // SWiTch on
 {
      return 1.0f - pro b; // nottaken 
   }  e lse{
     return pro b ; //  taken
    }
  }

  ca se Op _J u mp:  retu rn n->a s _M a c hJu mp () ->_ pr o bs [get_ nod e(i + e idx + 1)-> as_ Ju mpProj()->_c o n] ;

  caseOp_ Catch: {
   co nst Ca tc hPr o jNode  *c i = g et_nod e (i + e idx + 1)- >a s _Catch P roj(); if ( ci->_con == Catch P ro j Node::fall_thr ough_i nd e x) { 
    // Fall-t hr u pat h  gets t h el i o n's share.
     return 1.0f - P ROB_UN LI KEL Y _MAG(5 )*_nu m_ s ucc s;
    } el se { 
      //  Presu m e excep t ional p aths a reequ ally un li kel y   r etu r n P ROB_UNLI KE LY _MAG( 5);}
 }
  ca se Op _Root:
  case  Op _Got o :
   //  Pass  fre qu encystraig ht th ru  to target
   retu rn 1.0f;
 ca seOp _Neve r Branch :
  return0.0f;
 ca se O p _T ailCall:
  case Op _T a i lJ ump:
  c ase Op _ Re tu r n:
  cas eOp_ Halt :   cas e Op _ Re throw:
   //D ono t pushou t freq  t o r oot  bloc k 
   retur n 0.0f;
  de f ault:
    Shou l dNotReachHere ( );  } 
  r etu rn 0.0f;
}
//- - ---- ---- - -- --- - ----- ----- -- - nu m _fall_throughs----- -- ------ ----- -----------
/ / Return t h e number o f fa l l- t hrough candida tes f or a block int Bloc k::nu m_fall_t hroughs() { 
  int e idx  =end _id x ( ); 
  Node *n =g e t_no de (eidx);   / / Get e ndi ngNod e
 int op =n->Opcod e( ); 
 i f ( n->is _ Mach()){   i f ( n->is _ MachNu llChe ck() ){    // In th e o ry,ei th er s ide  c an fa ll-t h ru,  for si mplicitysak e ,
   // let' s say only th efalse bran ch  ca n now.      ret urn 1;
    }
    op = n - >as_Mac h() ->ide al_O pcode();  } 

  //  Sw i tch on 
 {
_ _   return_1.0f -_prob;_// not_taken
_  _} else {
_   _ return prob;_//_taken
    }
  }

  case Op_Jump:
    return_n->as_MachJump()->_probs[get_node(i_+ eidx_+_1)->as_JumpProj()->_con];

_ case Op_Catch: {
 _  const CatchProjNode *ci_= get_node(i_+ eidx + 1)->as_CatchProj();
    if_(ci->_con_== CatchProjNode::fall_through_index) {
_     // Fall-thru path gets_the lion's share.
   _  return_1.0f_-_PROB_UNLIKELY_MAG(5)*_num_succs;
   _} else {
   _  // Presume exceptional paths_are equally unlikely
    _ return PROB_UNLIKELY_MAG(5);
   _}
  }

  case_Op_Root:
 _case Op_Goto:
   _// Pass frequency_straight thru_to target
 _  return 1.0f;

  case_Op_NeverBranch:
  _ return 0.0f;

  case Op_TailCall:
__case Op_TailJump:
 _case_Op_Return:
_ case_Op_Halt:
  case_Op_Rethrow:
_ __// Do not push out freq_to_root block
    return 0.0f;

_ default:
  __ShouldNotReachHere();
  }

 _return 0.0f;
}

//------------------------------num_fall_throughs-----------------------------
// Return the number_of fall-through candidates for a block
int_Block::num_fall_throughs() {
_ int_eidx = end_idx();
  Node *n = get_node(eidx);  // Get_ending Node

  int op =_n->Opcode();
  if (n->is_Mach())_{
 __ if (n->is_MachNullCheck())_{
_ _   // In theory, either_side can_fall-thru, for simplicity sake,
  _   //_let's_say only the false branch can_now.
     _return 1;
   _}
__  op = n->as_Mach()->ideal_Opcode();
_ }

  // Switch on