diff options
author | Egor Bogatov <egorbo@gmail.com> | 2021-03-24 12:55:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-24 12:55:13 +0300 |
commit | 76f9b60d184110e6718c1ca51a60542f58e15cd1 (patch) | |
tree | 1a807956e06ef700795e16f5c6dccb4fe4813965 /src/coreclr/jit/fgdiagnostic.cpp | |
parent | 216c569599d19682fdec3d88e1c37dd5c4f1fbc3 (diff) |
JIT: Add rootTreeOp to DumpFg (#50119)
Diffstat (limited to 'src/coreclr/jit/fgdiagnostic.cpp')
-rw-r--r-- | src/coreclr/jit/fgdiagnostic.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/coreclr/jit/fgdiagnostic.cpp b/src/coreclr/jit/fgdiagnostic.cpp index 6ad412709ca..1ae0151a9ba 100644 --- a/src/coreclr/jit/fgdiagnostic.cpp +++ b/src/coreclr/jit/fgdiagnostic.cpp @@ -822,10 +822,18 @@ bool Compiler::fgDumpFlowGraph(Phases phase) { fprintf(fgxFile, "\n loopHead=\"true\""); } + + const char* rootTreeOpName = "n/a"; + if (block->lastNode() != nullptr) + { + rootTreeOpName = GenTree::OpName(block->lastNode()->OperGet()); + } + fprintf(fgxFile, "\n weight="); fprintfDouble(fgxFile, ((double)block->bbWeight) / weightDivisor); fprintf(fgxFile, "\n codeEstimate=\"%d\"", fgGetCodeEstimate(block)); fprintf(fgxFile, "\n startOffset=\"%d\"", block->bbCodeOffs); + fprintf(fgxFile, "\n rootTreeOp=\"%s\"", rootTreeOpName); fprintf(fgxFile, "\n endOffset=\"%d\"", block->bbCodeOffsEnd); fprintf(fgxFile, ">"); fprintf(fgxFile, "\n </block>"); |