From af50f816d24cef5ff639db48722851c48e43b058 Mon Sep 17 00:00:00 2001 From: Pat Gavlin Date: Tue, 25 Jul 2017 17:39:21 -0700 Subject: [PATCH] Set `BBF_RUN_RARELY` for a scratch first BB if called count is 0. Just what it says on the tin. Fixes VSO 469624. --- src/jit/flowgraph.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jit/flowgraph.cpp b/src/jit/flowgraph.cpp index 5dab6bb..0c8a28e 100644 --- a/src/jit/flowgraph.cpp +++ b/src/jit/flowgraph.cpp @@ -12836,6 +12836,10 @@ void Compiler::fgComputeEdgeWeights() if (fgFirstBBisScratch()) { fgFirstBB->setBBProfileWeight(fgCalledCount); + if (fgFirstBB->bbWeight == 0) + { + fgFirstBB->bbFlags |= BBF_RUN_RARELY; + } } #if DEBUG -- 2.7.4