define FMT_BB as "BB%02u" and use it uniformly in the codebase
authorBrian Sullivan <briansul@microsoft.com>
Wed, 22 Aug 2018 20:37:54 +0000 (13:37 -0700)
committerBrian Sullivan <briansul@microsoft.com>
Wed, 22 Aug 2018 23:17:51 +0000 (16:17 -0700)
We use the following format when print the BasicBlock number: bbNum
This define is used with string concatenation to put this in printf format strings

33 files changed:
src/jit/assertionprop.cpp
src/jit/block.cpp
src/jit/block.h
src/jit/codegenarm.cpp
src/jit/codegenarm64.cpp
src/jit/codegencommon.cpp
src/jit/codegenlinear.cpp
src/jit/codegenxarch.cpp
src/jit/compiler.cpp
src/jit/copyprop.cpp
src/jit/earlyprop.cpp
src/jit/emit.cpp
src/jit/emitarm.cpp
src/jit/emitarm64.cpp
src/jit/emitxarch.cpp
src/jit/flowgraph.cpp
src/jit/gentree.cpp
src/jit/importer.cpp
src/jit/jiteh.cpp
src/jit/lclvars.cpp
src/jit/liveness.cpp
src/jit/lower.cpp
src/jit/lsra.cpp
src/jit/lsrabuild.cpp
src/jit/morph.cpp
src/jit/optcse.cpp
src/jit/optimizer.cpp
src/jit/rangecheck.cpp
src/jit/scopeinfo.cpp
src/jit/ssabuilder.cpp
src/jit/ssarenamestate.cpp
src/jit/stacklevelsetter.cpp
src/jit/valuenum.cpp

