// Morph the trees in all the blocks of the method
//
auto morphGlobalPhase = [this]() {
+ unsigned prevBBCount = fgBBcount;
fgMorphBlocks();
// Fix any LclVar annotations on discarded struct promotion temps for implicit by-ref args
compCurBB = nullptr;
#endif // DEBUG
+ // If we needed to create any new BasicBlocks then renumber the blocks
+ if (fgBBcount > prevBBCount)
+ {
+ fgRenumberBlocks();
+ }
+
// We can now enable all phase checking
activePhaseChecks = PhaseChecks::CHECK_ALL;
};
// GS security checks for unsafe buffers
//
auto gsPhase = [this]() {
+ unsigned prevBBCount = fgBBcount;
if (getNeedsGSSecurityCookie())
{
gsGSChecksInitCookie();
{
gsCopyShadowParams();
}
+
+ // If we needed to create any new BasicBlocks then renumber the blocks
+ if (fgBBcount > prevBBCount)
+ {
+ fgRenumberBlocks();
+ }
}
else
{