printf(" ");
//
+ // Display natural loop number
+ //
+ if (block->bbNatLoopNum == BasicBlock::NOT_IN_LOOP)
+ {
+ printf(" ");
+ }
+ else
+ {
+ printf("%2d ", block->bbNatLoopNum);
+ }
+
+ //
// Display block IL range
//
// clang-format off
printf("\n");
- printf("------%*s-------------------------------------%*s-----------------------%*s----------------------------------------\n",
+ printf("------%*s-------------------------------------%*s--------------------------%*s----------------------------------------\n",
padWidth, "------------",
ibcColWidth, "------------",
maxBlockNumWidth, "----");
- printf("BBnum %*sBBid ref try hnd %s weight %*s%s [IL range] [jump]%*s [EH region] [flags]\n",
+ printf("BBnum %*sBBid ref try hnd %s weight %*s%s lp [IL range] [jump]%*s [EH region] [flags]\n",
padWidth, "",
fgCheapPredsValid ? "cheap preds" :
(fgComputePredsDone ? "preds "
: ""),
maxBlockNumWidth, ""
);
- printf("------%*s-------------------------------------%*s-----------------------%*s----------------------------------------\n",
+ printf("------%*s-------------------------------------%*s--------------------------%*s----------------------------------------\n",
padWidth, "------------",
ibcColWidth, "------------",
maxBlockNumWidth, "----");
if (block == fgFirstColdBlock)
{
- printf("~~~~~~%*s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%*s~~~~~~~~~~~~~~~~~~~~~~~%*s~~~~~~~~~~~~~~~~~~~~~~~~"
- "~~~~~~~~~~~~~~~~\n",
- padWidth, "~~~~~~~~~~~~", ibcColWidth, "~~~~~~~~~~~~", maxBlockNumWidth, "~~~~");
+ printf(
+ "~~~~~~%*s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%*s~~~~~~~~~~~~~~~~~~~~~~~~~~%*s~~~~~~~~~~~~~~~~~~~~~~~~"
+ "~~~~~~~~~~~~~~~~\n",
+ padWidth, "~~~~~~~~~~~~", ibcColWidth, "~~~~~~~~~~~~", maxBlockNumWidth, "~~~~");
}
#if FEATURE_EH_FUNCLETS
if (block == fgFirstFuncletBB)
{
- printf("++++++%*s+++++++++++++++++++++++++++++++++++++%*s+++++++++++++++++++++++%*s++++++++++++++++++++++++"
- "++++++++++++++++ funclets follow\n",
- padWidth, "++++++++++++", ibcColWidth, "++++++++++++", maxBlockNumWidth, "++++");
+ printf(
+ "++++++%*s+++++++++++++++++++++++++++++++++++++%*s++++++++++++++++++++++++++%*s++++++++++++++++++++++++"
+ "++++++++++++++++ funclets follow\n",
+ padWidth, "++++++++++++", ibcColWidth, "++++++++++++", maxBlockNumWidth, "++++");
}
#endif // FEATURE_EH_FUNCLETS
}
}
- printf("------%*s-------------------------------------%*s-----------------------%*s--------------------------------"
- "--------\n",
- padWidth, "------------", ibcColWidth, "------------", maxBlockNumWidth, "----");
+ printf(
+ "------%*s-------------------------------------%*s--------------------------%*s--------------------------------"
+ "--------\n",
+ padWidth, "------------", ibcColWidth, "------------", maxBlockNumWidth, "----");
if (dumpTrees)
{
}
}
+//------------------------------------------------------------------------
+// gtDispZeroFieldSeq: If this node has a zero fieldSeq annotation
+// then print this Field Sequence
+//
+void Compiler::gtDispZeroFieldSeq(GenTree* tree)
+{
+ NodeToFieldSeqMap* map = GetZeroOffsetFieldMap();
+
+ // THe most common case is having no entries in this map
+ if (map->GetCount() > 0)
+ {
+ FieldSeqNode* fldSeq = nullptr;
+ if (map->Lookup(tree, &fldSeq))
+ {
+ printf(" Zero");
+ gtDispFieldSeq(fldSeq);
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+// gtDispVN: Utility function that prints a tree's ValueNumber: gtVNPair
+//
void Compiler::gtDispVN(GenTree* tree)
{
if (tree->gtVNPair.GetLiberal() != ValueNumStore::NoVN)
}
//------------------------------------------------------------------------
+// gtDispCommonEndLine
+// Utility function that prints the following node information
+// 1: The associated zero field sequence (if any)
+// 2. The register assigned to this node (if any)
+// 2. The value number assigned (if any)
+// 3. A newline character
+//
+void Compiler::gtDispCommonEndLine(GenTree* tree)
+{
+ gtDispZeroFieldSeq(tree);
+ gtDispRegVal(tree);
+ gtDispVN(tree);
+ printf("\n");
+}
+
+//------------------------------------------------------------------------
// gtDispNode: Print a tree to jitstdout.
//
// Arguments:
default:
assert(!"unexpected constant node");
}
-
- gtDispRegVal(tree);
}
void Compiler::gtDispFieldSeq(FieldSeqNode* pfsn)
default:
assert(!"don't know how to display tree leaf node");
}
-
- gtDispRegVal(tree);
}
//------------------------------------------------------------------------
{
gtDispNode(tree, indentStack, msg, isLIR);
gtDispLeaf(tree, indentStack);
- gtDispVN(tree);
- printf("\n");
+ gtDispCommonEndLine(tree);
+
if (tree->OperIsLocalStore() && !topOnly)
{
gtDispChild(tree->gtOp.gtOp1, indentStack, IINone);
if (tree->OperGet() == GT_PHI)
{
gtDispNode(tree, indentStack, msg, isLIR);
- gtDispVN(tree);
- printf("\n");
+ gtDispCommonEndLine(tree);
if (!topOnly)
{
}
#endif // FEATURE_HW_INTRINSICS
- gtDispRegVal(tree);
- gtDispVN(tree);
- printf("\n");
+ gtDispCommonEndLine(tree);
if (!topOnly && tree->gtOp.gtOp1)
{
printf(" %s", eeGetFieldName(tree->gtField.gtFldHnd), 0);
}
+ gtDispCommonEndLine(tree);
+
if (tree->gtField.gtFldObj && !topOnly)
{
- gtDispVN(tree);
- printf("\n");
gtDispChild(tree->gtField.gtFldObj, indentStack, IIArcBottom);
}
- else
- {
- gtDispRegVal(tree);
- gtDispVN(tree);
- printf("\n");
- }
+
break;
case GT_CALL:
printf(" (exactContextHnd=0x%p)", dspPtr(call->gtInlineCandidateInfo->exactContextHnd));
}
- gtDispVN(call);
- if (call->IsMultiRegCall())
- {
- gtDispRegVal(call);
- }
- printf("\n");
+ gtDispCommonEndLine(tree);
if (!topOnly)
{
break;
case GT_ARR_ELEM:
- gtDispVN(tree);
- printf("\n");
+ gtDispCommonEndLine(tree);
if (!topOnly)
{
break;
case GT_ARR_OFFSET:
- gtDispVN(tree);
- printf("\n");
+ gtDispCommonEndLine(tree);
+
if (!topOnly)
{
gtDispChild(tree->gtArrOffs.gtOffset, indentStack, IIArc, nullptr, topOnly);
break;
case GT_CMPXCHG:
- gtDispVN(tree);
- printf("\n");
+ gtDispCommonEndLine(tree);
+
if (!topOnly)
{
gtDispChild(tree->gtCmpXchg.gtOpLocation, indentStack, IIArc, nullptr, topOnly);
#ifdef FEATURE_HW_INTRINSICS
case GT_HW_INTRINSIC_CHK:
#endif // FEATURE_HW_INTRINSICS
- gtDispVN(tree);
- printf("\n");
+ gtDispCommonEndLine(tree);
+
if (!topOnly)
{
gtDispChild(tree->gtBoundsChk.gtIndex, indentStack, IIArc, nullptr, topOnly);
{
printf(" (init)");
}
- gtDispVN(tree);
- printf("\n");
+ gtDispCommonEndLine(tree);
+
if (!topOnly)
{
if (tree->gtDynBlk.Data() != nullptr)