From: Pat Gavlin Date: Wed, 26 Jul 2017 00:39:21 +0000 (-0700) Subject: Set `BBF_RUN_RARELY` for a scratch first BB if called count is 0. X-Git-Tag: accepted/tizen/base/20180629.140029~1083^2~65^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af50f816d24cef5ff639db48722851c48e43b058;p=platform%2Fupstream%2Fcoreclr.git Set `BBF_RUN_RARELY` for a scratch first BB if called count is 0. Just what it says on the tin. Fixes VSO 469624. --- 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