@@ -2026,7 +2026,6 @@ BasicBlock* Compiler::impPushCatchArgOnStack(BasicBlock* hndBlk, CORINFO_CLASS_H
20262026 newBlk->bbCodeOffs = hndBlk->bbCodeOffs;
20272027
20282028 FlowEdge* const newEdge = fgAddRefPred(hndBlk, newBlk);
2029- newEdge->setLikelihood(1.0);
20302029 newBlk->SetTargetEdge(newEdge);
20312030
20322031 // Spill into a temp.
@@ -4437,7 +4436,6 @@ void Compiler::impImportLeave(BasicBlock* block)
44374436
44384437 // the previous call to a finally returns to this call (to the next finally in the chain)
44394438 FlowEdge* const newEdge = fgAddRefPred(callBlock, step);
4440- newEdge->setLikelihood(1.0);
44414439 step->SetTargetEdge(newEdge);
44424440
44434441 // The new block will inherit this block's weight.
@@ -4487,7 +4485,6 @@ void Compiler::impImportLeave(BasicBlock* block)
44874485 assert(finallyNesting <= compHndBBtabCount);
44884486
44894487 FlowEdge* const newEdge = fgAddRefPred(HBtab->ebdHndBeg, callBlock);
4490- newEdge->setLikelihood(1.0);
44914488 callBlock->SetKindAndTargetEdge(BBJ_CALLFINALLY, newEdge);
44924489
44934490 GenTree* endLFin = new (this, GT_END_LFIN) GenTreeVal(GT_END_LFIN, TYP_VOID, finallyNesting);
@@ -4539,7 +4536,6 @@ void Compiler::impImportLeave(BasicBlock* block)
45394536
45404537 {
45414538 FlowEdge* const newEdge = fgAddRefPred(finalStep, step);
4542- newEdge->setLikelihood(1.0);
45434539 step->SetTargetEdge(newEdge);
45444540 }
45454541
@@ -4572,7 +4568,6 @@ void Compiler::impImportLeave(BasicBlock* block)
45724568 // this is the ultimate destination of the LEAVE
45734569 {
45744570 FlowEdge* const newEdge = fgAddRefPred(leaveTarget, finalStep);
4575- newEdge->setLikelihood(1.0);
45764571 finalStep->SetTargetEdge(newEdge);
45774572 }
45784573
@@ -4692,7 +4687,6 @@ void Compiler::impImportLeave(BasicBlock* block)
46924687 }
46934688
46944689 FlowEdge* const newEdge = fgAddRefPred(exitBlock, step);
4695- newEdge->setLikelihood(1.0);
46964690 step->SetTargetEdge(newEdge); // the previous step (maybe a call to a nested finally, or a nested catch
46974691 // exit) returns to this block
46984692
@@ -4737,7 +4731,6 @@ void Compiler::impImportLeave(BasicBlock* block)
47374731 // next block, and flow optimizations will remove it.
47384732 fgRemoveRefPred(block->GetTargetEdge());
47394733 FlowEdge* const newEdge = fgAddRefPred(callBlock, block);
4740- newEdge->setLikelihood(1.0);
47414734 block->SetKindAndTargetEdge(BBJ_ALWAYS, newEdge);
47424735
47434736 // The new block will inherit this block's weight.
@@ -4807,7 +4800,6 @@ void Compiler::impImportLeave(BasicBlock* block)
48074800 }
48084801
48094802 FlowEdge* const newEdge = fgAddRefPred(step2, step);
4810- newEdge->setLikelihood(1.0);
48114803 step->SetTargetEdge(newEdge);
48124804 step2->inheritWeight(block);
48134805 step2->CopyFlags(block, BBF_RUN_RARELY);
@@ -4848,7 +4840,6 @@ void Compiler::impImportLeave(BasicBlock* block)
48484840 }
48494841
48504842 FlowEdge* const newEdge = fgAddRefPred(callBlock, step);
4851- newEdge->setLikelihood(1.0);
48524843 step->SetTargetEdge(newEdge); // the previous call to a finally returns to this call (to the next
48534844 // finally in the chain)
48544845
@@ -4885,7 +4876,6 @@ void Compiler::impImportLeave(BasicBlock* block)
48854876#endif
48864877
48874878 FlowEdge* const newEdge = fgAddRefPred(HBtab->ebdHndBeg, callBlock);
4888- newEdge->setLikelihood(1.0);
48894879 callBlock->SetKindAndTargetEdge(BBJ_CALLFINALLY, newEdge);
48904880 }
48914881 else if (HBtab->HasCatchHandler() && jitIsBetween(blkAddr, tryBeg, tryEnd) &&
@@ -4954,7 +4944,6 @@ void Compiler::impImportLeave(BasicBlock* block)
49544944 }
49554945
49564946 FlowEdge* const newEdge = fgAddRefPred(catchStep, step);
4957- newEdge->setLikelihood(1.0);
49584947 step->SetTargetEdge(newEdge);
49594948
49604949 // The new block will inherit this block's weight.
@@ -5009,7 +4998,6 @@ void Compiler::impImportLeave(BasicBlock* block)
50094998 fgRemoveRefPred(step->GetTargetEdge());
50104999 }
50115000 FlowEdge* const newEdge = fgAddRefPred(leaveTarget, step);
5012- newEdge->setLikelihood(1.0);
50135001 step->SetTargetEdge(newEdge); // this is the ultimate destination of the LEAVE
50145002
50155003#ifdef DEBUG
@@ -5072,7 +5060,6 @@ void Compiler::impResetLeaveBlock(BasicBlock* block, unsigned jmpAddr)
50725060 BasicBlock* dupBlock = BasicBlock::New(this);
50735061 dupBlock->CopyFlags(block);
50745062 FlowEdge* const newEdge = fgAddRefPred(block->GetTarget(), dupBlock);
5075- newEdge->setLikelihood(1.0);
50765063 dupBlock->SetKindAndTargetEdge(BBJ_CALLFINALLY, newEdge);
50775064 dupBlock->copyEHRegion(block);
50785065 dupBlock->bbCatchTyp = block->bbCatchTyp;
@@ -5104,7 +5091,6 @@ void Compiler::impResetLeaveBlock(BasicBlock* block, unsigned jmpAddr)
51045091
51055092 fgRemoveRefPred(block->GetTargetEdge());
51065093 FlowEdge* const newEdge = fgAddRefPred(fgLookupBB(jmpAddr), block);
5107- newEdge->setLikelihood(1.0);
51085094 block->SetKindAndTargetEdge(BBJ_LEAVE, newEdge);
51095095
51105096 // We will leave the BBJ_ALWAYS block we introduced. When it's reimported
@@ -7187,7 +7173,7 @@ void Compiler::impImportBlockCode(BasicBlock* block)
71877173 JITDUMP(FMT_BB " always branches to " FMT_BB ", changing to BBJ_ALWAYS\n", block->bbNum,
71887174 block->GetFalseTarget()->bbNum);
71897175 fgRemoveRefPred(block->GetFalseEdge());
7190- block->SetKind (BBJ_ALWAYS);
7176+ block->SetKindAndTargetEdge (BBJ_ALWAYS, block->GetTrueEdge() );
71917177
71927178 // TODO-NoFallThrough: Once false target can diverge from bbNext, it may not make sense to
71937179 // set BBF_NONE_QUIRK
@@ -7262,7 +7248,7 @@ void Compiler::impImportBlockCode(BasicBlock* block)
72627248 JITDUMP("\nThe conditional jump becomes an unconditional jump to " FMT_BB "\n",
72637249 block->GetTrueTarget()->bbNum);
72647250 fgRemoveRefPred(block->GetFalseEdge());
7265- block->SetKind (BBJ_ALWAYS);
7251+ block->SetKindAndTargetEdge (BBJ_ALWAYS, block->GetTrueEdge() );
72667252 }
72677253 else
72687254 {
@@ -7276,9 +7262,6 @@ void Compiler::impImportBlockCode(BasicBlock* block)
72767262 // to set BBF_NONE_QUIRK
72777263 block->SetFlags(BBF_NONE_QUIRK);
72787264 }
7279-
7280- FlowEdge* const edge = fgGetPredForBlock(block->GetTarget(), block);
7281- edge->setLikelihood(1.0);
72827265 }
72837266
72847267 break;
@@ -7452,7 +7435,7 @@ void Compiler::impImportBlockCode(BasicBlock* block)
74527435 JITDUMP(FMT_BB " always branches to " FMT_BB ", changing to BBJ_ALWAYS\n", block->bbNum,
74537436 block->GetFalseTarget()->bbNum);
74547437 fgRemoveRefPred(block->GetFalseEdge());
7455- block->SetKind (BBJ_ALWAYS);
7438+ block->SetKindAndTargetEdge (BBJ_ALWAYS, block->GetTrueEdge() );
74567439
74577440 // TODO-NoFallThrough: Once false target can diverge from bbNext, it may not make sense to
74587441 // set BBF_NONE_QUIRK
@@ -7540,7 +7523,6 @@ void Compiler::impImportBlockCode(BasicBlock* block)
75407523 {
75417524 // transform the basic block into a BBJ_ALWAYS
75427525 block->SetKindAndTargetEdge(BBJ_ALWAYS, curEdge);
7543- curEdge->setLikelihood(1.0);
75447526 foundVal = true;
75457527 }
75467528 else
0 commit comments