index c573ffa..31efbc0 100644 (file)
@@ -215,7 +215,8 @@ void Compiler::optAddCopies()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("        Referenced in BB%02u, bbWeight is %s", bbNum, refCntWtd2str(block->getBBWeight(this)));
+                printf("        Referenced in " FMT_BB ", bbWeight is %s", bbNum,
+                       refCntWtd2str(block->getBBWeight(this)));
 
                 if (isDominatedByFirstBB)
                 {
@@ -313,7 +314,7 @@ void Compiler::optAddCopies()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("        Starting at BB%02u, bbWeight is %s", block->bbNum,
+                printf("        Starting at " FMT_BB ", bbWeight is %s", block->bbNum,
                        refCntWtd2str(block->getBBWeight(this)));
 
                 printf(", bestWeight is %s\n", refCntWtd2str(bestWeight));
@@ -336,7 +337,7 @@ void Compiler::optAddCopies()
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("        Considering BB%02u, bbWeight is %s", block->bbNum,
+                    printf("        Considering " FMT_BB ", bbWeight is %s", block->bbNum,
                            refCntWtd2str(block->getBBWeight(this)));
 
                     printf(", bestWeight is %s\n", refCntWtd2str(bestWeight));
@@ -412,7 +413,7 @@ void Compiler::optAddCopies()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("        Insert copy at the %s of BB%02u\n",
+                printf("        Insert copy at the %s of " FMT_BB "\n",
                        (BlockSetOps::IsEmpty(this, paramImportantUseDom) ||
                         BlockSetOps::IsMember(this, varDsc->lvRefBlks, bestBlock->bbNum))
                            ? "start"
@@ -1560,7 +1561,7 @@ AssertionIndex Compiler::optAddAssertion(AssertionDsc* newAssertion)
     {
         printf("GenTreeNode creates assertion:\n");
         gtDispTree(optAssertionPropCurrentTree, nullptr, nullptr, true);
-        printf(optLocalAssertionProp ? "In BB%02u New Local " : "In BB%02u New Global ", compCurBB->bbNum);
+        printf(optLocalAssertionProp ? "In " FMT_BB " New Local " : "In " FMT_BB " New Global ", compCurBB->bbNum);
         optPrintAssertion(newAssertion, optAssertionCount);
     }
 #endif // DEBUG
@@ -2683,7 +2684,7 @@ GenTree* Compiler::optConstantAssertionProp(AssertionDsc* curAssertion,
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nAssertion prop in BB%02u:\n", compCurBB->bbNum);
+        printf("\nAssertion prop in " FMT_BB ":\n", compCurBB->bbNum);
         optPrintAssertion(curAssertion, index);
         gtDispTree(newTree, nullptr, nullptr, true);
     }
@@ -2803,7 +2804,7 @@ GenTree* Compiler::optCopyAssertionProp(AssertionDsc* curAssertion,
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nAssertion prop in BB%02u:\n", compCurBB->bbNum);
+        printf("\nAssertion prop in " FMT_BB ":\n", compCurBB->bbNum);
         optPrintAssertion(curAssertion, index);
         gtDispTree(tree, nullptr, nullptr, true);
     }
@@ -3044,7 +3045,7 @@ GenTree* Compiler::optAssertionPropGlobal_RelOp(ASSERT_VALARG_TP assertions, Gen
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nVN relop based constant assertion prop in BB%02u:\n", compCurBB->bbNum);
+            printf("\nVN relop based constant assertion prop in " FMT_BB ":\n", compCurBB->bbNum);
             printf("Assertion index=#%02u: ", index);
             printTreeID(op1);
             printf(" %s ", (curAssertion->assertionKind == OAK_EQUAL) ? "==" : "!=");
@@ -3128,7 +3129,7 @@ GenTree* Compiler::optAssertionPropGlobal_RelOp(ASSERT_VALARG_TP assertions, Gen
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nVN relop based copy assertion prop in BB%02u:\n", compCurBB->bbNum);
+            printf("\nVN relop based copy assertion prop in " FMT_BB ":\n", compCurBB->bbNum);
             printf("Assertion index=#%02u: V%02d.%02d %s V%02d.%02d\n", index, op1->gtLclVar.gtLclNum,
                    op1->gtLclVar.gtSsaNum, (curAssertion->assertionKind == OAK_EQUAL) ? "==" : "!=",
                    op2->gtLclVar.gtLclNum, op2->gtLclVar.gtSsaNum);
@@ -3253,7 +3254,7 @@ GenTree* Compiler::optAssertionPropLocal_RelOp(ASSERT_VALARG_TP assertions, GenT
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nAssertion prop for index #%02u in BB%02u:\n", index, compCurBB->bbNum);
+        printf("\nAssertion prop for index #%02u in " FMT_BB ":\n", index, compCurBB->bbNum);
         gtDispTree(tree, nullptr, nullptr, true);
     }
 #endif
@@ -3326,7 +3327,7 @@ GenTree* Compiler::optAssertionProp_Cast(ASSERT_VALARG_TP assertions, GenTree* t
 #ifdef DEBUG
                     if (verbose)
                     {
-                        printf("\nSubrange prop for index #%02u in BB%02u:\n", index, compCurBB->bbNum);
+                        printf("\nSubrange prop for index #%02u in " FMT_BB ":\n", index, compCurBB->bbNum);
                         gtDispTree(tree, nullptr, nullptr, true);
                     }
 #endif
@@ -3363,7 +3364,7 @@ GenTree* Compiler::optAssertionProp_Cast(ASSERT_VALARG_TP assertions, GenTree* t
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nSubrange prop for index #%02u in BB%02u:\n", index, compCurBB->bbNum);
+            printf("\nSubrange prop for index #%02u in " FMT_BB ":\n", index, compCurBB->bbNum);
             gtDispTree(tree, nullptr, nullptr, true);
         }
 #endif
@@ -3432,8 +3433,8 @@ GenTree* Compiler::optAssertionProp_Ind(ASSERT_VALARG_TP assertions, GenTree* tr
 #ifdef DEBUG
         if (verbose)
         {
-            (vnBased) ? printf("\nVN based non-null prop in BB%02u:\n", compCurBB->bbNum)
-                      : printf("\nNon-null prop for index #%02u in BB%02u:\n", index, compCurBB->bbNum);
+            (vnBased) ? printf("\nVN based non-null prop in " FMT_BB ":\n", compCurBB->bbNum)
+                      : printf("\nNon-null prop for index #%02u in " FMT_BB ":\n", index, compCurBB->bbNum);
             gtDispTree(tree, nullptr, nullptr, true);
         }
 #endif
@@ -3569,8 +3570,8 @@ GenTree* Compiler::optNonNullAssertionProp_Call(ASSERT_VALARG_TP assertions, Gen
 #ifdef DEBUG
         if (verbose)
         {
-            (vnBased) ? printf("\nVN based non-null prop in BB%02u:\n", compCurBB->bbNum)
-                      : printf("\nNon-null prop for index #%02u in BB%02u:\n", index, compCurBB->bbNum);
+            (vnBased) ? printf("\nVN based non-null prop in " FMT_BB ":\n", compCurBB->bbNum)
+                      : printf("\nNon-null prop for index #%02u in " FMT_BB ":\n", index, compCurBB->bbNum);
             gtDispTree(call, nullptr, nullptr, true);
         }
 #endif
@@ -3626,7 +3627,7 @@ GenTree* Compiler::optAssertionProp_Call(ASSERT_VALARG_TP assertions, GenTreeCal
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("\nDid VN based subtype prop for index #%02u in BB%02u:\n", index, compCurBB->bbNum);
+                    printf("\nDid VN based subtype prop for index #%02u in " FMT_BB ":\n", index, compCurBB->bbNum);
                     gtDispTree(call, nullptr, nullptr, true);
                 }
 #endif
@@ -3666,7 +3667,7 @@ GenTree* Compiler::optAssertionProp_BndsChk(ASSERT_VALARG_TP assertions, GenTree
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nFlagging check redundant due to JitNoRangeChks in BB%02u:\n", compCurBB->bbNum);
+            printf("\nFlagging check redundant due to JitNoRangeChks in " FMT_BB ":\n", compCurBB->bbNum);
             gtDispTree(tree, nullptr, nullptr, true);
         }
 #endif // DEBUG
@@ -3764,7 +3765,7 @@ GenTree* Compiler::optAssertionProp_BndsChk(ASSERT_VALARG_TP assertions, GenTree
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nVN based redundant (%s) bounds check assertion prop for index #%02u in BB%02u:\n", dbgMsg,
+            printf("\nVN based redundant (%s) bounds check assertion prop for index #%02u in " FMT_BB ":\n", dbgMsg,
                    assertionIndex, compCurBB->bbNum);
             gtDispTree(tree, nullptr, nullptr, true);
         }
@@ -4335,7 +4336,7 @@ public:
     // At the start of the merge function of the dataflow equations, initialize premerge state (to detect change.)
     void StartMerge(BasicBlock* block)
     {
-        JITDUMP("AssertionPropCallback::StartMerge: BB%02d in -> %s\n", block->bbNum,
+        JITDUMP("AssertionPropCallback::StartMerge: " FMT_BB " in -> %s\n", block->bbNum,
                 BitVecOps::ToString(apTraits, block->bbAssertionIn));
         BitVecOps::Assign(apTraits, preMergeOut, block->bbAssertionOut);
         BitVecOps::Assign(apTraits, preMergeJumpDestOut, mJumpDestOut[block->bbNum]);
@@ -4347,8 +4348,8 @@ public:
         ASSERT_TP pAssertionOut = ((predBlock->bbJumpKind == BBJ_COND) && (predBlock->bbJumpDest == block))
                                       ? mJumpDestOut[predBlock->bbNum]
                                       : predBlock->bbAssertionOut;
-        JITDUMP("AssertionPropCallback::Merge     : BB%02d in -> %s, predBlock BB%02d out -> %s\n", block->bbNum,
-                BitVecOps::ToString(apTraits, block->bbAssertionIn), predBlock->bbNum,
+        JITDUMP("AssertionPropCallback::Merge     : " FMT_BB " in -> %s, predBlock " FMT_BB " out -> %s\n",
+                block->bbNum, BitVecOps::ToString(apTraits, block->bbAssertionIn), predBlock->bbNum,
                 BitVecOps::ToString(apTraits, predBlock->bbAssertionOut));
         BitVecOps::IntersectionD(apTraits, block->bbAssertionIn, pAssertionOut);
     }
@@ -4356,7 +4357,7 @@ public:
     // At the end of the merge store results of the dataflow equations, in a postmerge state.
     bool EndMerge(BasicBlock* block)
     {
-        JITDUMP("AssertionPropCallback::EndMerge  : BB%02d in -> %s\n\n", block->bbNum,
+        JITDUMP("AssertionPropCallback::EndMerge  : " FMT_BB " in -> %s\n\n", block->bbNum,
                 BitVecOps::ToString(apTraits, block->bbAssertionIn));
 
         BitVecOps::DataFlowD(apTraits, block->bbAssertionOut, block->bbAssertionGen, block->bbAssertionIn);
@@ -4367,7 +4368,7 @@ public:
 
         if (changed)
         {
-            JITDUMP("AssertionPropCallback::Changed   : BB%02d before out -> %s; after out -> %s;\n"
+            JITDUMP("AssertionPropCallback::Changed   : " FMT_BB " before out -> %s; after out -> %s;\n"
                     "\t\tjumpDest before out -> %s; jumpDest after out -> %s;\n\n",
                     block->bbNum, BitVecOps::ToString(apTraits, preMergeOut),
                     BitVecOps::ToString(apTraits, block->bbAssertionOut),
@@ -4376,8 +4377,8 @@ public:
         }
         else
         {
-            JITDUMP("AssertionPropCallback::Unchanged  : BB%02d out -> %s; \t\tjumpDest out -> %s\n\n", block->bbNum,
-                    BitVecOps::ToString(apTraits, block->bbAssertionOut),
+            JITDUMP("AssertionPropCallback::Unchanged  : " FMT_BB " out -> %s; \t\tjumpDest out -> %s\n\n",
+                    block->bbNum, BitVecOps::ToString(apTraits, block->bbAssertionOut),
                     BitVecOps::ToString(apTraits, mJumpDestOut[block->bbNum]));
         }
 
@@ -4471,10 +4472,10 @@ ASSERT_TP* Compiler::optComputeAssertionGen()
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nBB%02u valueGen = %s", block->bbNum, BitVecOps::ToString(apTraits, block->bbAssertionGen));
+            printf("\n" FMT_BB " valueGen = %s", block->bbNum, BitVecOps::ToString(apTraits, block->bbAssertionGen));
             if (block->bbJumpKind == BBJ_COND)
             {
-                printf(" => BB%02u valueGen = %s,", block->bbJumpDest->bbNum,
+                printf(" => " FMT_BB " valueGen = %s,", block->bbJumpDest->bbNum,
                        BitVecOps::ToString(apTraits, jumpDestGen[block->bbNum]));
             }
         }
@@ -5032,12 +5033,12 @@ void Compiler::optAssertionPropMain()
         printf("\n");
         for (BasicBlock* block = fgFirstBB; block; block = block->bbNext)
         {
-            printf("\nBB%02u", block->bbNum);
+            printf("\n" FMT_BB, block->bbNum);
             printf(" valueIn  = %s", BitVecOps::ToString(apTraits, block->bbAssertionIn));
             printf(" valueOut = %s", BitVecOps::ToString(apTraits, block->bbAssertionOut));
             if (block->bbJumpKind == BBJ_COND)
             {
-                printf(" => BB%02u", block->bbJumpDest->bbNum);
+                printf(" => " FMT_BB, block->bbJumpDest->bbNum);
                 printf(" valueOut= %s", BitVecOps::ToString(apTraits, bbJtrueAssertionOut[block->bbNum]));
             }
         }
@@ -5092,7 +5093,7 @@ void Compiler::optAssertionPropMain()
                     break;
                 }
 
-                JITDUMP("Propagating %s assertions for BB%02d, stmt [%06d], tree [%06d], tree -> %d\n",
+                JITDUMP("Propagating %s assertions for " FMT_BB ", stmt [%06d], tree [%06d], tree -> %d\n",
                         BitVecOps::ToString(apTraits, assertions), block->bbNum, dspTreeID(stmt), dspTreeID(tree),
                         tree->GetAssertionInfo().GetAssertionIndex());
 
index 00c70af..9598366 100644 (file)
@@ -393,7 +393,7 @@ unsigned BasicBlock::dspPreds()
             printf(",");
             count += 1;
         }
-        printf("BB%02u", pred->flBlock->bbNum);
+        printf(FMT_BB, pred->flBlock->bbNum);
         count += 4;
 
         // Account for %02u only handling 2 digits, but we can display more than that.
@@ -429,7 +429,7 @@ unsigned BasicBlock::dspCheapPreds()
             printf(",");
             count += 1;
         }
-        printf("BB%02u", pred->block->bbNum);
+        printf(FMT_BB, pred->block->bbNum);
         count += 4;
 
         // Account for %02u only handling 2 digits, but we can display more than that.
@@ -455,7 +455,7 @@ unsigned BasicBlock::dspSuccs(Compiler* compiler)
     for (unsigned i = 0; i < numSuccs; i++)
     {
         printf("%s", (count == 0) ? "" : ",");
-        printf("BB%02u", GetSucc(i, compiler)->bbNum);
+        printf(FMT_BB, GetSucc(i, compiler)->bbNum);
         count++;
     }
     return count;
@@ -477,7 +477,7 @@ void BasicBlock::dspJumpKind()
             break;
 
         case BBJ_EHCATCHRET:
-            printf(" -> BB%02u (cret)", bbJumpDest->bbNum);
+            printf(" -> " FMT_BB " (cret)", bbJumpDest->bbNum);
             break;
 
         case BBJ_THROW:
@@ -495,24 +495,24 @@ void BasicBlock::dspJumpKind()
         case BBJ_ALWAYS:
             if (bbFlags & BBF_KEEP_BBJ_ALWAYS)
             {
-                printf(" -> BB%02u (ALWAYS)", bbJumpDest->bbNum);
+                printf(" -> " FMT_BB " (ALWAYS)", bbJumpDest->bbNum);
             }
             else
             {
-                printf(" -> BB%02u (always)", bbJumpDest->bbNum);
+                printf(" -> " FMT_BB " (always)", bbJumpDest->bbNum);
             }
             break;
 
         case BBJ_LEAVE:
-            printf(" -> BB%02u (leave)", bbJumpDest->bbNum);
+            printf(" -> " FMT_BB " (leave)", bbJumpDest->bbNum);
             break;
 
         case BBJ_CALLFINALLY:
-            printf(" -> BB%02u (callf)", bbJumpDest->bbNum);
+            printf(" -> " FMT_BB " (callf)", bbJumpDest->bbNum);
             break;
 
         case BBJ_COND:
-            printf(" -> BB%02u (cond)", bbJumpDest->bbNum);
+            printf(" -> " FMT_BB " (cond)", bbJumpDest->bbNum);
             break;
 
         case BBJ_SWITCH:
@@ -524,7 +524,7 @@ void BasicBlock::dspJumpKind()
             jumpTab = bbJumpSwt->bbsDstTab;
             do
             {
-                printf("%cBB%02u", (jumpTab == bbJumpSwt->bbsDstTab) ? ' ' : ',', (*jumpTab)->bbNum);
+                printf("%c" FMT_BB, (jumpTab == bbJumpSwt->bbsDstTab) ? ' ' : ',', (*jumpTab)->bbNum);
             } while (++jumpTab, --jumpCnt);
 
             printf(" (switch)");
@@ -541,7 +541,7 @@ void BasicBlock::dspBlockHeader(Compiler* compiler,
                                 bool      showFlags /*= false*/,
                                 bool      showPreds /*= true*/)
 {
-    printf("BB%02u ", bbNum);
+    printf(FMT_BB " ", bbNum);
     dspBlockILRange();
     if (showKind)
     {
@@ -579,7 +579,7 @@ const char* BasicBlock::dspToString(int blockNumPadding /* = 2*/)
 
     auto& buffer    = buffers[nextBufferIndex];
     nextBufferIndex = (nextBufferIndex + 1) % _countof(buffers);
-    _snprintf_s(buffer, _countof(buffer), _countof(buffer), "BB%02u%*s [%04u]", bbNum, blockNumPadding, "", bbID);
+    _snprintf_s(buffer, _countof(buffer), _countof(buffer), FMT_BB "%*s [%04u]", bbNum, blockNumPadding, "", bbID);
     return buffer;
 }
 
index 5a86655..6d2fab4 100644 (file)
@@ -41,6 +41,10 @@ typedef BitVec          ASSERT_TP;
 typedef BitVec_ValArg_T ASSERT_VALARG_TP;
 typedef BitVec_ValRet_T ASSERT_VALRET_TP;
 
+// We use the following format when print the BasicBlock number: bbNum
+// This define is used with string concatenation to put this in printf format strings  (Note that %u means unsigned int)
+#define FMT_BB "BB%02u"
+
 /*****************************************************************************
  *
  *  Each basic block ends with a jump which is described as a value
index f45bbfe..7636e68 100644 (file)
@@ -587,7 +587,7 @@ void CodeGen::genJumpTable(GenTree* treeNode)
         BasicBlock* target = *jumpTable++;
         noway_assert(target->bbFlags & BBF_JMP_TARGET);
 
-        JITDUMP("            DD      L_M%03u_BB%02u\n", Compiler::s_compMethodsCount, target->bbNum);
+        JITDUMP("            DD      L_M%03u_" FMT_BB "\n", Compiler::s_compMethodsCount, target->bbNum);
 
         getEmitter()->emitDataGenData(i, target);
     }
index 30ab08f..5126889 100644 (file)
@@ -2637,7 +2637,7 @@ void CodeGen::genJumpTable(GenTree* treeNode)
         BasicBlock* target = *jumpTable++;
         noway_assert(target->bbFlags & BBF_JMP_TARGET);
 
-        JITDUMP("            DD      L_M%03u_BB%02u\n", Compiler::s_compMethodsCount, target->bbNum);
+        JITDUMP("            DD      L_M%03u_" FMT_BB "\n", Compiler::s_compMethodsCount, target->bbNum);
 
         getEmitter()->emitDataGenData(i, target);
     };
index 564fd1e..7f694c2 100644 (file)
@@ -1023,7 +1023,7 @@ void CodeGen::genDefineTempLabel(BasicBlock* label)
 #ifdef DEBUG
     if (compiler->opts.dspCode)
     {
-        printf("\n      L_M%03u_BB%02u:\n", Compiler::s_compMethodsCount, label->bbNum);
+        printf("\n      L_M%03u_" FMT_BB ":\n", Compiler::s_compMethodsCount, label->bbNum);
     }
 #endif
 
@@ -2144,7 +2144,7 @@ void CodeGen::genInsertNopForUnwinder(BasicBlock* block)
 #ifdef DEBUG
         if (compiler->verbose)
         {
-            printf("\nEmitting finally target NOP predecessor for BB%02u\n", block->bbNum);
+            printf("\nEmitting finally target NOP predecessor for " FMT_BB "\n", block->bbNum);
         }
 #endif
         // Create a label that we'll use for computing the start of an EH region, if this block is
@@ -7394,7 +7394,7 @@ void CodeGen::genReserveProlog(BasicBlock* block)
 {
     assert(block != nullptr);
 
-    JITDUMP("Reserving prolog IG for block BB%02u\n", block->bbNum);
+    JITDUMP("Reserving prolog IG for block " FMT_BB "\n", block->bbNum);
 
     /* Nothing is live on entry to the prolog */
 
@@ -7437,7 +7437,7 @@ void CodeGen::genReserveEpilog(BasicBlock* block)
         }
     }
 
-    JITDUMP("Reserving epilog IG for block BB%02u\n", block->bbNum);
+    JITDUMP("Reserving epilog IG for block " FMT_BB "\n", block->bbNum);
 
     assert(block != nullptr);
     const VARSET_TP& gcrefVarsArg(getEmitter()->emitThisGCrefVars);
@@ -7471,7 +7471,7 @@ void CodeGen::genReserveFuncletProlog(BasicBlock* block)
     noway_assert((gcInfo.gcRegGCrefSetCur & RBM_EXCEPTION_OBJECT) == gcInfo.gcRegGCrefSetCur);
     noway_assert(gcInfo.gcRegByrefSetCur == 0);
 
-    JITDUMP("Reserving funclet prolog IG for block BB%02u\n", block->bbNum);
+    JITDUMP("Reserving funclet prolog IG for block " FMT_BB "\n", block->bbNum);
 
     getEmitter()->emitCreatePlaceholderIG(IGPT_FUNCLET_PROLOG, block, gcInfo.gcVarPtrSetCur, gcInfo.gcRegGCrefSetCur,
                                           gcInfo.gcRegByrefSetCur, false);
@@ -7486,7 +7486,7 @@ void CodeGen::genReserveFuncletEpilog(BasicBlock* block)
 {
     assert(block != nullptr);
 
-    JITDUMP("Reserving funclet epilog IG for block BB%02u\n", block->bbNum);
+    JITDUMP("Reserving funclet epilog IG for block " FMT_BB "\n", block->bbNum);
 
     bool last = (block->bbNext == nullptr);
     getEmitter()->emitCreatePlaceholderIG(IGPT_FUNCLET_EPILOG, block, gcInfo.gcVarPtrSetCur, gcInfo.gcRegGCrefSetCur,
index 428b107..9f0f101 100644 (file)
@@ -270,7 +270,7 @@ void CodeGen::genCodeForBBlist()
 #ifdef DEBUG
         if (compiler->opts.dspCode)
         {
-            printf("\n      L_M%03u_BB%02u:\n", Compiler::s_compMethodsCount, block->bbNum);
+            printf("\n      L_M%03u_" FMT_BB ":\n", Compiler::s_compMethodsCount, block->bbNum);
         }
 #endif
 
@@ -426,7 +426,7 @@ void CodeGen::genCodeForBBlist()
 
         if (nonVarPtrRegs)
         {
-            printf("Regset after BB%02u gcr=", block->bbNum);
+            printf("Regset after " FMT_BB " gcr=", block->bbNum);
             printRegMaskInt(gcInfo.gcRegGCrefSetCur & ~regSet.rsMaskVars);
             compiler->getEmitter()->emitDispRegSet(gcInfo.gcRegGCrefSetCur & ~regSet.rsMaskVars);
             printf(", byr=");
index dae6f2e..30e4d12 100644 (file)
@@ -3503,7 +3503,7 @@ void CodeGen::genJumpTable(GenTree* treeNode)
         BasicBlock* target = *jumpTable++;
         noway_assert(target->bbFlags & BBF_JMP_TARGET);
 
-        JITDUMP("            DD      L_M%03u_BB%02u\n", Compiler::s_compMethodsCount, target->bbNum);
+        JITDUMP("            DD      L_M%03u_" FMT_BB "\n", Compiler::s_compMethodsCount, target->bbNum);
 
         getEmitter()->emitDataGenData(i, target);
     };
index 439c207..c607482 100644 (file)
@@ -8589,7 +8589,7 @@ void dBlockList(BasicBlockList* list)
     printf("WorkList: ");
     while (list != nullptr)
     {
-        printf("BB%02u ", list->block->bbNum);
+        printf(FMT_BB " ", list->block->bbNum);
         list = list->next;
     }
     printf("\n");
@@ -8766,19 +8766,19 @@ void cLoopIR(Compiler* comp, Compiler::LoopDsc* loop)
 
     printf("LOOP\n");
     printf("\n");
-    printf("HEAD   BB%02u\n", blockHead->bbNum);
-    printf("FIRST  BB%02u\n", blockFirst->bbNum);
-    printf("TOP    BB%02u\n", blockTop->bbNum);
-    printf("ENTRY  BB%02u\n", blockEntry->bbNum);
+    printf("HEAD   " FMT_BB "\n", blockHead->bbNum);
+    printf("FIRST  " FMT_BB "\n", blockFirst->bbNum);
+    printf("TOP    " FMT_BB "\n", blockTop->bbNum);
+    printf("ENTRY  " FMT_BB "\n", blockEntry->bbNum);
     if (loop->lpExitCnt == 1)
     {
-        printf("EXIT   BB%02u\n", blockExit->bbNum);
+        printf("EXIT   " FMT_BB "\n", blockExit->bbNum);
     }
     else
     {
         printf("EXITS  %u", loop->lpExitCnt);
     }
-    printf("BOTTOM BB%02u\n", blockBottom->bbNum);
+    printf("BOTTOM " FMT_BB "\n", blockBottom->bbNum);
     printf("\n");
 
     cBlockIR(comp, blockHead);
@@ -8857,7 +8857,7 @@ void cBlockIR(Compiler* comp, BasicBlock* block)
     }
     else
     {
-        printf("BB%02u:\n", block->bbNum);
+        printf(FMT_BB ":\n", block->bbNum);
     }
 
     printf("\n");
@@ -8921,7 +8921,7 @@ void cBlockIR(Compiler* comp, BasicBlock* block)
         case BBJ_EHCATCHRET:
             chars += printf("BRANCH(EHCATCHRETURN)");
             chars += dTabStopIR(chars, COLUMN_OPERANDS);
-            chars += printf(" BB%02u", block->bbJumpDest->bbNum);
+            chars += printf(" " FMT_BB, block->bbJumpDest->bbNum);
             break;
 
         case BBJ_THROW:
@@ -8940,7 +8940,7 @@ void cBlockIR(Compiler* comp, BasicBlock* block)
         case BBJ_ALWAYS:
             chars += printf("BRANCH(ALWAYS)");
             chars += dTabStopIR(chars, COLUMN_OPERANDS);
-            chars += printf(" BB%02u", block->bbJumpDest->bbNum);
+            chars += printf(" " FMT_BB, block->bbJumpDest->bbNum);
             if (block->bbFlags & BBF_KEEP_BBJ_ALWAYS)
             {
                 chars += dTabStopIR(chars, COLUMN_KINDS);
@@ -8951,19 +8951,19 @@ void cBlockIR(Compiler* comp, BasicBlock* block)
         case BBJ_LEAVE:
             chars += printf("BRANCH(LEAVE)");
             chars += dTabStopIR(chars, COLUMN_OPERANDS);
-            chars += printf(" BB%02u", block->bbJumpDest->bbNum);
+            chars += printf(" " FMT_BB, block->bbJumpDest->bbNum);
             break;
 
         case BBJ_CALLFINALLY:
             chars += printf("BRANCH(CALLFINALLY)");
             chars += dTabStopIR(chars, COLUMN_OPERANDS);
-            chars += printf(" BB%02u", block->bbJumpDest->bbNum);
+            chars += printf(" " FMT_BB, block->bbJumpDest->bbNum);
             break;
 
         case BBJ_COND:
             chars += printf("BRANCH(COND)");
             chars += dTabStopIR(chars, COLUMN_OPERANDS);
-            chars += printf(" BB%02u", block->bbJumpDest->bbNum);
+            chars += printf(" " FMT_BB, block->bbJumpDest->bbNum);
             break;
 
         case BBJ_SWITCH:
@@ -8976,7 +8976,7 @@ void cBlockIR(Compiler* comp, BasicBlock* block)
             jumpTab = block->bbJumpSwt->bbsDstTab;
             do
             {
-                chars += printf("%c BB%02u", (jumpTab == block->bbJumpSwt->bbsDstTab) ? ' ' : ',', (*jumpTab)->bbNum);
+                chars += printf("%c " FMT_BB, (jumpTab == block->bbJumpSwt->bbsDstTab) ? ' ' : ',', (*jumpTab)->bbNum);
             } while (++jumpTab, --jumpCnt);
             break;
 
@@ -10170,7 +10170,7 @@ int cLeafIR(Compiler* comp, GenTree* tree)
 
             if (tree->gtLabel.gtLabBB)
             {
-                chars += printf("BB%02u", tree->gtLabel.gtLabBB->bbNum);
+                chars += printf(FMT_BB, tree->gtLabel.gtLabBB->bbNum);
             }
             else
             {
index 98671c1..a83682d 100644 (file)
@@ -302,7 +302,7 @@ bool Compiler::optIsSsaLocal(GenTree* tree)
 void Compiler::optBlockCopyProp(BasicBlock* block, LclNumToGenTreePtrStack* curSsaName)
 {
 #ifdef DEBUG
-    JITDUMP("Copy Assertion for BB%02u\n", block->bbNum);
+    JITDUMP("Copy Assertion for " FMT_BB "\n", block->bbNum);
     if (verbose)
     {
         printf("  curSsaName stack: ");
index 325f85d..787dc84 100644 (file)
@@ -335,7 +335,7 @@ GenTree* Compiler::optEarlyPropRewriteTree(GenTree* tree)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("optEarlyProp Rewriting BB%02u\n", compCurBB->bbNum);
+            printf("optEarlyProp Rewriting " FMT_BB "\n", compCurBB->bbNum);
             gtDispTree(compCurStmt);
             printf("\n");
         }
index 96b8770..46726f4 100644 (file)
@@ -3638,7 +3638,7 @@ AGAIN:
 #ifdef DEBUG
                     if (EMITVERBOSE)
                     {
-                        printf("Adjusted offset of block %02u from %04X to %04X\n", lstIG->igNum, lstIG->igOffs,
+                        printf("Adjusted offset of " FMT_BB " from %04X to %04X\n", lstIG->igNum, lstIG->igOffs,
                                lstIG->igOffs - adjIG);
                     }
 #endif // DEBUG
@@ -3723,7 +3723,7 @@ AGAIN:
             {
                 printf("Binding: ");
                 emitDispIns(jmp, false, false, false);
-                printf("Binding L_M%03u_BB%02u ", Compiler::s_compMethodsCount, jmp->idAddr()->iiaBBlabel->bbNum);
+                printf("Binding L_M%03u_" FMT_BB, Compiler::s_compMethodsCount, jmp->idAddr()->iiaBBlabel->bbNum);
             }
 #endif // DEBUG
 
@@ -3738,7 +3738,7 @@ AGAIN:
                 }
                 else
                 {
-                    printf("-- ERROR, no emitter cookie for BB%02u; it is probably missing BBF_JMP_TARGET or "
+                    printf("-- ERROR, no emitter cookie for " FMT_BB "; it is probably missing BBF_JMP_TARGET or "
                            "BBF_HAS_LABEL.\n",
                            jmp->idAddr()->iiaBBlabel->bbNum);
                 }
@@ -4111,7 +4111,7 @@ AGAIN:
 #ifdef DEBUG
             if (EMITVERBOSE)
             {
-                printf("Adjusted offset of block %02u from %04X to %04X\n", lstIG->igNum, lstIG->igOffs,
+                printf("Adjusted offset of " FMT_BB " from %04X to %04X\n", lstIG->igNum, lstIG->igOffs,
                        lstIG->igOffs - adjIG);
             }
 #endif // DEBUG
@@ -5453,7 +5453,7 @@ void emitter::emitOutputDataSec(dataSecDsc* sec, BYTE* dst)
                     emitRecordRelocation(&(bDst[i]), target, IMAGE_REL_BASED_HIGHLOW);
                 }
 
-                JITDUMP("  BB%02u: 0x%p\n", block->bbNum, bDst[i]);
+                JITDUMP("  " FMT_BB ": 0x%p\n", block->bbNum, bDst[i]);
             }
         }
         // relative label table
@@ -5476,7 +5476,7 @@ void emitter::emitOutputDataSec(dataSecDsc* sec, BYTE* dst)
                 assert(FitsIn<uint32_t>(lab->igOffs - labFirst->igOffs));
                 uDst[i] = lab->igOffs - labFirst->igOffs;
 
-                JITDUMP("  BB%02u: 0x%x\n", block->bbNum, uDst[i]);
+                JITDUMP("  " FMT_BB ": 0x%x\n", block->bbNum, uDst[i]);
             }
         }
         else
index 8a6cde4..40bde10 100644 (file)
@@ -7332,7 +7332,7 @@ void emitter::emitDispInsHelp(
             if (id->idIsBound())
                 printf("G_M%03u_IG%02u", Compiler::s_compMethodsCount, id->idAddr()->iiaIGlabel->igNum);
             else
-                printf("L_M%03u_BB%02u", Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
+                printf("L_M%03u_" FMT_BB, Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
             break;
 
         case IF_T1_I: // Special Compare-and-branch
@@ -7377,7 +7377,7 @@ void emitter::emitDispInsHelp(
             else if (id->idIsBound())
                 printf("G_M%03u_IG%02u", Compiler::s_compMethodsCount, id->idAddr()->iiaIGlabel->igNum);
             else
-                printf("L_M%03u_BB%02u", Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
+                printf("L_M%03u_" FMT_BB, Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
         }
         break;
 
index f0955f5..851085a 100644 (file)
@@ -10864,7 +10864,7 @@ void emitter::emitDispIns(
             }
             else
             {
-                printf("L_M%03u_BB%02u", Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
+                printf("L_M%03u_" FMT_BB, Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
             }
         }
         break;
@@ -10902,7 +10902,7 @@ void emitter::emitDispIns(
             }
             else
             {
-                printf("L_M%03u_BB%02u", Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
+                printf("L_M%03u_" FMT_BB, Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
             }
             break;
 
@@ -10916,7 +10916,7 @@ void emitter::emitDispIns(
             }
             else
             {
-                printf("L_M%03u_BB%02u", Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
+                printf("L_M%03u_" FMT_BB, Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
             }
             break;
 
@@ -10976,7 +10976,7 @@ void emitter::emitDispIns(
                 }
                 else
                 {
-                    printf("L_M%03u_BB%02u", Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
+                    printf("L_M%03u_" FMT_BB, Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
                 }
             }
             printf("]");
index 0886007..f33e647 100644 (file)
@@ -9157,7 +9157,7 @@ void emitter::emitDispIns(
             }
             else
             {
-                printf("L_M%03u_BB%02u", Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
+                printf("L_M%03u_" FMT_BB, Compiler::s_compMethodsCount, id->idAddr()->iiaBBlabel->bbNum);
             }
             break;
 
index 0a9f2ce..3bf89ba 100644 (file)
@@ -473,7 +473,7 @@ void Compiler::fgEnsureFirstBBisScratch()
 #ifdef DEBUG
     if (verbose)
     {
-        printf("New scratch BB%02u\n", block->bbNum);
+        printf("New scratch " FMT_BB "\n", block->bbNum);
     }
 #endif
 }
@@ -1956,7 +1956,7 @@ void Compiler::fgComputeEnterBlocksSet()
         unsigned          bbNum = 0;
         while (iter.NextElem(&bbNum))
         {
-            printf("BB%02u ", bbNum);
+            printf(FMT_BB " ", bbNum);
         }
         printf("\n");
     }
@@ -2271,7 +2271,7 @@ void Compiler::fgDfsInvPostOrder()
         printf("\nAfter doing a post order traversal of the BB graph, this is the ordering:\n");
         for (unsigned i = 1; i <= fgBBNumMax; ++i)
         {
-            printf("%02u -> BB%02u\n", i, fgBBInvPostOrder[i]->bbNum);
+            printf("%02u -> " FMT_BB "\n", i, fgBBInvPostOrder[i]->bbNum);
         }
         printf("\n");
     }
@@ -2307,7 +2307,7 @@ BlockSet_ValRet_T Compiler::fgDomFindStartNodes()
         unsigned          bbNum = 0;
         while (iter.NextElem(&bbNum))
         {
-            printf("BB%02u ", bbNum);
+            printf(FMT_BB " ", bbNum);
         }
         printf("\n");
     }
@@ -2697,12 +2697,12 @@ void Compiler::fgBuildDomTree()
         printf("PreOrder:\n");
         for (i = 1; i <= fgBBNumMax; ++i)
         {
-            printf("BB%02u : %02u\n", i, fgDomTreePreOrder[i]);
+            printf(FMT_BB " : %02u\n", i, fgDomTreePreOrder[i]);
         }
         printf("PostOrder:\n");
         for (i = 1; i <= fgBBNumMax; ++i)
         {
-            printf("BB%02u : %02u\n", i, fgDomTreePostOrder[i]);
+            printf(FMT_BB " : %02u\n", i, fgDomTreePostOrder[i]);
         }
     }
 #endif // DEBUG
@@ -2734,11 +2734,11 @@ void Compiler::fgDispDomTree(BasicBlockList** domTree)
     {
         if (domTree[i] != nullptr)
         {
-            printf("BB%02u : ", i);
+            printf(FMT_BB " : ", i);
             for (BasicBlockList* current = domTree[i]; current != nullptr; current = current->next)
             {
                 assert(current->block);
-                printf("BB%02u ", current->block->bbNum);
+                printf(FMT_BB " ", current->block->bbNum);
             }
             printf("\n");
         }
@@ -3643,7 +3643,7 @@ void Compiler::fgCreateGCPolls()
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("Could not compute loop iterations for loop from BB%02u to BB%02u", head->bbNum,
+                    printf("Could not compute loop iterations for loop from " FMT_BB " to " FMT_BB, head->bbNum,
                            bottom->bbNum);
                 }
 #endif                      // DEBUG
@@ -3666,7 +3666,7 @@ void Compiler::fgCreateGCPolls()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("Removing poll in block BB%02u because it forms a bounded counted loop\n", bottom->bbNum);
+                printf("Removing poll in block " FMT_BB " because it forms a bounded counted loop\n", bottom->bbNum);
             }
 #endif // DEBUG
         }
@@ -3693,7 +3693,7 @@ void Compiler::fgCreateGCPolls()
 #ifdef DEBUG
                     if (verbose)
                     {
-                        printf("Removing poll in block BB%02u because it is not loop\n", block->bbNum);
+                        printf("Removing poll in block " FMT_BB " because it is not loop\n", block->bbNum);
                     }
 #endif // DEBUG
                     continue;
@@ -3705,7 +3705,7 @@ void Compiler::fgCreateGCPolls()
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("Removing poll in block BB%02u because it is not a jump\n", block->bbNum);
+                    printf("Removing poll in block " FMT_BB " because it is not a jump\n", block->bbNum);
                 }
 #endif // DEBUG
                 block->bbFlags &= ~BBF_NEEDS_GCPOLL;
@@ -3720,7 +3720,7 @@ void Compiler::fgCreateGCPolls()
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("Removing poll in return block BB%02u because it is GC Safe\n", block->bbNum);
+                    printf("Removing poll in return block " FMT_BB " because it is GC Safe\n", block->bbNum);
                 }
 #endif // DEBUG
                 block->bbFlags &= ~BBF_NEEDS_GCPOLL;
@@ -3737,7 +3737,8 @@ void Compiler::fgCreateGCPolls()
 #ifdef DEBUG
                     if (verbose)
                     {
-                        printf("Removing poll in return block BB%02u because it dominated by a call\n", block->bbNum);
+                        printf("Removing poll in return block " FMT_BB " because it dominated by a call\n",
+                               block->bbNum);
                     }
 #endif // DEBUG
                     continue;
@@ -3791,7 +3792,7 @@ void Compiler::fgCreateGCPolls()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("Selecting CALL poll in block BB%02u because of debug/minopts\n", block->bbNum);
+                printf("Selecting CALL poll in block " FMT_BB " because of debug/minopts\n", block->bbNum);
             }
 #endif // DEBUG
 
@@ -3803,7 +3804,7 @@ void Compiler::fgCreateGCPolls()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("Selecting CALL poll in block BB%02u because it is the single return block\n", block->bbNum);
+                printf("Selecting CALL poll in block " FMT_BB " because it is the single return block\n", block->bbNum);
             }
 #endif // DEBUG
 
@@ -3815,7 +3816,8 @@ void Compiler::fgCreateGCPolls()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("Selecting CALL poll in block BB%02u because it is a loop formed by a SWITCH\n", block->bbNum);
+                printf("Selecting CALL poll in block " FMT_BB " because it is a loop formed by a SWITCH\n",
+                       block->bbNum);
             }
 #endif // DEBUG
 
@@ -3907,7 +3909,7 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("*** creating GC Poll in block BB%02u\n", block->bbNum);
+            printf("*** creating GC Poll in block " FMT_BB "\n", block->bbNum);
             gtDispTreeList(block->bbTreeList);
         }
 #endif // DEBUG
@@ -4044,11 +4046,11 @@ bool Compiler::fgCreateGCPoll(GCPollType pollType, BasicBlock* block)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("*** creating inlined GC Poll in top block BB%02u\n", top->bbNum);
+            printf("*** creating inlined GC Poll in top block " FMT_BB "\n", top->bbNum);
             gtDispTreeList(top->bbTreeList);
-            printf(" poll block is BB%02u\n", poll->bbNum);
+            printf(" poll block is " FMT_BB "\n", poll->bbNum);
             gtDispTreeList(poll->bbTreeList);
-            printf(" bottom block is BB%02u\n", bottom->bbNum);
+            printf(" bottom block is " FMT_BB "\n", bottom->bbNum);
             gtDispTreeList(bottom->bbTreeList);
         }
 #endif // DEBUG
@@ -7601,7 +7603,7 @@ inline void Compiler::fgMarkLoopHead(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("fgMarkLoopHead: Checking loop head block BB%02u: ", block->bbNum);
+        printf("fgMarkLoopHead: Checking loop head block " FMT_BB ": ", block->bbNum);
     }
 #endif
 
@@ -8128,7 +8130,7 @@ void Compiler::fgConvertSyncReturnToLeave(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("Synchronized method - convert block BB%02u to BBJ_ALWAYS [targets BB%02u]\n", block->bbNum,
+        printf("Synchronized method - convert block " FMT_BB " to BBJ_ALWAYS [targets " FMT_BB "]\n", block->bbNum,
                block->bbJumpDest->bbNum);
     }
 #endif
@@ -8417,7 +8419,7 @@ private:
 #ifdef DEBUG
         if (comp->verbose)
         {
-            printf("\n newReturnBB [BB%02u] created\n", newReturnBB->bbNum);
+            printf("\n newReturnBB [" FMT_BB "] created\n", newReturnBB->bbNum);
         }
 #endif
 
@@ -9201,7 +9203,7 @@ BasicBlock* Compiler::fgSplitBlockAtEnd(BasicBlock* curr)
             BasicBlock* succ = curr->GetSucc(i, this);
             if (succ != newBlock)
             {
-                JITDUMP("BB%02u previous predecessor was BB%02u, now is BB%02u\n", succ->bbNum, curr->bbNum,
+                JITDUMP(FMT_BB " previous predecessor was " FMT_BB ", now is " FMT_BB "\n", succ->bbNum, curr->bbNum,
                         newBlock->bbNum);
                 fgReplacePred(succ, curr, newBlock);
             }
@@ -9428,7 +9430,8 @@ BasicBlock* Compiler::fgSplitEdge(BasicBlock* curr, BasicBlock* succ)
     }
     newBlock->bbFlags |= (curr->bbFlags & succ->bbFlags & (BBF_BACKWARD_JUMP));
 
-    JITDUMP("Splitting edge from BB%02u to BB%02u; adding BB%02u\n", curr->bbNum, succ->bbNum, newBlock->bbNum);
+    JITDUMP("Splitting edge from " FMT_BB " to " FMT_BB "; adding " FMT_BB "\n", curr->bbNum, succ->bbNum,
+            newBlock->bbNum);
 
     if (curr->bbJumpKind == BBJ_COND)
     {
@@ -9743,7 +9746,7 @@ void Compiler::fgRemoveEmptyBlocks()
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("BB%02u was not imported, marked as removed (%d)\n", cur->bbNum, removedBlks);
+                    printf(FMT_BB " was not imported, marked as removed (%d)\n", cur->bbNum, removedBlks);
                 }
 #endif // DEBUG
 
@@ -9789,7 +9792,7 @@ void Compiler::fgRemoveEmptyBlocks()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("Beginning of try block (BB%02u) not imported "
+                printf("Beginning of try block (" FMT_BB ") not imported "
                        "- remove index #%u from the EH table\n",
                        HBtab->ebdTryBeg->bbNum, XTnum + delCnt);
             }
@@ -9857,7 +9860,7 @@ void Compiler::fgRemoveStmt(BasicBlock* block, GenTree* node)
     {
         printf("\nRemoving statement ");
         printTreeID(stmt);
-        printf(" in BB%02u as useless:\n", block->bbNum);
+        printf(" in " FMT_BB " as useless:\n", block->bbNum);
         gtDispTree(stmt);
     }
 #endif // DEBUG
@@ -9908,7 +9911,7 @@ void Compiler::fgRemoveStmt(BasicBlock* block, GenTree* node)
     {
         if (block->bbTreeList == nullptr)
         {
-            printf("\nBB%02u becomes empty", block->bbNum);
+            printf("\n" FMT_BB " becomes empty", block->bbNum);
         }
         printf("\n");
     }
@@ -10087,7 +10090,7 @@ void Compiler::fgCompactBlocks(BasicBlock* block, BasicBlock* bNext)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nCompacting blocks BB%02u and BB%02u:\n", block->bbNum, bNext->bbNum);
+        printf("\nCompacting blocks " FMT_BB " and " FMT_BB ":\n", block->bbNum, bNext->bbNum);
     }
 #endif
 
@@ -10548,7 +10551,7 @@ void Compiler::fgUnreachableBlock(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nRemoving unreachable BB%02u\n", block->bbNum);
+        printf("\nRemoving unreachable " FMT_BB "\n", block->bbNum);
     }
 #endif // DEBUG
 
@@ -10626,7 +10629,8 @@ void Compiler::fgRemoveConditionalJump(BasicBlock* block)
     block->bbJumpDest = nullptr;
     if (verbose)
     {
-        printf("Block BB%02u becoming a BBJ_NONE to BB%02u (jump target is the same whether the condition is true or "
+        printf("Block " FMT_BB " becoming a BBJ_NONE to " FMT_BB
+               " (jump target is the same whether the condition is true or "
                "false)\n",
                block->bbNum, block->bbNext->bbNum);
     }
@@ -10780,7 +10784,7 @@ void Compiler::fgUnlinkBlock(BasicBlock* block)
             // We had created an initial scratch BB, but now we're deleting it.
             if (verbose)
             {
-                printf("Unlinking scratch BB%02u\n", block->bbNum);
+                printf("Unlinking scratch " FMT_BB "\n", block->bbNum);
             }
 #endif // DEBUG
             fgFirstBBScratch = nullptr;
@@ -10845,7 +10849,7 @@ void Compiler::fgRemoveBlock(BasicBlock* block, bool unreachable)
 
     PREFIX_ASSUME(block != nullptr);
 
-    JITDUMP("fgRemoveBlock BB%02u\n", block->bbNum);
+    JITDUMP("fgRemoveBlock " FMT_BB "\n", block->bbNum);
 
     // If we've cached any mappings from switch blocks to SwitchDesc's (which contain only the
     // *unique* successors of the switch block), invalidate that cache, since an entry in one of
@@ -10952,7 +10956,7 @@ void Compiler::fgRemoveBlock(BasicBlock* block, bool unreachable)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("Removing empty BB%02u\n", block->bbNum);
+            printf("Removing empty " FMT_BB "\n", block->bbNum);
         }
 #endif // DEBUG
 
@@ -11230,7 +11234,8 @@ BasicBlock* Compiler::fgConnectFallThrough(BasicBlock* bSrc, BasicBlock* bDst)
 #ifdef DEBUG
                     if (verbose)
                     {
-                        printf("Block BB%02u ended with a BBJ_NONE, Changed to an unconditional jump to BB%02u\n",
+                        printf("Block " FMT_BB " ended with a BBJ_NONE, Changed to an unconditional jump to " FMT_BB
+                               "\n",
                                bSrc->bbNum, bSrc->bbJumpDest->bbNum);
                     }
 #endif
@@ -11308,8 +11313,8 @@ BasicBlock* Compiler::fgConnectFallThrough(BasicBlock* bSrc, BasicBlock* bDst)
 #ifdef DEBUG
                     if (verbose)
                     {
-                        printf("Added an unconditional jump to BB%02u after block BB%02u\n", jmpBlk->bbJumpDest->bbNum,
-                               bSrc->bbNum);
+                        printf("Added an unconditional jump to " FMT_BB " after block " FMT_BB "\n",
+                               jmpBlk->bbJumpDest->bbNum, bSrc->bbNum);
                     }
 #endif // DEBUG
                     break;
@@ -11332,7 +11337,8 @@ BasicBlock* Compiler::fgConnectFallThrough(BasicBlock* bSrc, BasicBlock* bDst)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("Changed an unconditional jump from BB%02u to the next block BB%02u into a BBJ_NONE block\n",
+                    printf("Changed an unconditional jump from " FMT_BB " to the next block " FMT_BB
+                           " into a BBJ_NONE block\n",
                            bSrc->bbNum, bSrc->bbNext->bbNum);
                 }
 #endif // DEBUG
@@ -11386,7 +11392,7 @@ bool Compiler::fgRenumberBlocks()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("Renumber BB%02u to BB%02u\n", block->bbNum, num);
+                printf("Renumber " FMT_BB " to " FMT_BB "\n", block->bbNum, num);
             }
 #endif // DEBUG
             block->bbNum = num;
@@ -11594,7 +11600,7 @@ bool Compiler::fgExpandRarelyRunBlocks()
                         assert(reason != nullptr);
                         if (verbose)
                         {
-                            printf("%s, marking BB%02u as rarely run\n", reason, bPrev->bbNum);
+                            printf("%s, marking " FMT_BB " as rarely run\n", reason, bPrev->bbNum);
                         }
 #endif // DEBUG
 
@@ -11733,7 +11739,8 @@ bool Compiler::fgExpandRarelyRunBlocks()
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("All branches to BB%02u are from rarely run blocks, marking as rarely run\n", block->bbNum);
+                    printf("All branches to " FMT_BB " are from rarely run blocks, marking as rarely run\n",
+                           block->bbNum);
                 }
 #endif // DEBUG
 
@@ -11748,7 +11755,7 @@ bool Compiler::fgExpandRarelyRunBlocks()
 #ifdef DEBUG
                     if (verbose)
                     {
-                        printf("Also marking the BBJ_ALWAYS at BB%02u as rarely run\n", bNext->bbNum);
+                        printf("Also marking the BBJ_ALWAYS at " FMT_BB " as rarely run\n", bNext->bbNum);
                     }
 #endif // DEBUG
                 }
@@ -11783,7 +11790,8 @@ bool Compiler::fgExpandRarelyRunBlocks()
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("Marking the BBJ_CALLFINALLY block at BB%02u as rarely run because BB%02u is rarely run\n",
+                    printf("Marking the BBJ_CALLFINALLY block at " FMT_BB " as rarely run because " FMT_BB
+                           " is rarely run\n",
                            bPrev->bbNum, block->bbNum);
                 }
 #endif // DEBUG
@@ -11796,7 +11804,8 @@ bool Compiler::fgExpandRarelyRunBlocks()
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("Marking the BBJ_ALWAYS block at BB%02u as rarely run because BB%02u is rarely run\n",
+                    printf("Marking the BBJ_ALWAYS block at " FMT_BB " as rarely run because " FMT_BB
+                           " is rarely run\n",
                            block->bbNum, bPrev->bbNum);
                 }
 #endif // DEBUG
@@ -11840,7 +11849,7 @@ void Compiler::fgMoveBlocksAfter(BasicBlock* bStart, BasicBlock* bEnd, BasicBloc
 #ifdef DEBUG
     if (verbose)
     {
-        printf("Relocated block%s [BB%02u..BB%02u] inserted after BB%02u%s\n", (bStart == bEnd) ? "" : "s",
+        printf("Relocated block%s [" FMT_BB ".." FMT_BB "] inserted after " FMT_BB "%s\n", (bStart == bEnd) ? "" : "s",
                bStart->bbNum, bEnd->bbNum, insertAfterBlk->bbNum,
                (insertAfterBlk->bbNext == nullptr) ? " at the end of method" : "");
     }
@@ -11991,7 +12000,7 @@ BasicBlock* Compiler::fgRelocateEHRange(unsigned regionIndex, FG_RELOCATE_TYPE r
     bPrev = bStart->bbPrev;
     noway_assert(bPrev != nullptr); // Can't move a range that includes the first block of the function.
 
-    JITDUMP("Relocating %s range BB%02u..BB%02u (EH#%u) to end of BBlist\n",
+    JITDUMP("Relocating %s range " FMT_BB ".." FMT_BB " (EH#%u) to end of BBlist\n",
             (relocateType == FG_RELOCATE_TRY) ? "try" : "handler", bStart->bbNum, bLast->bbNum, regionIndex);
 
 #ifdef DEBUG
@@ -12216,8 +12225,8 @@ FAILURE:
 #ifdef DEBUG
     if (verbose)
     {
-        printf("*************** Failed fgRelocateEHRange(BB%02u..BB%02u) because %s\n", bStart->bbNum, bLast->bbNum,
-               reason);
+        printf("*************** Failed fgRelocateEHRange(" FMT_BB ".." FMT_BB ") because %s\n", bStart->bbNum,
+               bLast->bbNum, reason);
     }
 #endif // DEBUG
 
@@ -12424,7 +12433,7 @@ void Compiler::fgInsertFuncletPrologBlock(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nCreating funclet prolog header for BB%02u\n", block->bbNum);
+        printf("\nCreating funclet prolog header for " FMT_BB "\n", block->bbNum);
     }
 #endif
 
@@ -12924,13 +12933,13 @@ void Compiler::fgPrintEdgeWeights()
     {
         if (bDst->bbPreds != nullptr)
         {
-            printf("    Edge weights into BB%02u :", bDst->bbNum);
+            printf("    Edge weights into " FMT_BB " :", bDst->bbNum);
             for (edge = bDst->bbPreds; edge != nullptr; edge = edge->flNext)
             {
                 bSrc = edge->flBlock;
                 // This is the control flow edge (bSrc -> bDst)
 
-                printf("BB%02u ", bSrc->bbNum);
+                printf(FMT_BB " ", bSrc->bbNum);
 
                 if (edge->flEdgeWeightMin < BB_MAX_WEIGHT)
                 {
@@ -13602,8 +13611,8 @@ bool Compiler::fgOptimizeBranchToEmptyUnconditional(BasicBlock* block, BasicBloc
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nOptimizing a jump to an unconditional jump (BB%02u -> BB%02u -> BB%02u)\n", block->bbNum,
-                   bDest->bbNum, bDest->bbJumpDest->bbNum);
+            printf("\nOptimizing a jump to an unconditional jump (" FMT_BB " -> " FMT_BB " -> " FMT_BB ")\n",
+                   block->bbNum, bDest->bbNum, bDest->bbJumpDest->bbNum);
         }
 #endif // DEBUG
 
@@ -13840,7 +13849,8 @@ bool Compiler::fgOptimizeEmptyBlock(BasicBlock* block)
 #ifdef DEBUG
                         if (verbose)
                         {
-                            printf("\nKeeping empty block BB%02u - it is the target of a catch return\n", block->bbNum);
+                            printf("\nKeeping empty block " FMT_BB " - it is the target of a catch return\n",
+                                   block->bbNum);
                         }
 #endif // DEBUG
 
@@ -13957,8 +13967,9 @@ bool Compiler::fgOptimizeSwitchBranches(BasicBlock* block)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("\nOptimizing a switch jump to an empty block with an unconditional jump (BB%02u -> BB%02u "
-                           "-> BB%02u)\n",
+                    printf("\nOptimizing a switch jump to an empty block with an unconditional jump (" FMT_BB
+                           " -> " FMT_BB " "
+                           "-> " FMT_BB ")\n",
                            block->bbNum, bDest->bbNum, bNewDest->bbNum);
                 }
 #endif // DEBUG
@@ -14041,7 +14052,7 @@ bool Compiler::fgOptimizeSwitchBranches(BasicBlock* block)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nRemoving a switch jump with a single target (BB%02u)\n", block->bbNum);
+            printf("\nRemoving a switch jump with a single target (" FMT_BB ")\n", block->bbNum);
             printf("BEFORE:\n");
         }
 #endif // DEBUG
@@ -14154,7 +14165,7 @@ bool Compiler::fgOptimizeSwitchBranches(BasicBlock* block)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nConverting a switch (BB%02u) with only one significant clause besides a default target to a "
+            printf("\nConverting a switch (" FMT_BB ") with only one significant clause besides a default target to a "
                    "conditional branch\n",
                    block->bbNum);
         }
@@ -14365,7 +14376,8 @@ bool Compiler::fgOptimizeUncondBranchToSimpleCond(BasicBlock* block, BasicBlock*
 #ifdef DEBUG
     if (verbose)
     {
-        printf("fgOptimizeUncondBranchToSimpleCond(from BB%02u to cond BB%02u), created new uncond BB%02u\n",
+        printf("fgOptimizeUncondBranchToSimpleCond(from " FMT_BB " to cond " FMT_BB "), created new uncond " FMT_BB
+               "\n",
                block->bbNum, target->bbNum, next->bbNum);
     }
 #endif // DEBUG
@@ -14413,7 +14425,8 @@ bool Compiler::fgOptimizeBranchToNext(BasicBlock* block, BasicBlock* bNext, Basi
 #ifdef DEBUG
                     if (verbose)
                     {
-                        printf("\nRemoving unconditional jump to next block (BB%02u -> BB%02u) (converted BB%02u to "
+                        printf("\nRemoving unconditional jump to next block (" FMT_BB " -> " FMT_BB
+                               ") (converted " FMT_BB " to "
                                "fall-through)\n",
                                block->bbNum, bNext->bbNum, block->bbNum);
                     }
@@ -14432,7 +14445,8 @@ bool Compiler::fgOptimizeBranchToNext(BasicBlock* block, BasicBlock* bNext, Basi
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nRemoving conditional jump to next block (BB%02u -> BB%02u)\n", block->bbNum, bNext->bbNum);
+            printf("\nRemoving conditional jump to next block (" FMT_BB " -> " FMT_BB ")\n", block->bbNum,
+                   bNext->bbNum);
         }
 #endif // DEBUG
 
@@ -14698,7 +14712,8 @@ bool Compiler::fgOptimizeBranch(BasicBlock* bJump)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nDuplication of the conditional block BB%02u (always branch from BB%02u) %s, because the cost of "
+        printf("\nDuplication of the conditional block " FMT_BB " (always branch from " FMT_BB
+               ") %s, because the cost of "
                "duplication (%i) is %s than %i,"
                " validProfileWeights = %s\n",
                bDest->bbNum, bJump->bbNum, costIsTooHigh ? "not done" : "performed", estDupCostSz,
@@ -14876,12 +14891,12 @@ bool Compiler::fgOptimizeBranch(BasicBlock* bJump)
     if (verbose)
     {
         // Dump out the newStmtList that we created
-        printf("\nfgOptimizeBranch added these statements(s) at the end of BB%02u:\n", bJump->bbNum);
+        printf("\nfgOptimizeBranch added these statements(s) at the end of " FMT_BB ":\n", bJump->bbNum);
         for (stmt = newStmtList->AsStmt(); stmt; stmt = stmt->gtNextStmt)
         {
             gtDispTree(stmt);
         }
-        printf("\nfgOptimizeBranch changed block BB%02u from BBJ_ALWAYS to BBJ_COND.\n", bJump->bbNum);
+        printf("\nfgOptimizeBranch changed block " FMT_BB " from BBJ_ALWAYS to BBJ_COND.\n", bJump->bbNum);
 
         printf("\nAfter this change in fgOptimizeBranch the BB graph is:");
         fgDispBasicBlocks(verboseTrees);
@@ -15631,18 +15646,18 @@ void Compiler::fgReorderBlocks()
             {
                 if (bPrev->bbJumpKind == BBJ_COND)
                 {
-                    printf("Decided to reverse conditional branch at block BB%02u branch to BB%02u ", bPrev->bbNum,
-                           bDest->bbNum);
+                    printf("Decided to reverse conditional branch at block " FMT_BB " branch to " FMT_BB " ",
+                           bPrev->bbNum, bDest->bbNum);
                 }
                 else if (bPrev->bbJumpKind == BBJ_ALWAYS)
                 {
-                    printf("Decided to straighten unconditional branch at block BB%02u branch to BB%02u ", bPrev->bbNum,
-                           bDest->bbNum);
+                    printf("Decided to straighten unconditional branch at block " FMT_BB " branch to " FMT_BB " ",
+                           bPrev->bbNum, bDest->bbNum);
                 }
                 else
                 {
-                    printf("Decided to place hot code after BB%02u, placed BB%02u after this block ", bPrev->bbNum,
-                           bDest->bbNum);
+                    printf("Decided to place hot code after " FMT_BB ", placed " FMT_BB " after this block ",
+                           bPrev->bbNum, bDest->bbNum);
                 }
 
                 if (profHotWeight > 0)
@@ -15663,7 +15678,7 @@ void Compiler::fgReorderBlocks()
             }
             else
             {
-                printf("Decided to relocate block(s) after block BB%02u since they are %s block(s)\n", bPrev->bbNum,
+                printf("Decided to relocate block(s) after block " FMT_BB " since they are %s block(s)\n", bPrev->bbNum,
                        block->isRunRarely() ? "rarely run" : "uncommonly run");
             }
         }
@@ -15921,11 +15936,12 @@ void Compiler::fgReorderBlocks()
                     {
                         if (bStart != bEnd)
                         {
-                            printf("Could not relocate blocks (BB%02u .. BB%02u)\n", bStart->bbNum, bEnd->bbNum);
+                            printf("Could not relocate blocks (" FMT_BB " .. " FMT_BB ")\n", bStart->bbNum,
+                                   bEnd->bbNum);
                         }
                         else
                         {
-                            printf("Could not relocate block BB%02u\n", bStart->bbNum);
+                            printf("Could not relocate block " FMT_BB "\n", bStart->bbNum);
                         }
                     }
 #endif // DEBUG
@@ -15963,16 +15979,16 @@ void Compiler::fgReorderBlocks()
             printf("Relocated %s ", msg);
             if (bStart != bEnd)
             {
-                printf("blocks (BB%02u .. BB%02u)", bStart->bbNum, bEnd->bbNum);
+                printf("blocks (" FMT_BB " .. " FMT_BB ")", bStart->bbNum, bEnd->bbNum);
             }
             else
             {
-                printf("block BB%02u", bStart->bbNum);
+                printf("block " FMT_BB, bStart->bbNum);
             }
 
             if (bPrev->bbJumpKind == BBJ_COND)
             {
-                printf(" by reversing conditional jump at BB%02u\n", bPrev->bbNum);
+                printf(" by reversing conditional jump at " FMT_BB "\n", bPrev->bbNum);
             }
             else
             {
@@ -16321,7 +16337,7 @@ EXIT:;
     {
         if (firstColdBlock)
         {
-            printf("fgFirstColdBlock is BB%02u.\n", firstColdBlock->bbNum);
+            printf("fgFirstColdBlock is " FMT_BB ".\n", firstColdBlock->bbNum);
         }
         else
         {
@@ -16522,8 +16538,8 @@ bool Compiler::fgUpdateFlowGraph(bool doTailDuplication)
 #ifdef DEBUG
                         if (verbose)
                         {
-                            printf("\nReversing a conditional jump around an unconditional jump (BB%02u -> BB%02u -> "
-                                   "BB%02u)\n",
+                            printf("\nReversing a conditional jump around an unconditional jump (" FMT_BB " -> " FMT_BB
+                                   " -> " FMT_BB ")\n",
                                    block->bbNum, bDest->bbNum, bNext->bbJumpDest->bbNum);
                         }
 #endif // DEBUG
@@ -16954,7 +16970,7 @@ void Compiler::fgExtendEHRegionBefore(BasicBlock* block)
 #ifdef DEBUG
             if (verbose)
             {
-                printf("EH#%u: New first block of try: BB%02u\n", ehGetIndex(HBtab), bPrev->bbNum);
+                printf("EH#%u: New first block of try: " FMT_BB "\n", ehGetIndex(HBtab), bPrev->bbNum);
             }
 #endif // DEBUG
             HBtab->ebdTryBeg = bPrev;
@@ -16972,7 +16988,7 @@ void Compiler::fgExtendEHRegionBefore(BasicBlock* block)
 #ifdef DEBUG
             if (verbose)
             {
-                printf("EH#%u: New first block of handler: BB%02u\n", ehGetIndex(HBtab), bPrev->bbNum);
+                printf("EH#%u: New first block of handler: " FMT_BB "\n", ehGetIndex(HBtab), bPrev->bbNum);
             }
 #endif // DEBUG
 
@@ -17007,8 +17023,8 @@ void Compiler::fgExtendEHRegionBefore(BasicBlock* block)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("EH#%u: Updating bbJumpDest for filter ret block: BB%02u => BB%02u\n", ehGetIndex(HBtab),
-                           bFilterLast->bbNum, bPrev->bbNum);
+                    printf("EH#%u: Updating bbJumpDest for filter ret block: " FMT_BB " => " FMT_BB "\n",
+                           ehGetIndex(HBtab), bFilterLast->bbNum, bPrev->bbNum);
                 }
 #endif // DEBUG
                 // Change the bbJumpDest for bFilterLast from the old first 'block' to the new first 'bPrev'
@@ -17021,7 +17037,7 @@ void Compiler::fgExtendEHRegionBefore(BasicBlock* block)
 #ifdef DEBUG
             if (verbose)
             {
-                printf("EH#%u: New first block of filter: BB%02u\n", ehGetIndex(HBtab), bPrev->bbNum);
+                printf("EH#%u: New first block of filter: " FMT_BB "\n", ehGetIndex(HBtab), bPrev->bbNum);
             }
 #endif // DEBUG
 
@@ -17475,8 +17491,9 @@ BasicBlock* Compiler::fgFindInsertPoint(unsigned    regionIndex,
     }
 #endif // DEBUG
 
-    JITDUMP("fgFindInsertPoint(regionIndex=%u, putInTryRegion=%s, startBlk=BB%02u, endBlk=BB%02u, nearBlk=BB%02u, "
-            "jumpBlk=BB%02u, runRarely=%s)\n",
+    JITDUMP("fgFindInsertPoint(regionIndex=%u, putInTryRegion=%s, startBlk=" FMT_BB ", endBlk=" FMT_BB
+            ", nearBlk=" FMT_BB ", "
+            "jumpBlk=" FMT_BB ", runRarely=%s)\n",
             regionIndex, dspBool(putInTryRegion), startBlk->bbNum, (endBlk == nullptr) ? 0 : endBlk->bbNum,
             (nearBlk == nullptr) ? 0 : nearBlk->bbNum, (jumpBlk == nullptr) ? 0 : jumpBlk->bbNum, dspBool(runRarely));
 
@@ -17875,7 +17892,7 @@ _FoundAfterBlk:;
     noway_assert(afterBlk != nullptr);
 
     JITDUMP("fgNewBBinRegion(jumpKind=%u, tryIndex=%u, hndIndex=%u, putInFilter=%s, runRarely=%s, insertAtEnd=%s): "
-            "inserting after BB%02u\n",
+            "inserting after " FMT_BB "\n",
             jumpKind, tryIndex, hndIndex, dspBool(putInFilter), dspBool(runRarely), dspBool(insertAtEnd),
             afterBlk->bbNum);
 
@@ -18372,7 +18389,7 @@ BasicBlock* Compiler::fgRngChkTarget(BasicBlock* block, unsigned stkDepth, Speci
 #ifdef DEBUG
     if (verbose)
     {
-        printf("*** Computing fgRngChkTarget for block BB%02u to stkDepth %d\n", block->bbNum, stkDepth);
+        printf("*** Computing fgRngChkTarget for block " FMT_BB " to stkDepth %d\n", block->bbNum, stkDepth);
         if (!block->IsLIR())
         {
             gtDispTree(compCurStmt);
@@ -19693,15 +19710,15 @@ bool Compiler::fgDumpFlowGraph(Phases phase)
                 case BBJ_COND:
                 case BBJ_NONE:
                     assert(block->bbNext != nullptr);
-                    fprintf(fgxFile, "    BB%02u -> BB%02u\n", block->bbNum, block->bbNext->bbNum);
+                    fprintf(fgxFile, "    " FMT_BB " -> " FMT_BB "\n", block->bbNum, block->bbNext->bbNum);
                     break;
                 default:
                     // These may or may not have an edge to the next block.
                     // Add a transparent edge to keep nodes ordered.
                     if (block->bbNext != nullptr)
                     {
-                        fprintf(fgxFile, "    BB%02u -> BB%02u [arrowtail=none,color=transparent]\n", block->bbNum,
-                                block->bbNext->bbNum);
+                        fprintf(fgxFile, "    " FMT_BB " -> " FMT_BB " [arrowtail=none,color=transparent]\n",
+                                block->bbNum, block->bbNext->bbNum);
                     }
             }
         }
@@ -19785,7 +19802,7 @@ bool Compiler::fgDumpFlowGraph(Phases phase)
                 {
                     continue;
                 }
-                fprintf(fgxFile, "    BB%02u -> BB%02u", bSource->bbNum, bTarget->bbNum);
+                fprintf(fgxFile, "    " FMT_BB " -> " FMT_BB, bSource->bbNum, bTarget->bbNum);
                 if ((bSource->bbNum > bTarget->bbNum))
                 {
                     fprintf(fgxFile, "[arrowhead=normal,arrowtail=none,color=green]\n");
@@ -19884,12 +19901,12 @@ void Compiler::fgDispReach()
 
     for (BasicBlock* block = fgFirstBB; block != nullptr; block = block->bbNext)
     {
-        printf("BB%02u : ", block->bbNum);
+        printf(FMT_BB " : ", block->bbNum);
         BlockSetOps::Iter iter(this, block->bbReach);
         unsigned          bbNum = 0;
         while (iter.NextElem(&bbNum))
         {
-            printf("BB%02u ", bbNum);
+            printf(FMT_BB " ", bbNum);
         }
         printf("\n");
     }
@@ -19910,10 +19927,10 @@ void Compiler::fgDispDoms()
     for (unsigned i = 1; i <= fgBBNumMax; ++i)
     {
         BasicBlock* current = fgBBInvPostOrder[i];
-        printf("BB%02u:  ", current->bbNum);
+        printf(FMT_BB ":  ", current->bbNum);
         while (current != current->bbIDom)
         {
-            printf("BB%02u ", current->bbNum);
+            printf(FMT_BB " ", current->bbNum);
             current = current->bbIDom;
         }
         printf("\n");
@@ -20055,30 +20072,30 @@ void Compiler::fgTableDispBasicBlock(BasicBlock* block, int ibcColWidth /* = 0 *
         switch (block->bbJumpKind)
         {
             case BBJ_COND:
-                printf("-> BB%02u%*s ( cond )", block->bbJumpDest->bbNum,
+                printf("-> " FMT_BB "%*s ( cond )", block->bbJumpDest->bbNum,
                        maxBlockNumWidth - max(CountDigits(block->bbJumpDest->bbNum), 2), "");
                 break;
 
             case BBJ_CALLFINALLY:
-                printf("-> BB%02u%*s (callf )", block->bbJumpDest->bbNum,
+                printf("-> " FMT_BB "%*s (callf )", block->bbJumpDest->bbNum,
                        maxBlockNumWidth - max(CountDigits(block->bbJumpDest->bbNum), 2), "");
                 break;
 
             case BBJ_ALWAYS:
                 if (flags & BBF_KEEP_BBJ_ALWAYS)
                 {
-                    printf("-> BB%02u%*s (ALWAYS)", block->bbJumpDest->bbNum,
+                    printf("-> " FMT_BB "%*s (ALWAYS)", block->bbJumpDest->bbNum,
                            maxBlockNumWidth - max(CountDigits(block->bbJumpDest->bbNum), 2), "");
                 }
                 else
                 {
-                    printf("-> BB%02u%*s (always)", block->bbJumpDest->bbNum,
+                    printf("-> " FMT_BB "%*s (always)", block->bbJumpDest->bbNum,
                            maxBlockNumWidth - max(CountDigits(block->bbJumpDest->bbNum), 2), "");
                 }
                 break;
 
             case BBJ_LEAVE:
-                printf("-> BB%02u%*s (leave )", block->bbJumpDest->bbNum,
+                printf("-> " FMT_BB "%*s (leave )", block->bbJumpDest->bbNum,
                        maxBlockNumWidth - max(CountDigits(block->bbJumpDest->bbNum), 2), "");
                 break;
 
@@ -20091,7 +20108,7 @@ void Compiler::fgTableDispBasicBlock(BasicBlock* block, int ibcColWidth /* = 0 *
                 break;
 
             case BBJ_EHCATCHRET:
-                printf("-> BB%02u%*s ( cret )", block->bbJumpDest->bbNum,
+                printf("-> " FMT_BB "%*s ( cret )", block->bbJumpDest->bbNum,
                        maxBlockNumWidth - max(CountDigits(block->bbJumpDest->bbNum), 2), "");
                 break;
 
@@ -20118,7 +20135,7 @@ void Compiler::fgTableDispBasicBlock(BasicBlock* block, int ibcColWidth /* = 0 *
                 switchWidth = 0;
                 do
                 {
-                    printf("%cBB%02u", (jumpTab == block->bbJumpSwt->bbsDstTab) ? ' ' : ',', (*jumpTab)->bbNum);
+                    printf("%c" FMT_BB, (jumpTab == block->bbJumpSwt->bbsDstTab) ? ' ' : ',', (*jumpTab)->bbNum);
                     switchWidth += 1 /* space/comma */ + 2 /* BB */ + max(CountDigits((*jumpTab)->bbNum), 2);
                 } while (++jumpTab, --jumpCnt);
 
@@ -20380,7 +20397,7 @@ void Compiler::fgDumpStmtTree(GenTree* stmt, unsigned bbNum)
 {
     compCurStmtNum++; // Increment the current stmtNum
 
-    printf("\n***** BB%02u, stmt %d\n", bbNum, compCurStmtNum);
+    printf("\n***** " FMT_BB ", stmt %d\n", bbNum, compCurStmtNum);
 
     if (fgOrder == FGOrderLinear || opts.compDbgInfo)
     {
@@ -20604,7 +20621,7 @@ bool BBPredsChecker::CheckEhTryDsc(BasicBlock* block, BasicBlock* blockPred, EHb
         return true;
     }
 
-    printf("Jump into the middle of try region: BB%02u branches to BB%02u\n", blockPred->bbNum, block->bbNum);
+    printf("Jump into the middle of try region: " FMT_BB " branches to " FMT_BB "\n", blockPred->bbNum, block->bbNum);
     assert(!"Jump into middle of try region");
     return false;
 }
@@ -20636,7 +20653,8 @@ bool BBPredsChecker::CheckEhHndDsc(BasicBlock* block, BasicBlock* blockPred, EHb
         return true;
     }
 
-    printf("Jump into the middle of handler region: BB%02u branches to BB%02u\n", blockPred->bbNum, block->bbNum);
+    printf("Jump into the middle of handler region: " FMT_BB " branches to " FMT_BB "\n", blockPred->bbNum,
+           block->bbNum);
     assert(!"Jump into the middle of handler region");
     return false;
 }
@@ -22875,7 +22893,7 @@ void Compiler::fgInsertInlineeBlocks(InlineInfo* pInlineInfo)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("\nConvert bbJumpKind of BB%02u to BBJ_ALWAYS to bottomBlock BB%02u\n", block->bbNum,
+                    printf("\nConvert bbJumpKind of " FMT_BB " to BBJ_ALWAYS to bottomBlock " FMT_BB "\n", block->bbNum,
                            bottomBlock->bbNum);
                 }
 #endif // DEBUG
@@ -22885,7 +22903,7 @@ void Compiler::fgInsertInlineeBlocks(InlineInfo* pInlineInfo)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("\nConvert bbJumpKind of BB%02u to BBJ_NONE\n", block->bbNum);
+                    printf("\nConvert bbJumpKind of " FMT_BB " to BBJ_NONE\n", block->bbNum);
                 }
 #endif // DEBUG
                 block->bbJumpKind = BBJ_NONE;
@@ -23734,9 +23752,10 @@ void Compiler::fgRemoveEmptyFinally()
                 BasicBlock* const leaveBlock          = currentBlock->bbNext;
                 BasicBlock* const postTryFinallyBlock = leaveBlock->bbJumpDest;
 
-                JITDUMP("Modifying callfinally BB%02u leave BB%02u finally BB%02u continuation BB%02u\n",
+                JITDUMP("Modifying callfinally " FMT_BB " leave " FMT_BB " finally " FMT_BB " continuation " FMT_BB
+                        "\n",
                         currentBlock->bbNum, leaveBlock->bbNum, firstBlock->bbNum, postTryFinallyBlock->bbNum);
-                JITDUMP("so that BB%02u jumps to BB%02u; then remove BB%02u\n", currentBlock->bbNum,
+                JITDUMP("so that " FMT_BB " jumps to " FMT_BB "; then remove " FMT_BB "\n", currentBlock->bbNum,
                         postTryFinallyBlock->bbNum, leaveBlock->bbNum);
 
                 noway_assert(leaveBlock->bbJumpKind == BBJ_ALWAYS);
@@ -23766,7 +23785,7 @@ void Compiler::fgRemoveEmptyFinally()
             currentBlock = nextBlock;
         }
 
-        JITDUMP("Remove now-unreachable handler BB%02u\n", firstBlock->bbNum);
+        JITDUMP("Remove now-unreachable handler " FMT_BB "\n", firstBlock->bbNum);
 
         // Handler block should now be unreferenced, since the only
         // explicit references to it were in call finallys.
@@ -23948,7 +23967,7 @@ void Compiler::fgRemoveEmptyTry()
         // or branch to same.
         if (!firstTryBlock->isEmpty())
         {
-            JITDUMP("EH#%u first try block BB%02u not empty; skipping.\n", XTnum, firstTryBlock->bbNum);
+            JITDUMP("EH#%u first try block " FMT_BB " not empty; skipping.\n", XTnum, firstTryBlock->bbNum);
             XTnum++;
             continue;
         }
@@ -23959,7 +23978,8 @@ void Compiler::fgRemoveEmptyTry()
         // pair that targets the finally
         if (firstTryBlock->bbJumpKind != BBJ_ALWAYS)
         {
-            JITDUMP("EH#%u first try block BB%02u not jump to a callfinally; skipping.\n", XTnum, firstTryBlock->bbNum);
+            JITDUMP("EH#%u first try block " FMT_BB " not jump to a callfinally; skipping.\n", XTnum,
+                    firstTryBlock->bbNum);
             XTnum++;
             continue;
         }
@@ -23971,7 +23991,7 @@ void Compiler::fgRemoveEmptyTry()
         // return.
         if (!callFinally->isBBCallAlwaysPair() || (callFinally->bbJumpDest != firstHandlerBlock))
         {
-            JITDUMP("EH#%u first try block BB%02u always jumps but not to a callfinally; skipping.\n", XTnum,
+            JITDUMP("EH#%u first try block " FMT_BB " always jumps but not to a callfinally; skipping.\n", XTnum,
                     firstTryBlock->bbNum);
             XTnum++;
             continue;
@@ -23980,7 +24000,7 @@ void Compiler::fgRemoveEmptyTry()
         // Try itself must be a single block.
         if (firstTryBlock != lastTryBlock)
         {
-            JITDUMP("EH#%u first try block BB%02u not only block in try; skipping.\n", XTnum,
+            JITDUMP("EH#%u first try block " FMT_BB " not only block in try; skipping.\n", XTnum,
                     firstTryBlock->bbNext->bbNum);
             XTnum++;
             continue;
@@ -23992,7 +24012,7 @@ void Compiler::fgRemoveEmptyTry()
         // finally doesn't return.
         if (!firstTryBlock->isBBCallAlwaysPair() || (firstTryBlock->bbJumpDest != firstHandlerBlock))
         {
-            JITDUMP("EH#%u first try block BB%02u not a callfinally; skipping.\n", XTnum, firstTryBlock->bbNum);
+            JITDUMP("EH#%u first try block " FMT_BB " not a callfinally; skipping.\n", XTnum, firstTryBlock->bbNum);
             XTnum++;
             continue;
         }
@@ -24002,7 +24022,7 @@ void Compiler::fgRemoveEmptyTry()
         // Try must be a callalways pair of blocks.
         if (firstTryBlock->bbNext != lastTryBlock)
         {
-            JITDUMP("EH#%u block BB%02u not last block in try; skipping.\n", XTnum, firstTryBlock->bbNext->bbNum);
+            JITDUMP("EH#%u block " FMT_BB " not last block in try; skipping.\n", XTnum, firstTryBlock->bbNext->bbNum);
             XTnum++;
             continue;
         }
@@ -24026,7 +24046,7 @@ void Compiler::fgRemoveEmptyTry()
 
                 if (block != callFinally)
                 {
-                    JITDUMP("EH#%u found unexpected callfinally BB%02u; skipping.\n");
+                    JITDUMP("EH#%u found unexpected callfinally " FMT_BB "; skipping.\n");
                     verifiedSingleCallfinally = false;
                     break;
                 }
@@ -24457,12 +24477,12 @@ void Compiler::fgCloneFinally()
             // through from the try into the clone.
             tryToRelocateCallFinally = true;
 
-            JITDUMP("Chose path to clone: try block BB%02u jumps to callfinally at BB%02u;"
-                    " the call returns to BB%02u which jumps to BB%02u\n",
+            JITDUMP("Chose path to clone: try block " FMT_BB " jumps to callfinally at " FMT_BB ";"
+                    " the call returns to " FMT_BB " which jumps to " FMT_BB "\n",
                     block->bbNum, jumpDest->bbNum, finallyReturnBlock->bbNum, postTryFinallyBlock->bbNum);
 #else
-            JITDUMP("Chose path to clone: try block BB%02u is a callfinally;"
-                    " the call returns to BB%02u which jumps to BB%02u\n",
+            JITDUMP("Chose path to clone: try block " FMT_BB " is a callfinally;"
+                    " the call returns to " FMT_BB " which jumps to " FMT_BB "\n",
                     block->bbNum, finallyReturnBlock->bbNum, postTryFinallyBlock->bbNum);
 #endif // FEATURE_EH_CALLFINALLY_THUNKS
 
@@ -24476,8 +24496,8 @@ void Compiler::fgCloneFinally()
             continue;
         }
 
-        JITDUMP("Will update callfinally block BB%02u to jump to the clone;"
-                " clone will jump to BB%02u\n",
+        JITDUMP("Will update callfinally block " FMT_BB " to jump to the clone;"
+                " clone will jump to " FMT_BB "\n",
                 normalCallFinallyBlock->bbNum, normalCallFinallyReturn->bbNum);
 
         // If there are multiple callfinallys and we're in the
@@ -24519,7 +24539,7 @@ void Compiler::fgCloneFinally()
                 if ((placeToMoveAfter->bbJumpKind == BBJ_ALWAYS) &&
                     (placeToMoveAfter->bbJumpDest == normalCallFinallyBlock))
                 {
-                    JITDUMP("Moving callfinally BB%02u to be first in line, before BB%02u\n",
+                    JITDUMP("Moving callfinally " FMT_BB " to be first in line, before " FMT_BB "\n",
                             normalCallFinallyBlock->bbNum, firstCallFinallyBlock->bbNum);
 
                     BasicBlock* const firstToMove = normalCallFinallyBlock;
@@ -24543,8 +24563,8 @@ void Compiler::fgCloneFinally()
                 }
                 else
                 {
-                    JITDUMP("Can't move callfinally BB%02u to be first in line"
-                            " -- last finally block BB%02u doesn't jump to it\n",
+                    JITDUMP("Can't move callfinally " FMT_BB " to be first in line"
+                            " -- last finally block " FMT_BB " doesn't jump to it\n",
                             normalCallFinallyBlock->bbNum, placeToMoveAfter->bbNum);
                 }
             }
@@ -24643,7 +24663,7 @@ void Compiler::fgCloneFinally()
         // We should have cloned all the finally region blocks.
         assert(cloneBBCount == regionBBCount);
 
-        JITDUMP("Cloned finally blocks are: BB%2u ... BB%2u\n", blockMap[firstBlock]->bbNum,
+        JITDUMP("Cloned finally blocks are: " FMT_BB " ... " FMT_BB "\n", blockMap[firstBlock]->bbNum,
                 blockMap[lastBlock]->bbNum);
 
         // Redirect redirect any branches within the newly-cloned
@@ -24719,7 +24739,7 @@ void Compiler::fgCloneFinally()
                     {
                         // We can't retarget this call since it
                         // returns somewhere else.
-                        JITDUMP("Can't retarget callfinally in BB%02u as it jumps to BB%02u, not BB%02u\n",
+                        JITDUMP("Can't retarget callfinally in " FMT_BB " as it jumps to " FMT_BB ", not " FMT_BB "\n",
                                 currentBlock->bbNum, postTryFinallyBlock->bbNum, normalCallFinallyReturn->bbNum);
 
                         retargetedAllCalls = false;
@@ -24956,8 +24976,8 @@ void Compiler::fgDebugCheckTryFinallyExits()
 
                 if (!thisExitValid)
                 {
-                    JITDUMP("fgCheckTryFinallyExitS: EH#%u exit via BB%02u -> BB%02u is invalid\n", XTnum, block->bbNum,
-                            succBlock->bbNum);
+                    JITDUMP("fgCheckTryFinallyExitS: EH#%u exit via " FMT_BB " -> " FMT_BB " is invalid\n", XTnum,
+                            block->bbNum, succBlock->bbNum);
                 }
 
                 allTryExitsValid = allTryExitsValid & thisExitValid;
@@ -25083,7 +25103,7 @@ void Compiler::fgAddFinallyTargetFlags()
 
             if ((continuation->bbFlags & BBF_FINALLY_TARGET) == 0)
             {
-                JITDUMP("Found callfinally BB%02u; setting finally target bit on BB%02u\n", block->bbNum,
+                JITDUMP("Found callfinally " FMT_BB "; setting finally target bit on " FMT_BB "\n", block->bbNum,
                         continuation->bbNum);
 
                 continuation->bbFlags |= BBF_FINALLY_TARGET;
@@ -25362,12 +25382,12 @@ bool Compiler::fgRetargetBranchesToCanonicalCallFinally(BasicBlock*      block,
     // If the block already jumps to the canoncial call finally, no work needed.
     if (block->bbJumpDest == canonicalCallFinally)
     {
-        JITDUMP("BB%02u already canonical\n", block->bbNum);
+        JITDUMP(FMT_BB " already canonical\n", block->bbNum);
         return false;
     }
 
     // Else, retarget it so that it does...
-    JITDUMP("Redirecting branch in BB%02u from BB%02u to BB%02u.\n", block->bbNum, callFinally->bbNum,
+    JITDUMP("Redirecting branch in " FMT_BB " from " FMT_BB " to " FMT_BB ".\n", block->bbNum, callFinally->bbNum,
             canonicalCallFinally->bbNum);
 
     block->bbJumpDest = canonicalCallFinally;
index 9421a9c..975cb4d 100644 (file)
@@ -10705,7 +10705,7 @@ void Compiler::gtDispLeaf(GenTree* tree, IndentStack* indentStack)
         case GT_LABEL:
             if (tree->gtLabel.gtLabBB)
             {
-                printf(" dst=BB%02u", tree->gtLabel.gtLabBB->bbNum);
+                printf(" dst=" FMT_BB, tree->gtLabel.gtLabBB->bbNum);
             }
             else
             {
index fa72bb1..5d00c70 100644 (file)
@@ -7205,7 +7205,8 @@ var_types Compiler::impImportCall(OPCODE                  opcode,
 #ifdef DEBUG
             if (verbose)
             {
-                JITDUMP("\nFound recursive call in the method. Mark BB%02u to BB%02u as having a backward branch.\n",
+                JITDUMP("\nFound recursive call in the method. Mark " FMT_BB " to " FMT_BB
+                        " as having a backward branch.\n",
                         fgFirstBB->bbNum, compCurBB->bbNum);
             }
 #endif
@@ -8870,7 +8871,7 @@ void Compiler::impImportLeave(BasicBlock* block)
 #ifdef DEBUG
             if (verbose)
             {
-                printf("impImportLeave - BB%02u jumping out of catch handler EH#%u, adding call to "
+                printf("impImportLeave - " FMT_BB " jumping out of catch handler EH#%u, adding call to "
                        "CORINFO_HELP_ENDCATCH\n",
                        block->bbNum, XTnum);
             }
@@ -9072,7 +9073,8 @@ void Compiler::impImportLeave(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nBefore import CEE_LEAVE in BB%02u (targetting BB%02u):\n", block->bbNum, block->bbJumpDest->bbNum);
+        printf("\nBefore import CEE_LEAVE in " FMT_BB " (targetting " FMT_BB "):\n", block->bbNum,
+               block->bbJumpDest->bbNum);
         fgDispBasicBlocks();
         fgDispHandlerTab();
     }
@@ -9144,7 +9146,8 @@ void Compiler::impImportLeave(BasicBlock* block)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("impImportLeave - jumping out of a catch (EH#%u), convert block BB%02u to BBJ_EHCATCHRET "
+                    printf("impImportLeave - jumping out of a catch (EH#%u), convert block " FMT_BB
+                           " to BBJ_EHCATCHRET "
                            "block\n",
                            XTnum, step->bbNum);
                 }
@@ -9185,8 +9188,8 @@ void Compiler::impImportLeave(BasicBlock* block)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("impImportLeave - jumping out of a catch (EH#%u), new BBJ_EHCATCHRET block BB%02u\n", XTnum,
-                           exitBlock->bbNum);
+                    printf("impImportLeave - jumping out of a catch (EH#%u), new BBJ_EHCATCHRET block " FMT_BB "\n",
+                           XTnum, exitBlock->bbNum);
                 }
 #endif
             }
@@ -9224,8 +9227,9 @@ void Compiler::impImportLeave(BasicBlock* block)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("impImportLeave - jumping out of a finally-protected try (EH#%u), convert block BB%02u to "
-                           "BBJ_ALWAYS, add BBJ_CALLFINALLY block BB%02u\n",
+                    printf("impImportLeave - jumping out of a finally-protected try (EH#%u), convert block " FMT_BB
+                           " to "
+                           "BBJ_ALWAYS, add BBJ_CALLFINALLY block " FMT_BB "\n",
                            XTnum, block->bbNum, callBlock->bbNum);
                 }
 #endif
@@ -9238,7 +9242,8 @@ void Compiler::impImportLeave(BasicBlock* block)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("impImportLeave - jumping out of a finally-protected try (EH#%u), convert block BB%02u to "
+                    printf("impImportLeave - jumping out of a finally-protected try (EH#%u), convert block " FMT_BB
+                           " to "
                            "BBJ_CALLFINALLY block\n",
                            XTnum, callBlock->bbNum);
                 }
@@ -9281,7 +9286,7 @@ void Compiler::impImportLeave(BasicBlock* block)
                     if (verbose)
                     {
                         printf("impImportLeave - jumping out of a finally-protected try (EH#%u), step block is "
-                               "BBJ_EHCATCHRET (BB%02u), new BBJ_ALWAYS step-step block BB%02u\n",
+                               "BBJ_EHCATCHRET (" FMT_BB "), new BBJ_ALWAYS step-step block " FMT_BB "\n",
                                XTnum, step->bbNum, step2->bbNum);
                     }
 #endif
@@ -9322,8 +9327,8 @@ void Compiler::impImportLeave(BasicBlock* block)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("impImportLeave - jumping out of a finally-protected try (EH#%u), new BBJ_CALLFINALLY block "
-                           "BB%02u\n",
+                    printf("impImportLeave - jumping out of a finally-protected try (EH#%u), new BBJ_CALLFINALLY "
+                           "block " FMT_BB "\n",
                            XTnum, callBlock->bbNum);
                 }
 #endif
@@ -9340,7 +9345,7 @@ void Compiler::impImportLeave(BasicBlock* block)
             if (verbose)
             {
                 printf("impImportLeave - jumping out of a finally-protected try (EH#%u), created step (BBJ_ALWAYS) "
-                       "block BB%02u\n",
+                       "block " FMT_BB "\n",
                        XTnum, step->bbNum);
             }
 #endif
@@ -9429,14 +9434,14 @@ void Compiler::impImportLeave(BasicBlock* block)
                     if (stepType == ST_FinallyReturn)
                     {
                         printf("impImportLeave - return from finally jumping out of a catch-protected try (EH#%u), new "
-                               "BBJ_ALWAYS block BB%02u\n",
+                               "BBJ_ALWAYS block " FMT_BB "\n",
                                XTnum, catchStep->bbNum);
                     }
                     else
                     {
                         assert(stepType == ST_Catch);
                         printf("impImportLeave - return from catch jumping out of a catch-protected try (EH#%u), new "
-                               "BBJ_ALWAYS block BB%02u\n",
+                               "BBJ_ALWAYS block " FMT_BB "\n",
                                XTnum, catchStep->bbNum);
                     }
                 }
@@ -9459,7 +9464,7 @@ void Compiler::impImportLeave(BasicBlock* block)
         if (verbose)
         {
             printf("impImportLeave - no enclosing finally-protected try blocks or catch handlers; convert CEE_LEAVE "
-                   "block BB%02u to BBJ_ALWAYS\n",
+                   "block " FMT_BB " to BBJ_ALWAYS\n",
                    block->bbNum);
         }
 #endif
@@ -9480,7 +9485,7 @@ void Compiler::impImportLeave(BasicBlock* block)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("impImportLeave - final destination of step blocks set to BB%02u\n", leaveTarget->bbNum);
+            printf("impImportLeave - final destination of step blocks set to " FMT_BB "\n", leaveTarget->bbNum);
         }
 #endif
 
@@ -9563,7 +9568,7 @@ void Compiler::impResetLeaveBlock(BasicBlock* block, unsigned jmpAddr)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("New Basic Block BB%02u duplicate of BB%02u created.\n", dupBlock->bbNum, block->bbNum);
+            printf("New Basic Block " FMT_BB " duplicate of " FMT_BB " created.\n", dupBlock->bbNum, block->bbNum);
         }
 #endif
     }
@@ -10134,7 +10139,7 @@ void Compiler::impImportBlockCode(BasicBlock* block)
 
     if (verbose)
     {
-        printf("\nImporting BB%02u (PC=%03u) of '%s'", block->bbNum, block->bbCodeOffs, info.compFullName);
+        printf("\nImporting " FMT_BB " (PC=%03u) of '%s'", block->bbNum, block->bbCodeOffs, info.compFullName);
     }
 #endif
 
@@ -11976,12 +11981,12 @@ void Compiler::impImportBlockCode(BasicBlock* block)
                     {
                         if (op1->gtIntCon.gtIconVal)
                         {
-                            printf("\nThe conditional jump becomes an unconditional jump to BB%02u\n",
+                            printf("\nThe conditional jump becomes an unconditional jump to " FMT_BB "\n",
                                    block->bbJumpDest->bbNum);
                         }
                         else
                         {
-                            printf("\nThe block falls through into the next BB%02u\n", block->bbNext->bbNum);
+                            printf("\nThe block falls through into the next " FMT_BB "\n", block->bbNext->bbNum);
                         }
                     }
 #endif
@@ -16224,7 +16229,7 @@ inline void Compiler::impReimportMarkBlock(BasicBlock* block)
 #ifdef DEBUG
     if (verbose && (block->bbFlags & BBF_IMPORTED))
     {
-        printf("\nBB%02u will be reimported\n", block->bbNum);
+        printf("\n" FMT_BB " will be reimported\n", block->bbNum);
     }
 #endif
 
@@ -16413,7 +16418,7 @@ void Compiler::impImportBlock(BasicBlock* block)
     // to mark them as imported and put their successors on the pending import list.
     if (block->bbFlags & BBF_INTERNAL)
     {
-        JITDUMP("Marking BBF_INTERNAL block BB%02u as BBF_IMPORTED\n", block->bbNum);
+        JITDUMP("Marking BBF_INTERNAL block " FMT_BB " as BBF_IMPORTED\n", block->bbNum);
         block->bbFlags |= BBF_IMPORTED;
 
         const unsigned numSuccs = block->NumSucc();
@@ -16867,7 +16872,7 @@ void Compiler::impImportBlockPending(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nimpImportBlockPending for BB%02u\n", block->bbNum);
+        printf("\nimpImportBlockPending for " FMT_BB "\n", block->bbNum);
     }
 #endif
 
@@ -16924,7 +16929,7 @@ void Compiler::impImportBlockPending(BasicBlock* block)
             {
                 addToPending = true;
 
-                JITDUMP("Adding BB%02u to pending set due to new merge result\n", block->bbNum);
+                JITDUMP("Adding " FMT_BB " to pending set due to new merge result\n", block->bbNum);
             }
         }
 
@@ -16987,7 +16992,7 @@ void Compiler::impImportBlockPending(BasicBlock* block)
 #ifdef DEBUG
     if (verbose && 0)
     {
-        printf("Added PendingDsc - %08p for BB%02u\n", dspPtr(dsc), block->bbNum);
+        printf("Added PendingDsc - %08p for " FMT_BB "\n", dspPtr(dsc), block->bbNum);
     }
 #endif
 }
@@ -17000,7 +17005,7 @@ void Compiler::impImportBlockPending(BasicBlock* block)
 
 void Compiler::impReimportBlockPending(BasicBlock* block)
 {
-    JITDUMP("\nimpReimportBlockPending for BB%02u", block->bbNum);
+    JITDUMP("\nimpReimportBlockPending for " FMT_BB, block->bbNum);
 
     assert(block->bbFlags & BBF_IMPORTED);
 
@@ -17054,7 +17059,7 @@ void Compiler::impReimportBlockPending(BasicBlock* block)
 #ifdef DEBUG
     if (verbose && 0)
     {
-        printf("Added PendingDsc - %08p for BB%02u\n", dspPtr(dsc), block->bbNum);
+        printf("Added PendingDsc - %08p for " FMT_BB "\n", dspPtr(dsc), block->bbNum);
     }
 #endif
 }
@@ -17242,7 +17247,7 @@ unsigned Compiler::impGetSpillTmpBase(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\n*************** In impGetSpillTmpBase(BB%02u)\n", block->bbNum);
+        printf("\n*************** In impGetSpillTmpBase(" FMT_BB ")\n", block->bbNum);
     }
 #endif // DEBUG
 
@@ -17263,7 +17268,7 @@ void Compiler::impReimportSpillClique(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\n*************** In impReimportSpillClique(BB%02u)\n", block->bbNum);
+        printf("\n*************** In impReimportSpillClique(" FMT_BB ")\n", block->bbNum);
     }
 #endif // DEBUG
 
@@ -17519,7 +17524,7 @@ void Compiler::impImport(BasicBlock* method)
     {
         // Treat these as imported.
         assert(method->bbJumpKind == BBJ_NONE); // We assume all the leading ones are fallthrough.
-        JITDUMP("Marking leading BBF_INTERNAL block BB%02u as BBF_IMPORTED\n", method->bbNum);
+        JITDUMP("Marking leading BBF_INTERNAL block " FMT_BB " as BBF_IMPORTED\n", method->bbNum);
         method->bbFlags |= BBF_IMPORTED;
     }
 
index 67abd87..bf47698 100644 (file)
@@ -270,7 +270,7 @@ void EHblkDsc::DispEntry(unsigned XTnum)
     ////////////// Protected (try) region
     //////////////
 
-    printf("- Try at BB%02u..BB%02u", ebdTryBeg->bbNum, ebdTryLast->bbNum);
+    printf("- Try at " FMT_BB ".." FMT_BB, ebdTryBeg->bbNum, ebdTryLast->bbNum);
 
     /* ( brace matching editor workaround to compensate for the following line */
     printf(" [%03X..%03X), ", ebdTryBegOffset, ebdTryEndOffset);
@@ -282,8 +282,8 @@ void EHblkDsc::DispEntry(unsigned XTnum)
     if (HasFilter())
     {
         /* ( brace matching editor workaround to compensate for the following line */
-        printf("Filter at BB%02u..BB%02u [%03X..%03X), ", ebdFilter->bbNum, BBFilterLast()->bbNum, ebdFilterBegOffset,
-               ebdHndBegOffset);
+        printf("Filter at " FMT_BB ".." FMT_BB " [%03X..%03X), ", ebdFilter->bbNum, BBFilterLast()->bbNum,
+               ebdFilterBegOffset, ebdHndBegOffset);
     }
 
     //////////////
@@ -303,7 +303,7 @@ void EHblkDsc::DispEntry(unsigned XTnum)
         printf("Handler");
     }
 
-    printf(" at BB%02u..BB%02u", ebdHndBeg->bbNum, ebdHndLast->bbNum);
+    printf(" at " FMT_BB ".." FMT_BB, ebdHndBeg->bbNum, ebdHndLast->bbNum);
 
     /* ( brace matching editor workaround to compensate for the following line */
     printf(" [%03X..%03X)", ebdHndBegOffset, ebdHndEndOffset);
@@ -1232,7 +1232,7 @@ void Compiler::fgSetTryEnd(EHblkDsc* handlerTab, BasicBlock* newTryLast)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("EH#%u: New last block of try: BB%02u\n", ehGetIndex(handlerTab), newTryLast->bbNum);
+            printf("EH#%u: New last block of try: " FMT_BB "\n", ehGetIndex(handlerTab), newTryLast->bbNum);
         }
 #endif // DEBUG
     }
@@ -1258,7 +1258,7 @@ void Compiler::fgSetHndEnd(EHblkDsc* handlerTab, BasicBlock* newHndLast)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("EH#%u: New last block of handler: BB%02u\n", ehGetIndex(handlerTab), newHndLast->bbNum);
+            printf("EH#%u: New last block of handler: " FMT_BB "\n", ehGetIndex(handlerTab), newHndLast->bbNum);
         }
 #endif // DEBUG
     }
@@ -2175,8 +2175,9 @@ bool Compiler::fgNormalizeEHCase1()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("Handler begin for EH#%02u and 'try' begin for EH%02u are the same block; inserted new BB%02u "
-                       "before BB%02u as new handler begin for EH#%u.\n",
+                printf("Handler begin for EH#%02u and 'try' begin for EH%02u are the same block; inserted new " FMT_BB
+                       " "
+                       "before " FMT_BB " as new handler begin for EH#%u.\n",
                        XTnum, ehGetIndex(handlerStartContainingTry), newHndStart->bbNum, eh->ebdHndBeg->bbNum, XTnum);
             }
 #endif // DEBUG
@@ -2341,7 +2342,8 @@ bool Compiler::fgNormalizeEHCase2()
 #ifdef DEBUG
                         if (verbose)
                         {
-                            printf("'try' begin for EH#%u and EH#%u are same block; inserted new BB%02u before BB%02u "
+                            printf("'try' begin for EH#%u and EH#%u are same block; inserted new " FMT_BB
+                                   " before " FMT_BB " "
                                    "as new 'try' begin for EH#%u.\n",
                                    ehOuterTryIndex, XTnum, newTryStart->bbNum, insertBeforeBlk->bbNum, ehOuterTryIndex);
                         }
@@ -2428,8 +2430,8 @@ bool Compiler::fgNormalizeEHCase2()
 #ifdef DEBUG
                                 if (verbose)
                                 {
-                                    printf("Redirect BB%02u target from BB%02u to BB%02u.\n", predBlock->bbNum,
-                                           insertBeforeBlk->bbNum, newTryStart->bbNum);
+                                    printf("Redirect " FMT_BB " target from " FMT_BB " to " FMT_BB ".\n",
+                                           predBlock->bbNum, insertBeforeBlk->bbNum, newTryStart->bbNum);
                                 }
 #endif // DEBUG
                             }
@@ -2720,10 +2722,11 @@ bool Compiler::fgNormalizeEHCase3()
 #ifdef DEBUG
                     if (verbose)
                     {
-                        printf("last %s block for EH#%u and last %s block for EH#%u are same block; inserted new "
-                               "BB%02u after BB%02u as new last %s block for EH#%u.\n",
-                               outerType, ehOuterIndex, innerType, ehInnerIndex, newLast->bbNum, insertAfterBlk->bbNum,
-                               outerType, ehOuterIndex);
+                        printf(
+                            "last %s block for EH#%u and last %s block for EH#%u are same block; inserted new " FMT_BB
+                            " after " FMT_BB " as new last %s block for EH#%u.\n",
+                            outerType, ehOuterIndex, innerType, ehInnerIndex, newLast->bbNum, insertAfterBlk->bbNum,
+                            outerType, ehOuterIndex);
                     }
 #endif // DEBUG
 
@@ -3126,7 +3129,7 @@ void Compiler::fgVerifyHandlerTab()
         {
             if (blockNumMap[i] != 0)
             {
-                printf("BB%02u => BB%02u\n", i, blockNumMap[i]);
+                printf(FMT_BB " => " FMT_BB "\n", i, blockNumMap[i]);
             }
         }
     }
index c540b75..9a638e5 100644 (file)
@@ -3728,7 +3728,7 @@ void Compiler::lvaMarkLocalVars(BasicBlock* block, bool isRecompute)
         }
     };
 
-    JITDUMP("\n*** %s local variables in block BB%02u (weight=%s)\n", isRecompute ? "recomputing" : "marking",
+    JITDUMP("\n*** %s local variables in block " FMT_BB " (weight=%s)\n", isRecompute ? "recomputing" : "marking",
             block->bbNum, refCntWtd2str(block->getBBWeight(this)));
 
     for (GenTreeStmt* stmt = block->FirstNonPhiDef(); stmt != nullptr; stmt = stmt->getNextStmt())
index c749152..8965898 100644 (file)
@@ -522,7 +522,7 @@ void Compiler::fgPerBlockLocalVarLiveness()
         if (verbose)
         {
             VARSET_TP allVars(VarSetOps::Union(this, fgCurUseSet, fgCurDefSet));
-            printf("BB%02u", block->bbNum);
+            printf(FMT_BB, block->bbNum);
             printf(" USE(%d)=", VarSetOps::Count(this, fgCurUseSet));
             lvaDispVarSet(fgCurUseSet, allVars);
             for (MemoryKind memoryKind : allMemoryKinds())
@@ -604,7 +604,7 @@ void Compiler::fgMarkInScope(BasicBlock* block, VARSET_VALARG_TP inScope)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("Scope info: block BB%02u marking in scope: ", block->bbNum);
+        printf("Scope info: block " FMT_BB " marking in scope: ", block->bbNum);
         dumpConvertedVarSet(this, inScope);
         printf("\n");
     }
@@ -630,7 +630,7 @@ void Compiler::fgUnmarkInScope(BasicBlock* block, VARSET_VALARG_TP unmarkScope)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("Scope info: block BB%02u UNmarking in scope: ", block->bbNum);
+        printf("Scope info: block " FMT_BB " UNmarking in scope: ", block->bbNum);
         dumpConvertedVarSet(this, unmarkScope);
         printf("\n");
     }
@@ -653,7 +653,7 @@ void Compiler::fgDispDebugScopes()
     BasicBlock* block;
     for (block = fgFirstBB; block; block = block->bbNext)
     {
-        printf("BB%02u: ", block->bbNum);
+        printf(FMT_BB ": ", block->bbNum);
         dumpConvertedVarSet(this, block->bbScope);
         printf("\n");
     }
@@ -1015,7 +1015,7 @@ void Compiler::fgExtendDbgLifetimes()
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("Created zero-init of V%02u in BB%02u\n", varNum, block->bbNum);
+                    printf("Created zero-init of V%02u in " FMT_BB "\n", varNum, block->bbNum);
                 }
 #endif                                         // DEBUG
                 block->bbFlags |= BBF_CHANGED; // indicates that the contents of the block have changed.
@@ -1199,7 +1199,7 @@ class LiveVarAnalysis
 #ifdef DEBUG
                     if (m_compiler->verbose)
                     {
-                        printf("Scope info: block BB%02u LiveIn+ ", block->bbNum);
+                        printf("Scope info: block " FMT_BB " LiveIn+ ", block->bbNum);
                         dumpConvertedVarSet(m_compiler, VarSetOps::Diff(m_compiler, m_liveIn, block->bbLiveIn));
                         printf(", LiveOut+ ");
                         dumpConvertedVarSet(m_compiler, VarSetOps::Diff(m_compiler, m_liveOut, block->bbLiveOut));
@@ -2150,7 +2150,7 @@ bool Compiler::fgRemoveDeadStore(GenTree**        pTree,
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("BB%02u - Dead assignment has side effects...\n", compCurBB->bbNum);
+                    printf(FMT_BB " - Dead assignment has side effects...\n", compCurBB->bbNum);
                     gtDispTree(asgNode);
                     printf("\n");
                 }
@@ -2248,7 +2248,7 @@ bool Compiler::fgRemoveDeadStore(GenTree**        pTree,
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("BB%02u - INTERIOR dead assignment has side effects...\n", compCurBB->bbNum);
+                    printf(FMT_BB " - INTERIOR dead assignment has side effects...\n", compCurBB->bbNum);
                     gtDispTree(asgNode);
                     printf("\n");
                 }
@@ -2309,7 +2309,7 @@ bool Compiler::fgRemoveDeadStore(GenTree**        pTree,
                 {
                     printf("\nRemoving tree ");
                     printTreeID(asgNode);
-                    printf(" in BB%02u as useless\n", compCurBB->bbNum);
+                    printf(" in " FMT_BB " as useless\n", compCurBB->bbNum);
                     gtDispTree(asgNode);
                     printf("\n");
                 }
@@ -2613,7 +2613,7 @@ void Compiler::fgInterBlockLocalVarLiveness()
 void Compiler::fgDispBBLiveness(BasicBlock* block)
 {
     VARSET_TP allVars(VarSetOps::Union(this, block->bbLiveIn, block->bbLiveOut));
-    printf("BB%02u", block->bbNum);
+    printf(FMT_BB, block->bbNum);
     printf(" IN (%d)=", VarSetOps::Count(this, block->bbLiveIn));
     lvaDispVarSet(block->bbLiveIn, allVars);
     for (MemoryKind memoryKind : allMemoryKinds())
index 4098c6e..d1aae01 100644 (file)
@@ -450,14 +450,14 @@ GenTree* Lowering::LowerSwitch(GenTree* node)
     }
 #endif
 
-    JITDUMP("Lowering switch BB%02u, %d cases\n", originalSwitchBB->bbNum, jumpCnt);
+    JITDUMP("Lowering switch " FMT_BB ", %d cases\n", originalSwitchBB->bbNum, jumpCnt);
 
     // Handle a degenerate case: if the switch has only a default case, just convert it
     // to an unconditional branch. This should only happen in minopts or with debuggable
     // code.
     if (targetCnt == 1)
     {
-        JITDUMP("Lowering switch BB%02u: single target; converting to BBJ_ALWAYS\n", originalSwitchBB->bbNum);
+        JITDUMP("Lowering switch " FMT_BB ": single target; converting to BBJ_ALWAYS\n", originalSwitchBB->bbNum);
         noway_assert(comp->opts.MinOpts() || comp->opts.compDbgCode);
         if (originalSwitchBB->bbNext == jumpTab[0])
         {
@@ -645,7 +645,7 @@ GenTree* Lowering::LowerSwitch(GenTree* node)
         //    a statement that is responsible for performing a comparison of the table index and conditional
         //    branch if equal.
 
-        JITDUMP("Lowering switch BB%02u: using compare/branch expansion\n", originalSwitchBB->bbNum);
+        JITDUMP("Lowering switch " FMT_BB ": using compare/branch expansion\n", originalSwitchBB->bbNum);
 
         // We'll use 'afterDefaultCondBlock' for the first conditional. After that, we'll add new
         // blocks. If we end up not needing it at all (say, if all the non-default cases just fall through),
@@ -738,7 +738,7 @@ GenTree* Lowering::LowerSwitch(GenTree* node)
             // All the cases were fall-through! We don't need this block.
             // Convert it from BBJ_SWITCH to BBJ_NONE and unset the BBF_DONT_REMOVE flag
             // so fgRemoveBlock() doesn't complain.
-            JITDUMP("Lowering switch BB%02u: all switch cases were fall-through\n", originalSwitchBB->bbNum);
+            JITDUMP("Lowering switch " FMT_BB ": all switch cases were fall-through\n", originalSwitchBB->bbNum);
             assert(currentBlock == afterDefaultCondBlock);
             assert(currentBlock->bbJumpKind == BBJ_SWITCH);
             currentBlock->bbJumpKind = BBJ_NONE;
@@ -759,7 +759,7 @@ GenTree* Lowering::LowerSwitch(GenTree* node)
         // if that's not possible a jump table based switch will be generated.
         if (!TryLowerSwitchToBitTest(jumpTab, jumpCnt, targetCnt, afterDefaultCondBlock, switchValue))
         {
-            JITDUMP("Lowering switch BB%02u: using jump table expansion\n", originalSwitchBB->bbNum);
+            JITDUMP("Lowering switch " FMT_BB ": using jump table expansion\n", originalSwitchBB->bbNum);
 
 #ifdef _TARGET_64BIT_
             if (tempLclType != TYP_I_IMPL)
index 11a119b..09d4e17 100644 (file)
@@ -573,14 +573,14 @@ void LinearScan::dumpVarToRegMap(VarToRegMap map)
 
 void LinearScan::dumpInVarToRegMap(BasicBlock* block)
 {
-    printf("Var=Reg beg of BB%02u: ", block->bbNum);
+    printf("Var=Reg beg of " FMT_BB ": ", block->bbNum);
     VarToRegMap map = getInVarToRegMap(block->bbNum);
     dumpVarToRegMap(map);
 }
 
 void LinearScan::dumpOutVarToRegMap(BasicBlock* block)
 {
-    printf("Var=Reg end of BB%02u: ", block->bbNum);
+    printf("Var=Reg end of " FMT_BB ": ", block->bbNum);
     VarToRegMap map = getOutVarToRegMap(block->bbNum);
     dumpVarToRegMap(map);
 }
@@ -913,7 +913,7 @@ void LinearScan::setBlockSequence()
     int i = 1;
     for (BasicBlock *block = startBlockSequence(); block != nullptr; ++i, block = moveToNextBlock())
     {
-        JITDUMP("BB%02u", block->bbNum);
+        JITDUMP(FMT_BB, block->bbNum);
 
         if (block->isMaxBBWeight())
         {
@@ -1231,7 +1231,7 @@ void LinearScan::recordVarLocationsAtStartOfBB(BasicBlock* bb)
     {
         return;
     }
-    JITDUMP("Recording Var Locations at start of BB%02u\n", bb->bbNum);
+    JITDUMP("Recording Var Locations at start of " FMT_BB "\n", bb->bbNum);
     VarToRegMap map   = getInVarToRegMap(bb->bbNum);
     unsigned    count = 0;
 
@@ -1992,7 +1992,7 @@ void LinearScan::checkLastUses(BasicBlock* block)
 {
     if (VERBOSE)
     {
-        JITDUMP("\n\nCHECKING LAST USES for block %u, liveout=", block->bbNum);
+        JITDUMP("\n\nCHECKING LAST USES for " FMT_BB ", liveout=", block->bbNum);
         dumpConvertedVarSet(compiler, block->bbLiveOut);
         JITDUMP("\n==============================\n");
     }
@@ -2087,7 +2087,7 @@ void LinearScan::checkLastUses(BasicBlock* block)
         unsigned varNum = compiler->lvaTrackedToVarNum[liveInNotComputedLiveIndex];
         if (compiler->lvaTable[varNum].lvLRACandidate)
         {
-            JITDUMP("BB%02u: V%02u is in LiveIn set, but not computed live.\n", block->bbNum, varNum);
+            JITDUMP(FMT_BB ": V%02u is in LiveIn set, but not computed live.\n", block->bbNum, varNum);
             foundDiff = true;
         }
     }
@@ -2101,7 +2101,7 @@ void LinearScan::checkLastUses(BasicBlock* block)
         unsigned varNum = compiler->lvaTrackedToVarNum[computedLiveNotLiveInIndex];
         if (compiler->lvaTable[varNum].lvLRACandidate)
         {
-            JITDUMP("BB%02u: V%02u is computed live, but not in LiveIn set.\n", block->bbNum, varNum);
+            JITDUMP(FMT_BB ": V%02u is computed live, but not in LiveIn set.\n", block->bbNum, varNum);
             foundDiff = true;
         }
     }
@@ -6830,7 +6830,7 @@ void LinearScan::resolveRegisters()
             printf("Prior to Resolution\n");
             foreach_block(compiler, block)
             {
-                printf("\nBB%02u use def in out\n", block->bbNum);
+                printf("\n" FMT_BB " use def in out\n", block->bbNum);
                 dumpConvertedVarSet(compiler, block->bbVarUse);
                 printf("\n");
                 dumpConvertedVarSet(compiler, block->bbVarDef);
@@ -7116,7 +7116,7 @@ void LinearScan::insertSwap(
         {
             insertionPointString = "bottom";
         }
-        printf("   BB%02u %s: swap V%02u in %s with V%02u in %s\n", block->bbNum, insertionPointString, lclNum1,
+        printf("   " FMT_BB " %s: swap V%02u in %s with V%02u in %s\n", block->bbNum, insertionPointString, lclNum1,
                getRegName(reg1), lclNum2, getRegName(reg2));
     }
 #endif // DEBUG
@@ -7357,7 +7357,7 @@ void LinearScan::addResolution(
 #endif // DEBUG
     }
 
-    JITDUMP("   BB%02u %s: move V%02u from ", block->bbNum, insertionPointString, interval->varNum);
+    JITDUMP("   " FMT_BB " %s: move V%02u from ", block->bbNum, insertionPointString, interval->varNum);
     JITDUMP("%s to %s", getRegName(fromReg), getRegName(toReg));
 
     insertMove(block, insertionPoint, interval->varNum, fromReg, toReg);
@@ -7828,7 +7828,7 @@ void LinearScan::resolveEdges()
                         printf("Found mismatched var locations after resolution!\n");
                     }
                     unsigned varNum = compiler->lvaTrackedToVarNum[varIndex];
-                    printf(" V%02u: BB%02u to BB%02u: %s to %s\n", varNum, predBlock->bbNum, block->bbNum,
+                    printf(" V%02u: " FMT_BB " to " FMT_BB ": %s to %s\n", varNum, predBlock->bbNum, block->bbNum,
                            getRegName(fromReg), getRegName(toReg));
                 }
             }
@@ -8372,7 +8372,7 @@ void LinearScan::dumpLsraStats(FILE* file)
 
         if (spillCount != 0 || copyRegCount != 0 || resolutionMovCount != 0 || splitEdgeCount != 0)
         {
-            fprintf(file, "BB%02u [%8d]: ", block->bbNum, block->bbWeight);
+            fprintf(file, FMT_BB " [%8d]: ", block->bbNum, block->bbWeight);
             fprintf(file, "SpillCount = %d, ResolutionMovs = %d, SplitEdges = %d, CopyReg = %d\n", spillCount,
                     resolutionMovCount, splitEdgeCount, copyRegCount);
         }
@@ -8478,7 +8478,7 @@ void RefPosition::dump()
     {
         printf("%s ", treeNode->OpName(treeNode->OperGet()));
     }
-    printf("BB%02u ", this->bbNum);
+    printf(FMT_BB " ", this->bbNum);
 
     printf("regmask=");
     dumpRegMask(registerAssignment);
@@ -9031,7 +9031,7 @@ void LinearScan::TupleStyleDump(LsraTupleDumpMode mode)
         if (enregisterLocalVars && mode == LSRA_DUMP_POST && block != compiler->fgFirstBB &&
             block->bbNum <= bbNumMaxBeforeResolution)
         {
-            printf("Predecessor for variable locations: BB%02u\n", blockInfo[block->bbNum].predBBNum);
+            printf("Predecessor for variable locations: " FMT_BB "\n", blockInfo[block->bbNum].predBBNum);
             dumpInVarToRegMap(block);
         }
         if (block->bbNum > bbNumMaxBeforeResolution)
@@ -9040,7 +9040,7 @@ void LinearScan::TupleStyleDump(LsraTupleDumpMode mode)
             splitBBNumToTargetBBNumMap->Lookup(block->bbNum, &splitEdgeInfo);
             assert(splitEdgeInfo.toBBNum <= bbNumMaxBeforeResolution);
             assert(splitEdgeInfo.fromBBNum <= bbNumMaxBeforeResolution);
-            printf("New block introduced for resolution from BB%02u to BB%02u\n", splitEdgeInfo.fromBBNum,
+            printf("New block introduced for resolution from " FMT_BB " to " FMT_BB "\n", splitEdgeInfo.fromBBNum,
                    splitEdgeInfo.toBBNum);
         }
 
index ff746f8..706bc0c 100644 (file)
@@ -1862,7 +1862,7 @@ void LinearScan::buildIntervals()
         printf("-----------------\n");
         foreach_block(compiler, block)
         {
-            printf("BB%02u use def in out\n", block->bbNum);
+            printf(FMT_BB " use def in out\n", block->bbNum);
             dumpConvertedVarSet(compiler, block->bbVarUse);
             printf("\n");
             dumpConvertedVarSet(compiler, block->bbVarDef);
@@ -2019,13 +2019,14 @@ void LinearScan::buildIntervals()
 
     for (block = startBlockSequence(); block != nullptr; block = moveToNextBlock())
     {
-        JITDUMP("\nNEW BLOCK BB%02u\n", block->bbNum);
+        JITDUMP("\nNEW BLOCK " FMT_BB "\n", block->bbNum);
 
         bool predBlockIsAllocated = false;
         predBlock                 = findPredBlockForLiveIn(block, prevBlock DEBUGARG(&predBlockIsAllocated));
         if (predBlock)
         {
-            JITDUMP("\n\nSetting BB%02u as the predecessor for determining incoming variable registers of BB%02u\n",
+            JITDUMP("\n\nSetting " FMT_BB " as the predecessor for determining incoming variable registers of " FMT_BB
+                    "\n",
                     block->bbNum, predBlock->bbNum);
             assert(predBlock->bbNum <= bbNumMaxBeforeResolution);
             blockInfo[block->bbNum].predBBNum = predBlock->bbNum;
index f1d5195..54d9d7f 100644 (file)
@@ -6952,7 +6952,7 @@ void Compiler::fgMorphCallInlineHelper(GenTreeCall* call, InlineResult* result)
     {
         printf("Expanding INLINE_CANDIDATE in statement ");
         printTreeID(fgMorphStmt);
-        printf(" in BB%02u:\n", compCurBB->bbNum);
+        printf(" in " FMT_BB ":\n", compCurBB->bbNum);
         gtDispTree(fgMorphStmt);
         if (call->IsImplicitTailCall())
         {
@@ -15265,8 +15265,8 @@ bool Compiler::fgFoldConditional(BasicBlock* block)
 #ifdef DEBUG
             if (verbose)
             {
-                printf("\nConditional folded at BB%02u\n", block->bbNum);
-                printf("BB%02u becomes a BBJ_THROW\n", block->bbNum);
+                printf("\nConditional folded at " FMT_BB "\n", block->bbNum);
+                printf(FMT_BB " becomes a BBJ_THROW\n", block->bbNum);
             }
 #endif
             goto DONE_COND;
@@ -15401,12 +15401,12 @@ bool Compiler::fgFoldConditional(BasicBlock* block)
 #ifdef DEBUG
             if (verbose)
             {
-                printf("\nConditional folded at BB%02u\n", block->bbNum);
-                printf("BB%02u becomes a %s", block->bbNum,
+                printf("\nConditional folded at " FMT_BB "\n", block->bbNum);
+                printf(FMT_BB " becomes a %s", block->bbNum,
                        block->bbJumpKind == BBJ_ALWAYS ? "BBJ_ALWAYS" : "BBJ_NONE");
                 if (block->bbJumpKind == BBJ_ALWAYS)
                 {
-                    printf(" to BB%02u", block->bbJumpDest->bbNum);
+                    printf(" to " FMT_BB, block->bbJumpDest->bbNum);
                 }
                 printf("\n");
             }
@@ -15438,7 +15438,7 @@ bool Compiler::fgFoldConditional(BasicBlock* block)
 #ifdef DEBUG
                         if (verbose)
                         {
-                            printf("Removing loop L%02u (from BB%02u to BB%02u)\n\n", loopNum,
+                            printf("Removing loop L%02u (from " FMT_BB " to " FMT_BB ")\n\n", loopNum,
                                    optLoopTable[loopNum].lpFirst->bbNum, optLoopTable[loopNum].lpBottom->bbNum);
                         }
 #endif
@@ -15480,8 +15480,8 @@ bool Compiler::fgFoldConditional(BasicBlock* block)
 #ifdef DEBUG
             if (verbose)
             {
-                printf("\nConditional folded at BB%02u\n", block->bbNum);
-                printf("BB%02u becomes a BBJ_THROW\n", block->bbNum);
+                printf("\nConditional folded at " FMT_BB "\n", block->bbNum);
+                printf(FMT_BB " becomes a BBJ_THROW\n", block->bbNum);
             }
 #endif
             goto DONE_SWITCH;
@@ -15558,12 +15558,12 @@ bool Compiler::fgFoldConditional(BasicBlock* block)
 #ifdef DEBUG
             if (verbose)
             {
-                printf("\nConditional folded at BB%02u\n", block->bbNum);
-                printf("BB%02u becomes a %s", block->bbNum,
+                printf("\nConditional folded at " FMT_BB "\n", block->bbNum);
+                printf(FMT_BB " becomes a %s", block->bbNum,
                        block->bbJumpKind == BBJ_ALWAYS ? "BBJ_ALWAYS" : "BBJ_NONE");
                 if (block->bbJumpKind == BBJ_ALWAYS)
                 {
-                    printf(" to BB%02u", block->bbJumpDest->bbNum);
+                    printf(" to " FMT_BB, block->bbJumpDest->bbNum);
                 }
                 printf("\n");
             }
@@ -15698,7 +15698,7 @@ bool Compiler::fgMorphBlockStmt(BasicBlock* block, GenTreeStmt* stmt DEBUGARG(co
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\n%s Block BB%02u becomes a throw block.\n", msg, block->bbNum);
+            printf("\n%s Block " FMT_BB " becomes a throw block.\n", msg, block->bbNum);
         }
 #endif
         fgRemoveRestOfBlock = false;
@@ -15759,7 +15759,7 @@ void Compiler::fgMorphStmts(BasicBlock* block, bool* lnot, bool* loadw)
 
         if (verbose)
         {
-            printf("\nfgMorphTree BB%02u, stmt %d (before)\n", block->bbNum, compCurStmtNum);
+            printf("\nfgMorphTree " FMT_BB ", stmt %d (before)\n", block->bbNum, compCurStmtNum);
             gtDispTree(tree);
         }
 #endif
@@ -15846,7 +15846,7 @@ void Compiler::fgMorphStmts(BasicBlock* block, bool* lnot, bool* loadw)
             unsigned newHash = gtHashValue(morph);
             if (newHash != oldHash)
             {
-                printf("\nfgMorphTree BB%02u, stmt %d (after)\n", block->bbNum, compCurStmtNum);
+                printf("\nfgMorphTree " FMT_BB ", stmt %d (after)\n", block->bbNum, compCurStmtNum);
                 gtDispTree(morph);
             }
         }
@@ -16004,7 +16004,7 @@ void Compiler::fgMorphBlocks()
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\nMorphing BB%02u of '%s'\n", block->bbNum, info.compFullName);
+            printf("\nMorphing " FMT_BB " of '%s'\n", block->bbNum, info.compFullName);
         }
 #endif
 
@@ -16108,7 +16108,7 @@ void Compiler::fgMorphBlocks()
 #ifdef DEBUG
                     if (verbose)
                     {
-                        printf("morph BB%02u to point at onereturn.  New block is\n", block->bbNum);
+                        printf("morph " FMT_BB " to point at onereturn.  New block is\n", block->bbNum);
                         fgTableDispBasicBlock(block);
                     }
 #endif
@@ -16502,7 +16502,7 @@ void Compiler::fgExpandQmarkForCastInstOf(BasicBlock* block, GenTree* stmt)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nExpanding CastInstOf qmark in BB%02u (before)\n", block->bbNum);
+        printf("\nExpanding CastInstOf qmark in " FMT_BB " (before)\n", block->bbNum);
         fgDispBasicBlocks(block, block, true);
     }
 #endif // DEBUG
@@ -16633,7 +16633,7 @@ void Compiler::fgExpandQmarkForCastInstOf(BasicBlock* block, GenTree* stmt)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nExpanding CastInstOf qmark in BB%02u (after)\n", block->bbNum);
+        printf("\nExpanding CastInstOf qmark in " FMT_BB " (after)\n", block->bbNum);
         fgDispBasicBlocks(block, remainderBlock, true);
     }
 #endif // DEBUG
@@ -16710,7 +16710,7 @@ void Compiler::fgExpandQmarkStmt(BasicBlock* block, GenTree* stmt)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nExpanding top-level qmark in BB%02u (before)\n", block->bbNum);
+        printf("\nExpanding top-level qmark in " FMT_BB " (before)\n", block->bbNum);
         fgDispBasicBlocks(block, block, true);
     }
 #endif // DEBUG
@@ -16867,7 +16867,7 @@ void Compiler::fgExpandQmarkStmt(BasicBlock* block, GenTree* stmt)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nExpanding top-level qmark in BB%02u (after)\n", block->bbNum);
+        printf("\nExpanding top-level qmark in " FMT_BB " (after)\n", block->bbNum);
         fgDispBasicBlocks(block, remainderBlock, true);
     }
 #endif // DEBUG
@@ -18630,7 +18630,7 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, GenTree* st
     if (verbose)
     {
         printf("\nFound contiguous assignments from a SIMD vector to memory.\n");
-        printf("From BB%02u, stmt", block->bbNum);
+        printf("From " FMT_BB ", stmt", block->bbNum);
         printTreeID(stmt);
         printf(" to stmt");
         printTreeID(lastStmt);
@@ -18673,7 +18673,7 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, GenTree* st
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nBB%02u stmt", block->bbNum);
+        printf("\n" FMT_BB " stmt", block->bbNum);
         printTreeID(stmt);
         printf("(before)\n");
         gtDispTree(stmt);
@@ -18698,7 +18698,7 @@ bool Compiler::fgMorphCombineSIMDFieldAssignments(BasicBlock* block, GenTree* st
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nReplaced BB%02u stmt", block->bbNum);
+        printf("\nReplaced " FMT_BB " stmt", block->bbNum);
         printTreeID(stmt);
         printf("(after)\n");
         gtDispTree(stmt);
index 3abab60..5a6aa91 100644 (file)
@@ -765,8 +765,8 @@ unsigned Compiler::optValnumCSE_Index(GenTree* tree, GenTree* stmt)
             EXPSET_TP tempMask = BitVecOps::MakeSingleton(cseTraits, genCSEnum2bit(CSEindex));
             printf("\nCSE candidate #%02u, vn=", CSEindex);
             vnPrint(vnlib, 0);
-            printf(" cseMask=%s in BB%02u, [cost=%2u, size=%2u]: \n", genES2str(cseTraits, tempMask), compCurBB->bbNum,
-                   tree->gtCostEx, tree->gtCostSz);
+            printf(" cseMask=%s in " FMT_BB ", [cost=%2u, size=%2u]: \n", genES2str(cseTraits, tempMask),
+                   compCurBB->bbNum, tree->gtCostEx, tree->gtCostSz);
             gtDispTree(tree);
         }
 #endif // DEBUG
@@ -1045,7 +1045,7 @@ void Compiler::optValnumCSE_InitDataFlow()
                     printf("\nBlocks that generate CSE def/uses\n");
                     headerPrinted = true;
                 }
-                printf("BB%02u", block->bbNum);
+                printf(FMT_BB, block->bbNum);
                 printf(" cseGen = %s\n", genES2str(cseTraits, block->bbCseGen));
             }
         }
@@ -1120,7 +1120,7 @@ void Compiler::optValnumCSE_DataFlow()
 
         for (BasicBlock* block = fgFirstBB; block; block = block->bbNext)
         {
-            printf("BB%02u", block->bbNum);
+            printf(FMT_BB, block->bbNum);
             printf(" cseIn  = %s", genES2str(cseTraits, block->bbCseIn));
             printf(" cseOut = %s", genES2str(cseTraits, block->bbCseOut));
             printf("\n");
@@ -1227,7 +1227,7 @@ void Compiler::optValnumCSE_Availablity()
 #ifdef DEBUG
                     if (verbose && IS_CSE_INDEX(tree->gtCSEnum))
                     {
-                        printf("BB%02u ", block->bbNum);
+                        printf(FMT_BB " ", block->bbNum);
                         printTreeID(tree);
                         printf(" %s of CSE #%02u [weight=%s]\n", IS_CSE_USE(tree->gtCSEnum) ? "Use" : "Def",
                                GET_CSE_INDEX(tree->gtCSEnum), refCntWtd2str(stmw));
@@ -2092,7 +2092,7 @@ public:
                 {
                     printf("\nWorking on the replacement of the CSE #%02u use at ", exp->gtCSEnum);
                     Compiler::printTreeID(exp);
-                    printf(" in BB%02u\n", blk->bbNum);
+                    printf(" in " FMT_BB "\n", blk->bbNum);
                 }
 #endif // DEBUG
 
@@ -2212,7 +2212,7 @@ public:
                     {
                         printf("\nCSE #%02u use at ", exp->gtCSEnum);
                         Compiler::printTreeID(exp);
-                        printf(" replaced in BB%02u with temp use.\n", blk->bbNum);
+                        printf(" replaced in " FMT_BB " with temp use.\n", blk->bbNum);
                     }
 #endif // DEBUG
                     // If we have any side effects or extracted CSE defs then we need to create a GT_COMMA tree instead
@@ -2280,7 +2280,7 @@ public:
                 {
                     printf("\nCSE #%02u def at ", GET_CSE_INDEX(exp->gtCSEnum));
                     Compiler::printTreeID(exp);
-                    printf(" replaced in BB%02u with def of V%02u\n", blk->bbNum, cseLclVarNum);
+                    printf(" replaced in " FMT_BB " with def of V%02u\n", blk->bbNum, cseLclVarNum);
                 }
 #endif // DEBUG
 
index dbf13a3..83f3a02 100644 (file)
@@ -252,7 +252,7 @@ void Compiler::optMarkLoopBlocks(BasicBlock* begBlk, BasicBlock* endBlk, bool ex
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("\n    BB%02u(wt=%s)", curBlk->bbNum, refCntWtd2str(curBlk->getBBWeight(this)));
+                    printf("\n    " FMT_BB "(wt=%s)", curBlk->bbNum, refCntWtd2str(curBlk->getBBWeight(this)));
                 }
 #endif
             }
@@ -393,7 +393,7 @@ void Compiler::optUnmarkLoopBlocks(BasicBlock* begBlk, BasicBlock* endBlk)
 #ifdef DEBUG
             if (verbose)
             {
-                printf("\n    BB%02u(wt=%s)", curBlk->bbNum, refCntWtd2str(curBlk->getBBWeight(this)));
+                printf("\n    " FMT_BB "(wt=%s)", curBlk->bbNum, refCntWtd2str(curBlk->getBBWeight(this)));
             }
 #endif
         }
@@ -659,18 +659,18 @@ void Compiler::optPrintLoopInfo(unsigned      loopInd,
     //       Therefore the correct way is to call the Compiler::optPrintLoopInfo(unsigned lnum)
     //       version of this method.
     //
-    printf("L%02u, from BB%02u", loopInd, lpFirst->bbNum);
+    printf("L%02u, from " FMT_BB, loopInd, lpFirst->bbNum);
     if (lpTop != lpFirst)
     {
-        printf(" (loop top is BB%02u)", lpTop->bbNum);
+        printf(" (loop top is " FMT_BB ")", lpTop->bbNum);
     }
 
-    printf(" to BB%02u (Head=BB%02u, Entry=BB%02u, ExitCnt=%d", lpBottom->bbNum, lpHead->bbNum, lpEntry->bbNum,
-           lpExitCnt);
+    printf(" to " FMT_BB " (Head=" FMT_BB ", Entry=" FMT_BB ", ExitCnt=%d", lpBottom->bbNum, lpHead->bbNum,
+           lpEntry->bbNum, lpExitCnt);
 
     if (lpExitCnt == 1)
     {
-        printf(" at BB%02u", lpExit->bbNum);
+        printf(" at " FMT_BB, lpExit->bbNum);
     }
 
     if (parentLoop != BasicBlock::NOT_IN_LOOP)
@@ -1749,7 +1749,7 @@ public:
 
         if (bottom->hasTryIndex() && !comp->bbInTryRegions(bottom->getTryIndex(), first))
         {
-            JITDUMP("Loop 'first' BB%02u is in an outer EH region compared to loop 'bottom' BB%02u. Rejecting "
+            JITDUMP("Loop 'first' " FMT_BB " is in an outer EH region compared to loop 'bottom' " FMT_BB ". Rejecting "
                     "loop.\n",
                     first->bbNum, bottom->bbNum);
             return false;
@@ -1767,7 +1767,7 @@ public:
 
         if ((first->bbFlags & BBF_FINALLY_TARGET) != 0)
         {
-            JITDUMP("Loop 'first' BB%02u is a finally target. Rejecting loop.\n", first->bbNum);
+            JITDUMP("Loop 'first' " FMT_BB " is a finally target. Rejecting loop.\n", first->bbNum);
             return false;
         }
 #endif // FEATURE_EH_FUNCLETS && defined(_TARGET_ARM_)
@@ -2717,7 +2717,8 @@ bool Compiler::optCanonicalizeLoop(unsigned char loopInd)
         return false;
     }
 
-    JITDUMP("in optCanonicalizeLoop: L%02u has top BB%02u (bottom BB%02u) with natural loop number L%02u: need to "
+    JITDUMP("in optCanonicalizeLoop: L%02u has top " FMT_BB " (bottom " FMT_BB
+            ") with natural loop number L%02u: need to "
             "canonicalize\n",
             loopInd, t->bbNum, optLoopTable[loopInd].lpBottom->bbNum, t->bbNatLoopNum);
 
@@ -2847,13 +2848,14 @@ bool Compiler::optCanonicalizeLoop(unsigned char loopInd)
         // outside-in, so we shouldn't encounter the new blocks at the loop boundaries, or in the predecessor lists.
         if (t->bbNum <= topPredBlock->bbNum && topPredBlock->bbNum <= b->bbNum)
         {
-            JITDUMP("in optCanonicalizeLoop: 'top' predecessor BB%02u is in the range of L%02u (BB%02u..BB%02u); not "
+            JITDUMP("in optCanonicalizeLoop: 'top' predecessor " FMT_BB " is in the range of L%02u (" FMT_BB ".." FMT_BB
+                    "); not "
                     "redirecting its bottom edge\n",
                     topPredBlock->bbNum, loopInd, t->bbNum, b->bbNum);
             continue;
         }
 
-        JITDUMP("in optCanonicalizeLoop: redirect top predecessor BB%02u to BB%02u\n", topPredBlock->bbNum,
+        JITDUMP("in optCanonicalizeLoop: redirect top predecessor " FMT_BB " to " FMT_BB "\n", topPredBlock->bbNum,
                 newT->bbNum);
         optRedirectBlock(topPredBlock, blockMap);
 
@@ -2864,7 +2866,7 @@ bool Compiler::optCanonicalizeLoop(unsigned char loopInd)
             //
             if (firstPred)
             {
-                JITDUMP("in optCanonicalizeLoop: block BB%02u will inheritWeight from BB%02u\n", newT->bbNum,
+                JITDUMP("in optCanonicalizeLoop: block " FMT_BB " will inheritWeight from " FMT_BB "\n", newT->bbNum,
                         topPredBlock->bbNum);
 
                 newT->inheritWeight(topPredBlock);
@@ -2872,7 +2874,7 @@ bool Compiler::optCanonicalizeLoop(unsigned char loopInd)
             }
             else
             {
-                JITDUMP("in optCanonicalizeLoop: block BB%02u will also contribute to the weight of BB%02u\n",
+                JITDUMP("in optCanonicalizeLoop: block " FMT_BB " will also contribute to the weight of " FMT_BB "\n",
                         newT->bbNum, topPredBlock->bbNum);
 
                 BasicBlock::weight_t newWeight = newT->getBBWeight(this) + topPredBlock->getBBWeight(this);
@@ -2901,7 +2903,7 @@ bool Compiler::optCanonicalizeLoop(unsigned char loopInd)
 
     newT->bbNatLoopNum = loopInd;
 
-    JITDUMP("in optCanonicalizeLoop: made new block BB%02u [%p] the new unique top of loop %d.\n", newT->bbNum,
+    JITDUMP("in optCanonicalizeLoop: made new block " FMT_BB " [%p] the new unique top of loop %d.\n", newT->bbNum,
             dspPtr(newT), loopInd);
 
     // Make sure the head block still goes to the entry...
@@ -3750,10 +3752,10 @@ void Compiler::optUnrollLoops()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("\nUnrolling loop BB%02u", head->bbNext->bbNum);
+                printf("\nUnrolling loop " FMT_BB, head->bbNext->bbNum);
                 if (head->bbNext->bbNum != bottom->bbNum)
                 {
-                    printf("..BB%02u", bottom->bbNum);
+                    printf(".." FMT_BB, bottom->bbNum);
                 }
                 printf(" over V%02u from %u to %u", lvar, lbeg, llim);
                 printf(" unrollCostSz = %d\n", unrollCostSz);
@@ -4341,8 +4343,8 @@ void Compiler::fgOptWhileLoop(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nDuplicating loop condition in BB%02u for loop (BB%02u - BB%02u)", block->bbNum, block->bbNext->bbNum,
-               bTest->bbNum);
+        printf("\nDuplicating loop condition in " FMT_BB " for loop (" FMT_BB " - " FMT_BB ")", block->bbNum,
+               block->bbNext->bbNum, bTest->bbNum);
         printf("\nEstimated code size expansion is %d\n ", estDupCostSz);
 
         gtDispTree(copyOfCondStmt);
@@ -5413,7 +5415,7 @@ BasicBlock* Compiler::optInsertLoopChoiceConditions(LoopCloneContext* context,
 
         curCond->inheritWeight(head);
         curCond->bbNatLoopNum = head->bbNatLoopNum;
-        JITDUMP("Created new block %02d for new level\n", curCond->bbNum);
+        JITDUMP("Created new " FMT_BB " for new level\n", curCond->bbNum);
     }
 
     // Finally insert cloning conditions after all deref conditions have been inserted.
@@ -6194,7 +6196,7 @@ void Compiler::optPerformHoistExpr(GenTree* origExpr, unsigned lnum)
     {
         printf("\nHoisting a copy of ");
         printTreeID(origExpr);
-        printf(" into PreHeader for loop L%02u <BB%02u..BB%02u>:\n", lnum, optLoopTable[lnum].lpFirst->bbNum,
+        printf(" into PreHeader for loop L%02u <" FMT_BB ".." FMT_BB ">:\n", lnum, optLoopTable[lnum].lpFirst->bbNum,
                optLoopTable[lnum].lpBottom->bbNum);
         gtDispTree(origExpr);
         printf("\n");
@@ -6261,7 +6263,7 @@ void Compiler::optPerformHoistExpr(GenTree* origExpr, unsigned lnum)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("This hoisted copy placed in PreHeader (BB%02u):\n", preHead->bbNum);
+        printf("This hoisted copy placed in PreHeader (" FMT_BB "):\n", preHead->bbNum);
         gtDispTree(hoist);
     }
 #endif
@@ -6547,7 +6549,7 @@ void Compiler::optHoistThisLoop(unsigned lnum, LoopHoistContext* hoistCtxt)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("optHoistLoopCode for loop L%02u <BB%02u..BB%02u>:\n", lnum, begn, endn);
+        printf("optHoistLoopCode for loop L%02u <" FMT_BB ".." FMT_BB ">:\n", lnum, begn, endn);
         printf("  Loop body %s a call\n", pLoopDsc->lpContainsCall ? "contains" : "does not contain");
     }
 #endif
@@ -6674,7 +6676,8 @@ void Compiler::optHoistLoopExprsForBlock(BasicBlock* blk, unsigned lnum, LoopHoi
 #ifdef DEBUG
     if (verbose)
     {
-        printf("    optHoistLoopExprsForBlock BB%02u (weight=%6s) of loop L%02u <BB%02u..BB%02u>, firstBlock is %s\n",
+        printf("    optHoistLoopExprsForBlock " FMT_BB " (weight=%6s) of loop L%02u <" FMT_BB ".." FMT_BB
+               ">, firstBlock is %s\n",
                blk->bbNum, refCntWtd2str(blkWeight), lnum, pLoopDsc->lpFirst->bbNum, pLoopDsc->lpBottom->bbNum,
                firstBlockAndBeforeSideEffect ? "true" : "false");
         if (blkWeight < (BB_UNITY_WEIGHT / 10))
@@ -7265,8 +7268,8 @@ void Compiler::fgCreateLoopPreHeader(unsigned lnum)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nCreated PreHeader (BB%02u) for loop L%02u (BB%02u - BB%02u), with weight = %s\n", preHead->bbNum,
-               lnum, top->bbNum, pLoopDsc->lpBottom->bbNum, refCntWtd2str(preHead->getBBWeight(this)));
+        printf("\nCreated PreHeader (" FMT_BB ") for loop L%02u (" FMT_BB " - " FMT_BB "), with weight = %s\n",
+               preHead->bbNum, lnum, top->bbNum, pLoopDsc->lpBottom->bbNum, refCntWtd2str(preHead->getBBWeight(this)));
     }
 #endif
 
@@ -7476,8 +7479,8 @@ void Compiler::fgCreateLoopPreHeader(unsigned lnum)
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("Same PreHeader (BB%02u) can be used for loop L%02u (BB%02u - BB%02u)\n\n", preHead->bbNum,
-                           l, top->bbNum, optLoopTable[l].lpBottom->bbNum);
+                    printf("Same PreHeader (" FMT_BB ") can be used for loop L%02u (" FMT_BB " - " FMT_BB ")\n\n",
+                           preHead->bbNum, l, top->bbNum, optLoopTable[l].lpBottom->bbNum);
                 }
 #endif
             }
@@ -8257,7 +8260,7 @@ bool Compiler::optIdentifyLoopOptInfo(unsigned loopNum, LoopCloneContext* contex
     noway_assert((op1->gtOper == GT_LCL_VAR) && (op1->gtLclVarCommon.gtLclNum == ivLclNum));
 #endif
 
-    JITDUMP("Checking blocks BB%02d..BB%02d for optimization candidates\n", beg->bbNum,
+    JITDUMP("Checking blocks " FMT_BB ".." FMT_BB " for optimization candidates\n", beg->bbNum,
             end->bbNext ? end->bbNext->bbNum : 0);
 
     LoopCloneVisitorInfo info(context, loopNum, nullptr);
@@ -9207,8 +9210,8 @@ void Compiler::optOptimizeBools()
 #ifdef DEBUG
             if (verbose)
             {
-                printf("Folded %sboolean conditions of BB%02u and BB%02u to :\n", c2->OperIsLeaf() ? "" : "non-leaf ",
-                       b1->bbNum, b2->bbNum);
+                printf("Folded %sboolean conditions of " FMT_BB " and " FMT_BB " to :\n",
+                       c2->OperIsLeaf() ? "" : "non-leaf ", b1->bbNum, b2->bbNum);
                 gtDispTree(s1);
                 printf("\n");
             }
index 2e59944..ef47753 100644 (file)
@@ -300,7 +300,7 @@ void RangeCheck::Widen(BasicBlock* block, GenTree* tree, Range* pRange)
 #ifdef DEBUG
     if (m_pCompiler->verbose)
     {
-        printf("[RangeCheck::Widen] BB%02d, \n", block->bbNum);
+        printf("[RangeCheck::Widen] " FMT_BB ", \n", block->bbNum);
         Compiler::printTreeID(tree);
         printf("\n");
     }
@@ -523,7 +523,7 @@ void RangeCheck::SetDef(UINT64 hash, Location* loc)
     Location* loc2;
     if (m_pDefTable->Lookup(hash, &loc2))
     {
-        JITDUMP("Already have BB%02d, [%06d], [%06d] for hash => %0I64X", loc2->block->bbNum,
+        JITDUMP("Already have " FMT_BB ", [%06d], [%06d] for hash => %0I64X", loc2->block->bbNum,
                 Compiler::dspTreeID(loc2->stmt), Compiler::dspTreeID(loc2->tree), hash);
         assert(false);
     }
@@ -760,7 +760,7 @@ void RangeCheck::MergeEdgeAssertions(GenTreeLclVarCommon* lcl, ASSERT_VALARG_TP
 // arguments. If not a phi argument, check if we assertions about local variables.
 void RangeCheck::MergeAssertion(BasicBlock* block, GenTree* op, Range* pRange DEBUGARG(int indent))
 {
-    JITDUMP("Merging assertions from pred edges of BB%02d for op [%06d] with " FMT_VN "\n", block->bbNum,
+    JITDUMP("Merging assertions from pred edges of " FMT_BB " for op [%06d] " FMT_VN "\n", block->bbNum,
             Compiler::dspTreeID(op), op->gtVNPair.GetConservative());
     ASSERT_TP assertions = BitVecOps::UninitVal();
 
@@ -772,7 +772,7 @@ void RangeCheck::MergeAssertion(BasicBlock* block, GenTree* op, Range* pRange DE
         if (pred->bbFallsThrough() && pred->bbNext == block)
         {
             assertions = pred->bbAssertionOut;
-            JITDUMP("Merge assertions from pred BB%02d edge: %s\n", pred->bbNum,
+            JITDUMP("Merge assertions from pred " FMT_BB " edge: %s\n", pred->bbNum,
                     BitVecOps::ToString(m_pCompiler->apTraits, assertions));
         }
         else if ((pred->bbJumpKind == BBJ_COND || pred->bbJumpKind == BBJ_ALWAYS) && pred->bbJumpDest == block)
@@ -780,7 +780,7 @@ void RangeCheck::MergeAssertion(BasicBlock* block, GenTree* op, Range* pRange DE
             if (m_pCompiler->bbJtrueAssertionOut != nullptr)
             {
                 assertions = m_pCompiler->bbJtrueAssertionOut[pred->bbNum];
-                JITDUMP("Merge assertions from pred BB%02d JTrue edge: %s\n", pred->bbNum,
+                JITDUMP("Merge assertions from pred " FMT_BB " JTrue edge: %s\n", pred->bbNum,
                         BitVecOps::ToString(m_pCompiler->apTraits, assertions));
             }
         }
@@ -883,7 +883,7 @@ Range RangeCheck::ComputeRangeForLocalDef(BasicBlock*          block,
             Range range = GetRange(asgBlock, asg->gtGetOp2(), monotonic DEBUGARG(indent));
             if (!BitVecOps::MayBeUninit(block->bbAssertionIn))
             {
-                JITDUMP("Merge assertions from BB%02d:%s for assignment about [%06d]\n", block->bbNum,
+                JITDUMP("Merge assertions from " FMT_BB ":%s for assignment about [%06d]\n", block->bbNum,
                         BitVecOps::ToString(m_pCompiler->apTraits, block->bbAssertionIn),
                         Compiler::dspTreeID(asg->gtGetOp1()));
                 MergeEdgeAssertions(asg->gtGetOp1()->AsLclVarCommon(), block->bbAssertionIn, &range);
@@ -1208,7 +1208,7 @@ Range RangeCheck::GetRange(BasicBlock* block, GenTree* expr, bool monotonic DEBU
     if (m_pCompiler->verbose)
     {
         Indent(indent);
-        JITDUMP("[RangeCheck::GetRange] BB%02d", block->bbNum);
+        JITDUMP("[RangeCheck::GetRange] " FMT_BB, block->bbNum);
         m_pCompiler->gtDispTree(expr);
         Indent(indent);
         JITDUMP("{\n", expr);
index ddb5e8c..748d7ff 100644 (file)
@@ -432,7 +432,7 @@ void CodeGen::siBeginBlock(BasicBlock* block)
         // For now, don't report any scopes in funclets. JIT64 doesn't.
         siInFuncletRegion = true;
 
-        JITDUMP("Scope info: found beginning of funclet region at block BB%02u; ignoring following blocks\n",
+        JITDUMP("Scope info: found beginning of funclet region at block " FMT_BB "; ignoring following blocks\n",
                 block->bbNum);
 
         return;
@@ -442,7 +442,7 @@ void CodeGen::siBeginBlock(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nScope info: begin block BB%02u, IL range ", block->bbNum);
+        printf("\nScope info: begin block " FMT_BB ", IL range ", block->bbNum);
         block->dspBlockILRange();
         printf("\n");
     }
@@ -582,7 +582,7 @@ void CodeGen::siEndBlock(BasicBlock* block)
 #ifdef DEBUG
     if (verbose)
     {
-        printf("\nScope info: end block BB%02u, IL range ", block->bbNum);
+        printf("\nScope info: end block " FMT_BB ", IL range ", block->bbNum);
         block->dspBlockILRange();
         printf("\n");
     }
index fbd7d90..19b7405 100644 (file)
@@ -168,7 +168,7 @@ int SsaBuilder::TopologicalSort(BasicBlock** postOrder, int count)
 #ifdef DEBUG
         if (comp->verboseSsa)
         {
-            printf("[SsaBuilder::TopologicalSort] Pushing BB%02u: [", block->bbNum);
+            printf("[SsaBuilder::TopologicalSort] Pushing " FMT_BB ": [", block->bbNum);
             AllSuccessorEnumerator successors(comp, block);
             unsigned               index = 0;
             while (true)
@@ -181,7 +181,7 @@ int SsaBuilder::TopologicalSort(BasicBlock** postOrder, int count)
                     break;
                 }
 
-                printf("%s%sBB%02u", (index++ ? ", " : ""), (isEHsucc ? "[EH]" : ""), succ->bbNum);
+                printf("%s%s" FMT_BB, (index++ ? ", " : ""), (isEHsucc ? "[EH]" : ""), succ->bbNum);
             }
             printf("]\n");
         }
@@ -216,7 +216,7 @@ int SsaBuilder::TopologicalSort(BasicBlock** postOrder, int count)
             // all successors have been visited
             blocks.Pop();
 
-            DBG_SSA_JITDUMP("[SsaBuilder::TopologicalSort] postOrder[%d] = BB%02u\n", postIndex, block->bbNum);
+            DBG_SSA_JITDUMP("[SsaBuilder::TopologicalSort] postOrder[%d] = " FMT_BB "\n", postIndex, block->bbNum);
             postOrder[postIndex]  = block;
             block->bbPostOrderNum = postIndex;
             postIndex += 1;
@@ -264,7 +264,7 @@ void SsaBuilder::ComputeImmediateDom(BasicBlock** postOrder, int count)
         {
             BasicBlock* block = postOrder[i];
 
-            DBG_SSA_JITDUMP("Visiting in reverse post order: BB%02u.\n", block->bbNum);
+            DBG_SSA_JITDUMP("Visiting in reverse post order: " FMT_BB ".\n", block->bbNum);
 
             // Find the first processed predecessor block.
             BasicBlock* predBlock = nullptr;
@@ -280,7 +280,7 @@ void SsaBuilder::ComputeImmediateDom(BasicBlock** postOrder, int count)
             // There could just be a single basic block, so just check if there were any preds.
             if (predBlock != nullptr)
             {
-                DBG_SSA_JITDUMP("Pred block is BB%02u.\n", predBlock->bbNum);
+                DBG_SSA_JITDUMP("Pred block is " FMT_BB ".\n", predBlock->bbNum);
             }
 
             // Intersect DOM, if computed, for all predecessors.
@@ -309,14 +309,14 @@ void SsaBuilder::ComputeImmediateDom(BasicBlock** postOrder, int count)
                 changed = true;
 
                 // IDom has changed, update it.
-                DBG_SSA_JITDUMP("bbIDom of BB%02u becomes BB%02u.\n", block->bbNum, bbIDom ? bbIDom->bbNum : 0);
+                DBG_SSA_JITDUMP("bbIDom of " FMT_BB " becomes " FMT_BB ".\n", block->bbNum, bbIDom ? bbIDom->bbNum : 0);
                 block->bbIDom = bbIDom;
             }
 
             // Mark the current block as visited.
             BitVecOps::AddElemD(&m_visitedTraits, m_visited, block->bbNum);
 
-            DBG_SSA_JITDUMP("Marking block BB%02u as processed.\n", block->bbNum);
+            DBG_SSA_JITDUMP("Marking block " FMT_BB " as processed.\n", block->bbNum);
         }
     }
 }
@@ -380,7 +380,7 @@ void SsaBuilder::ConstructDomTreeForBlock(Compiler* pCompiler, BasicBlock* block
     // If the bbIDom map key doesn't exist, create one.
     BlkVector* domChildren = domTree->Emplace(bbIDom, domTree->GetAllocator());
 
-    DBG_SSA_JITDUMP("Inserting BB%02u as dom child of BB%02u.\n", block->bbNum, bbIDom->bbNum);
+    DBG_SSA_JITDUMP("Inserting " FMT_BB " as dom child of " FMT_BB ".\n", block->bbNum, bbIDom->bbNum);
     // Insert the block into the block's set.
     domChildren->push_back(block);
 }
@@ -460,11 +460,11 @@ void SsaBuilder::DisplayDominators(BlkToBlkVectorMap* domTree)
     printf("After computing dominator tree: \n");
     for (BlkToBlkVectorMap::KeyIterator nodes = domTree->Begin(); !nodes.Equal(domTree->End()); ++nodes)
     {
-        printf("BB%02u := {", nodes.Get()->bbNum);
+        printf(FMT_BB " := {", nodes.Get()->bbNum);
         int index = 0;
         for (BasicBlock* child : nodes.GetValue())
         {
-            printf("%sBB%02u", (index++ == 0) ? "" : ",", child->bbNum);
+            printf("%s" FMT_BB, (index++ == 0) ? "" : ",", child->bbNum);
         }
         printf("}\n");
     }
@@ -497,7 +497,7 @@ void SsaBuilder::ComputeDominanceFrontiers(BasicBlock** postOrder, int count, Bl
     {
         BasicBlock* block = postOrder[i];
 
-        DBG_SSA_JITDUMP("Considering block BB%02u.\n", block->bbNum);
+        DBG_SSA_JITDUMP("Considering block " FMT_BB ".\n", block->bbNum);
 
         // Recall that B3 is in the dom frontier of B1 if there exists a B2
         // such that B1 dom B2, !(B1 dom B3), and B3 is an immediate successor
@@ -522,7 +522,7 @@ void SsaBuilder::ComputeDominanceFrontiers(BasicBlock** postOrder, int count, Bl
 
         for (flowList* pred = blockPreds; pred != nullptr; pred = pred->flNext)
         {
-            DBG_SSA_JITDUMP("   Considering predecessor BB%02u.\n", pred->flBlock->bbNum);
+            DBG_SSA_JITDUMP("   Considering predecessor " FMT_BB ".\n", pred->flBlock->bbNum);
 
             // If we've found a B2, then consider the possible B1's.  We start with
             // B2, since a block dominates itself, then traverse upwards in the dominator
@@ -535,7 +535,8 @@ void SsaBuilder::ComputeDominanceFrontiers(BasicBlock** postOrder, int count, Bl
             for (BasicBlock* b1 = pred->flBlock; (b1 != nullptr) && (b1 != block->bbIDom); // !root && !loop
                  b1             = b1->bbIDom)
             {
-                DBG_SSA_JITDUMP("      Adding BB%02u to dom frontier of pred dom BB%02u.\n", block->bbNum, b1->bbNum);
+                DBG_SSA_JITDUMP("      Adding " FMT_BB " to dom frontier of pred dom " FMT_BB ".\n", block->bbNum,
+                                b1->bbNum);
 
                 BlkVector& b1DF = *mapDF->Emplace(b1, m_allocator);
                 // It's possible to encounter the same DF multiple times, ensure that we don't add duplicates.
@@ -554,7 +555,7 @@ void SsaBuilder::ComputeDominanceFrontiers(BasicBlock** postOrder, int count, Bl
         for (int i = 0; i < count; ++i)
         {
             BasicBlock* b = postOrder[i];
-            printf("Block BB%02u := {", b->bbNum);
+            printf("Block " FMT_BB " := {", b->bbNum);
 
             BlkVector* bDF = mapDF->LookupPointer(b);
             if (bDF != nullptr)
@@ -562,7 +563,7 @@ void SsaBuilder::ComputeDominanceFrontiers(BasicBlock** postOrder, int count, Bl
                 int index = 0;
                 for (BasicBlock* f : *bDF)
                 {
-                    printf("%sBB%02u", (index++ == 0) ? "" : ",", f->bbNum);
+                    printf("%s" FMT_BB, (index++ == 0) ? "" : ",", f->bbNum);
                 }
             }
             printf("}\n");
@@ -629,11 +630,11 @@ void SsaBuilder::ComputeIteratedDominanceFrontier(BasicBlock* b, const BlkToBlkV
 #ifdef DEBUG
     if (m_pCompiler->verboseSsa)
     {
-        printf("IDF(BB%02u) := {", b->bbNum);
+        printf("IDF(" FMT_BB ") := {", b->bbNum);
         int index = 0;
         for (BasicBlock* f : *bIDF)
         {
-            printf("%sBB%02u", (index++ == 0) ? "" : ",", f->bbNum);
+            printf("%s" FMT_BB, (index++ == 0) ? "" : ",", f->bbNum);
         }
         printf("}\n");
     }
@@ -703,7 +704,7 @@ void SsaBuilder::InsertPhiFunctions(BasicBlock** postOrder, int count)
     for (int i = 0; i < count; ++i)
     {
         BasicBlock* block = postOrder[i];
-        DBG_SSA_JITDUMP("Considering dominance frontier of block BB%02u:\n", block->bbNum);
+        DBG_SSA_JITDUMP("Considering dominance frontier of block " FMT_BB ":\n", block->bbNum);
 
         blockIDF.clear();
         ComputeIteratedDominanceFrontier(block, &mapDF, &blockIDF);
@@ -730,7 +731,7 @@ void SsaBuilder::InsertPhiFunctions(BasicBlock** postOrder, int count)
             // For each block "bbInDomFront" that is in the dominance frontier of "block"...
             for (BasicBlock* bbInDomFront : blockIDF)
             {
-                DBG_SSA_JITDUMP("     Considering BB%02u in dom frontier of BB%02u:\n", bbInDomFront->bbNum,
+                DBG_SSA_JITDUMP("     Considering " FMT_BB " in dom frontier of " FMT_BB ":\n", bbInDomFront->bbNum,
                                 block->bbNum);
 
                 // Check if variable "lclNum" is live in block "*iterBlk".
@@ -744,7 +745,8 @@ void SsaBuilder::InsertPhiFunctions(BasicBlock** postOrder, int count)
                 {
                     // We have a variable i that is defined in block j and live at l, and l belongs to dom frontier of
                     // j. So insert a phi node at l.
-                    JITDUMP("Inserting phi definition for V%02u at start of BB%02u.\n", lclNum, bbInDomFront->bbNum);
+                    JITDUMP("Inserting phi definition for V%02u at start of " FMT_BB ".\n", lclNum,
+                            bbInDomFront->bbNum);
 
                     GenTree* phiLhs = m_pCompiler->gtNewLclvNode(lclNum, m_pCompiler->lvaTable[lclNum].TypeGet());
 
@@ -771,7 +773,7 @@ void SsaBuilder::InsertPhiFunctions(BasicBlock** postOrder, int count)
             // For each block "bbInDomFront" that is in the dominance frontier of "block".
             for (BasicBlock* bbInDomFront : blockIDF)
             {
-                DBG_SSA_JITDUMP("     Considering BB%02u in dom frontier of BB%02u for Memory phis:\n",
+                DBG_SSA_JITDUMP("     Considering " FMT_BB " in dom frontier of " FMT_BB " for Memory phis:\n",
                                 bbInDomFront->bbNum, block->bbNum);
 
                 for (MemoryKind memoryKind : allMemoryKinds())
@@ -802,8 +804,8 @@ void SsaBuilder::InsertPhiFunctions(BasicBlock** postOrder, int count)
                         // We have a variable i that is defined in block j and live at l, and l belongs to dom frontier
                         // of
                         // j. So insert a phi node at l.
-                        JITDUMP("Inserting phi definition for %s at start of BB%02u.\n", memoryKindNames[memoryKind],
-                                bbInDomFront->bbNum);
+                        JITDUMP("Inserting phi definition for %s at start of " FMT_BB ".\n",
+                                memoryKindNames[memoryKind], bbInDomFront->bbNum);
                         bbInDomFront->bbMemorySsaPhiFunc[memoryKind] = BasicBlock::EmptyMemoryPhiDef;
                     }
                 }
@@ -1008,9 +1010,9 @@ void SsaBuilder::AddDefToHandlerPhis(BasicBlock* block, unsigned lclNum, unsigne
     EHblkDsc* tryBlk = m_pCompiler->ehGetBlockExnFlowDsc(block);
     if (tryBlk != nullptr)
     {
-        DBG_SSA_JITDUMP(
-            "Definition of local V%02u/d:%d in block BB%02u has exn handler; adding as phi arg to handlers.\n", lclNum,
-            count, block->bbNum);
+        DBG_SSA_JITDUMP("Definition of local V%02u/d:%d in block " FMT_BB
+                        " has exn handler; adding as phi arg to handlers.\n",
+                        lclNum, count, block->bbNum);
         while (true)
         {
             BasicBlock* handler = tryBlk->ExFlowBlock();
@@ -1061,8 +1063,8 @@ void SsaBuilder::AddDefToHandlerPhis(BasicBlock* block, unsigned lclNum, unsigne
 #ifdef DEBUG
                         phiFound = true;
 #endif
-                        DBG_SSA_JITDUMP("   Added phi arg u:%d for V%02u to phi defn in handler block BB%02u.\n", count,
-                                        lclNum, handler->bbNum);
+                        DBG_SSA_JITDUMP("   Added phi arg u:%d for V%02u to phi defn in handler block " FMT_BB ".\n",
+                                        count, lclNum, handler->bbNum);
                         break;
                     }
                 }
@@ -1091,7 +1093,7 @@ void SsaBuilder::AddMemoryDefToHandlerPhis(MemoryKind memoryKind, BasicBlock* bl
         }
 
         // Otherwise...
-        DBG_SSA_JITDUMP("Definition of %s/d:%d in block BB%02u has exn handler; adding as phi arg to handlers.\n",
+        DBG_SSA_JITDUMP("Definition of %s/d:%d in block " FMT_BB " has exn handler; adding as phi arg to handlers.\n",
                         memoryKindNames[memoryKind], count, block->bbNum);
         EHblkDsc* tryBlk = m_pCompiler->ehGetBlockExnFlowDsc(block);
         while (true)
@@ -1137,7 +1139,7 @@ void SsaBuilder::AddMemoryDefToHandlerPhis(MemoryKind memoryKind, BasicBlock* bl
                     handlerMemoryPhi = new (m_pCompiler) BasicBlock::MemoryPhiArg(count, handlerMemoryPhi);
                 }
 
-                DBG_SSA_JITDUMP("   Added phi arg u:%d for %s to phi defn in handler block BB%02u.\n", count,
+                DBG_SSA_JITDUMP("   Added phi arg u:%d for %s to phi defn in handler block " FMT_BB ".\n", count,
                                 memoryKindNames[memoryKind], memoryKind, handler->bbNum);
 
                 if ((memoryKind == ByrefExposed) && m_pCompiler->byrefStatesMatchGcHeapStates)
@@ -1187,7 +1189,7 @@ void SsaBuilder::BlockRenameVariables(BasicBlock* block, SsaRenameState* pRename
                 unsigned count = pRenameState->CountForMemoryDef();
                 pRenameState->PushMemory(memoryKind, block, count);
 
-                DBG_SSA_JITDUMP("Ssa # for %s phi on entry to BB%02u is %d.\n", memoryKindNames[memoryKind],
+                DBG_SSA_JITDUMP("Ssa # for %s phi on entry to " FMT_BB " is %d.\n", memoryKindNames[memoryKind],
                                 block->bbNum, count);
             }
         }
@@ -1243,7 +1245,7 @@ void SsaBuilder::BlockRenameVariables(BasicBlock* block, SsaRenameState* pRename
         // Record the "out" Ssa" # for memoryKind.
         block->bbMemorySsaNumOut[memoryKind] = pRenameState->CountForMemoryUse(memoryKind);
 
-        DBG_SSA_JITDUMP("Ssa # for %s on entry to BB%02u is %d; on exit is %d.\n", memoryKindNames[memoryKind],
+        DBG_SSA_JITDUMP("Ssa # for %s on entry to " FMT_BB " is %d; on exit is %d.\n", memoryKindNames[memoryKind],
                         block->bbNum, block->bbMemorySsaNumIn[memoryKind], block->bbMemorySsaNumOut[memoryKind]);
     }
 }
@@ -1294,8 +1296,8 @@ void SsaBuilder::AssignPhiNodeRhsVariables(BasicBlock* block, SsaRenameState* pR
                     new (m_pCompiler, GT_PHI_ARG) GenTreePhiArg(tree->gtOp.gtOp1->TypeGet(), lclNum, ssaNum, block);
                 argList             = (phiNode->gtOp.gtOp1 == nullptr ? nullptr : phiNode->gtOp.gtOp1->AsArgList());
                 phiNode->gtOp.gtOp1 = new (m_pCompiler, GT_LIST) GenTreeArgList(newPhiArg, argList);
-                DBG_SSA_JITDUMP("  Added phi arg u:%d for V%02u from BB%02u in BB%02u.\n", ssaNum, lclNum, block->bbNum,
-                                succ->bbNum);
+                DBG_SSA_JITDUMP("  Added phi arg u:%d for V%02u from " FMT_BB " in " FMT_BB ".\n", ssaNum, lclNum,
+                                block->bbNum, succ->bbNum);
             }
 
             m_pCompiler->gtSetStmtInfo(stmt);
@@ -1347,8 +1349,9 @@ void SsaBuilder::AssignPhiNodeRhsVariables(BasicBlock* block, SsaRenameState* pR
                         succMemoryPhi = new (m_pCompiler) BasicBlock::MemoryPhiArg(ssaNum, succMemoryPhi);
                     }
                 }
-                DBG_SSA_JITDUMP("  Added phi arg for %s u:%d from BB%02u in BB%02u.\n", memoryKindNames[memoryKind],
-                                block->bbMemorySsaNumOut[memoryKind], block->bbNum, succ->bbNum);
+                DBG_SSA_JITDUMP("  Added phi arg for %s u:%d from " FMT_BB " in " FMT_BB ".\n",
+                                memoryKindNames[memoryKind], block->bbMemorySsaNumOut[memoryKind], block->bbNum,
+                                succ->bbNum);
             }
         }
 
@@ -1447,8 +1450,8 @@ void SsaBuilder::AssignPhiNodeRhsVariables(BasicBlock* block, SsaRenameState* pR
                             new (m_pCompiler, GT_PHI_ARG) GenTreePhiArg(lclVar->TypeGet(), lclNum, ssaNum, block);
                         phiNode->gtOp.gtOp1 = new (m_pCompiler, GT_LIST) GenTreeArgList(newPhiArg, argList);
 
-                        DBG_SSA_JITDUMP("  Added phi arg u:%d for V%02u from BB%02u in BB%02u.\n", ssaNum, lclNum,
-                                        block->bbNum, handlerStart->bbNum);
+                        DBG_SSA_JITDUMP("  Added phi arg u:%d for V%02u from " FMT_BB " in " FMT_BB ".\n", ssaNum,
+                                        lclNum, block->bbNum, handlerStart->bbNum);
 
                         m_pCompiler->gtSetStmtInfo(stmt);
                         m_pCompiler->fgSetStmtSeq(stmt);
@@ -1489,7 +1492,7 @@ void SsaBuilder::AssignPhiNodeRhsVariables(BasicBlock* block, SsaRenameState* pR
                             handlerMemoryPhi = new (m_pCompiler)
                                 BasicBlock::MemoryPhiArg(block->bbMemorySsaNumOut[memoryKind], handlerMemoryPhi);
                         }
-                        DBG_SSA_JITDUMP("  Added phi arg for %s u:%d from BB%02u in BB%02u.\n",
+                        DBG_SSA_JITDUMP("  Added phi arg for %s u:%d from " FMT_BB " in " FMT_BB ".\n",
                                         memoryKindNames[memoryKind], block->bbMemorySsaNumOut[memoryKind], block->bbNum,
                                         handlerStart->bbNum);
                     }
@@ -1622,7 +1625,8 @@ void SsaBuilder::RenameVariables(BlkToBlkVectorMap* domTree, SsaRenameState* pRe
         blocksToDo->pop_back();
         BasicBlock* block = blockWrk.m_blk;
 
-        DBG_SSA_JITDUMP("[SsaBuilder::RenameVariables](BB%02u, processed = %d)\n", block->bbNum, blockWrk.m_processed);
+        DBG_SSA_JITDUMP("[SsaBuilder::RenameVariables](" FMT_BB ", processed = %d)\n", block->bbNum,
+                        blockWrk.m_processed);
 
         if (!blockWrk.m_processed)
         {
@@ -1642,7 +1646,7 @@ void SsaBuilder::RenameVariables(BlkToBlkVectorMap* domTree, SsaRenameState* pRe
             {
                 for (BasicBlock* child : *domChildren)
                 {
-                    DBG_SSA_JITDUMP("[SsaBuilder::RenameVariables](pushing dom child BB%02u)\n", child->bbNum);
+                    DBG_SSA_JITDUMP("[SsaBuilder::RenameVariables](pushing dom child " FMT_BB ")\n", child->bbNum);
                     blocksToDo->push_back(BlockWork(child));
                 }
             }
@@ -1651,7 +1655,7 @@ void SsaBuilder::RenameVariables(BlkToBlkVectorMap* domTree, SsaRenameState* pRe
         {
             // Done, pop all the stack count, if there is one for this block.
             BlockPopStacks(block, pRenameState);
-            DBG_SSA_JITDUMP("[SsaBuilder::RenameVariables] done with BB%02u\n", block->bbNum);
+            DBG_SSA_JITDUMP("[SsaBuilder::RenameVariables] done with " FMT_BB "\n", block->bbNum);
         }
     }
 
@@ -1681,7 +1685,7 @@ void SsaBuilder::Print(BasicBlock** postOrder, int count)
 {
     for (int i = count - 1; i >= 0; --i)
     {
-        printf("After SSA BB%02u:\n", postOrder[i]->bbNum);
+        printf("After SSA " FMT_BB ":\n", postOrder[i]->bbNum);
         m_pCompiler->gtDispTreeList(postOrder[i]->bbTreeList);
     }
 }
index 9ec0770..ba62cf0 100644 (file)
@@ -132,7 +132,8 @@ void SsaRenameState::Push(BasicBlock* bb, unsigned lclNum, unsigned count)
     EnsureStacks();
 
     // We'll use BB00 here to indicate the "block before any real blocks..."
-    DBG_SSA_JITDUMP("[SsaRenameState::Push] BB%02u, V%02u, count = %d\n", bb != nullptr ? bb->bbNum : 0, lclNum, count);
+    DBG_SSA_JITDUMP("[SsaRenameState::Push] " FMT_BB ", V%02u, count = %d\n", bb != nullptr ? bb->bbNum : 0, lclNum,
+                    count);
 
     Stack* stack = stacks[lclNum];
 
@@ -160,7 +161,7 @@ void SsaRenameState::Push(BasicBlock* bb, unsigned lclNum, unsigned count)
         printf("\tContents of the stack: [");
         for (Stack::iterator iter2 = stack->begin(); iter2 != stack->end(); iter2++)
         {
-            printf("<BB%02u, %d>", ((*iter2).m_bb != nullptr ? (*iter2).m_bb->bbNum : 0), (*iter2).m_count);
+            printf("<" FMT_BB ", %d>", ((*iter2).m_bb != nullptr ? (*iter2).m_bb->bbNum : 0), (*iter2).m_count);
         }
         printf("]\n");
 
@@ -171,7 +172,7 @@ void SsaRenameState::Push(BasicBlock* bb, unsigned lclNum, unsigned count)
 
 void SsaRenameState::PopBlockStacks(BasicBlock* block)
 {
-    DBG_SSA_JITDUMP("[SsaRenameState::PopBlockStacks] BB%02u\n", block->bbNum);
+    DBG_SSA_JITDUMP("[SsaRenameState::PopBlockStacks] " FMT_BB "\n", block->bbNum);
     // Iterate over the stacks for all the variables, popping those that have an entry
     // for "block" on top.
     while (!definedLocs.empty() && definedLocs.back().m_bb == block)
@@ -236,7 +237,8 @@ void SsaRenameState::DumpStacks()
                     {
                         printf(", ");
                     }
-                    printf("<BB%02u, %2d>", ((*iter2).m_bb != nullptr ? (*iter2).m_bb->bbNum : 0), (*iter2).m_count);
+                    printf("<" FMT_BB ", %2d>", ((*iter2).m_bb != nullptr ? (*iter2).m_bb->bbNum : 0),
+                           (*iter2).m_count);
                 }
             }
             printf("\n");
index 393eb25..4d17e7e 100644 (file)
@@ -189,7 +189,7 @@ void StackLevelSetter::SetThrowHelperBlock(SpecialCodeKind kind, BasicBlock* blo
         add->acdStkLvlInit = true;
         if (add->acdStkLvl != currentStackLevel)
         {
-            JITDUMP("Wrong stack level was set for block %d\n", add->acdDstBlk->bbNum);
+            JITDUMP("Wrong stack level was set for " FMT_BB "\n", add->acdDstBlk->bbNum);
         }
 #ifdef DEBUG
         add->acdDstBlk->bbTgtStkDepth = currentStackLevel;
index 6674890..cac92a5 100644 (file)
@@ -4632,7 +4632,7 @@ struct ValueNumberState
     void FinishVisit(BasicBlock* blk)
     {
 #ifdef DEBUG_VN_VISIT
-        JITDUMP("finish(BB%02u).\n", blk->bbNum);
+        JITDUMP("finish(" FMT_BB ").\n", blk->bbNum);
 #endif // DEBUG_VN_VISIT
 
         SetVisitBit(blk->bbNum, BVB_complete);
@@ -4640,7 +4640,7 @@ struct ValueNumberState
         for (BasicBlock* succ : blk->GetAllSuccs(m_comp))
         {
 #ifdef DEBUG_VN_VISIT
-            JITDUMP("   Succ(BB%02u).\n", succ->bbNum);
+            JITDUMP("   Succ(" FMT_BB ").\n", succ->bbNum);
 #endif // DEBUG_VN_VISIT
 
             if (GetVisitBit(succ->bbNum, BVB_complete))
@@ -5091,7 +5091,7 @@ void Compiler::fgValueNumberBlock(BasicBlock* blk)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("The SSA definition for %s (#%d) at start of BB%02u is ", memoryKindNames[memoryKind],
+            printf("The SSA definition for %s (#%d) at start of " FMT_BB " is ", memoryKindNames[memoryKind],
                    blk->bbMemorySsaNumIn[memoryKind], blk->bbNum);
             vnPrint(fgCurMemoryVN[memoryKind], 1);
             printf("\n");
@@ -5108,7 +5108,7 @@ void Compiler::fgValueNumberBlock(BasicBlock* blk)
         compCurStmtNum++;
         if (verbose)
         {
-            printf("\n***** BB%02u, stmt %d (before)\n", blk->bbNum, compCurStmtNum);
+            printf("\n***** " FMT_BB ", stmt %d (before)\n", blk->bbNum, compCurStmtNum);
             gtDispTree(stmt->gtStmt.gtStmtExpr);
             printf("\n");
         }
@@ -5122,7 +5122,7 @@ void Compiler::fgValueNumberBlock(BasicBlock* blk)
 #ifdef DEBUG
         if (verbose)
         {
-            printf("\n***** BB%02u, stmt %d (after)\n", blk->bbNum, compCurStmtNum);
+            printf("\n***** " FMT_BB ", stmt %d (after)\n", blk->bbNum, compCurStmtNum);
             gtDispTree(stmt->gtStmt.gtStmtExpr);
             printf("\n");
             if (stmt->gtNext)
@@ -5175,8 +5175,8 @@ ValueNum Compiler::fgMemoryVNForLoopSideEffects(MemoryKind  memoryKind,
 #ifdef DEBUG
     if (verbose)
     {
-        printf("Computing %s state for block BB%02u, entry block for loops %d to %d:\n", memoryKindNames[memoryKind],
-               entryBlock->bbNum, innermostLoopNum, loopNum);
+        printf("Computing %s state for block " FMT_BB ", entry block for loops %d to %d:\n",
+               memoryKindNames[memoryKind], entryBlock->bbNum, innermostLoopNum, loopNum);
     }
 #endif // DEBUG
 
@@ -5212,8 +5212,8 @@ ValueNum Compiler::fgMemoryVNForLoopSideEffects(MemoryKind  memoryKind,
 #ifdef DEBUG
                 if (verbose)
                 {
-                    printf("  Entry block has >1 non-loop preds: (at least) BB%02u and BB%02u.\n", nonLoopPred->bbNum,
-                           predBlock->bbNum);
+                    printf("  Entry block has >1 non-loop preds: (at least) " FMT_BB " and " FMT_BB ".\n",
+                           nonLoopPred->bbNum, predBlock->bbNum);
                 }
 #endif // DEBUG
                 multipleNonLoopPreds = true;