From 8934bbe2d310ce861fe504452386ac95c2904449 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Tue, 29 Jun 2021 16:51:26 -0700 Subject: [PATCH] Print spillweight of RefPosition --- src/coreclr/jit/lsra.cpp | 8 +++++--- src/coreclr/jit/lsra.h | 3 ++- src/coreclr/jit/lsrabuild.cpp | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp index e137b7f678a0d7..86d037e12ac5f6 100644 --- a/src/coreclr/jit/lsra.cpp +++ b/src/coreclr/jit/lsra.cpp @@ -2467,7 +2467,7 @@ void LinearScan::dumpVarRefPositions(const char* title) printf(" (Interval %d)\n", interval->intervalIndex); for (RefPosition* ref = interval->firstRefPosition; ref != nullptr; ref = ref->nextRefPosition) { - ref->dump(); + ref->dump(this); } } else @@ -4346,7 +4346,7 @@ void LinearScan::dumpRefPositions(const char* str) printf("------------\n"); for (RefPosition& refPos : refPositions) { - refPos.dump(); + refPos.dump(this); } } #endif // DEBUG @@ -8895,7 +8895,7 @@ const char* LinearScan::getScoreName(RegisterScore score) } } -void RefPosition::dump() +void RefPosition::dump(LinearScan* linearScan) { printf("getWeight(this)); printf(">\n"); } diff --git a/src/coreclr/jit/lsra.h b/src/coreclr/jit/lsra.h index eda5d014c658a7..10ff1f471b4a71 100644 --- a/src/coreclr/jit/lsra.h +++ b/src/coreclr/jit/lsra.h @@ -1,3 +1,4 @@ + // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. /*****************************************************************************/ @@ -2444,7 +2445,7 @@ class RefPosition return *this; } - void dump(); + void dump(LinearScan* linearScan); #endif // DEBUG }; diff --git a/src/coreclr/jit/lsrabuild.cpp b/src/coreclr/jit/lsrabuild.cpp index dcea8813119196..f4ea6fb3579ca5 100644 --- a/src/coreclr/jit/lsrabuild.cpp +++ b/src/coreclr/jit/lsrabuild.cpp @@ -525,7 +525,7 @@ RefPosition* LinearScan::newRefPosition( (regRecord->lastRefPosition->refType != theRefType)); associateRefPosWithInterval(newRP); - DBEXEC(VERBOSE, newRP->dump()); + DBEXEC(VERBOSE, newRP->dump(this)); return newRP; } @@ -620,7 +620,7 @@ RefPosition* LinearScan::newRefPosition(Interval* theInterval, associateRefPosWithInterval(newRP); - DBEXEC(VERBOSE, newRP->dump()); + DBEXEC(VERBOSE, newRP->dump(this)); return newRP; } @@ -2624,7 +2624,7 @@ void LinearScan::validateIntervals() printf("-----------------\n"); for (RefPosition* ref = interval->firstRefPosition; ref != nullptr; ref = ref->nextRefPosition) { - ref->dump(); + ref->dump(this); RefType refType = ref->refType; if (!defined && RefTypeIsUse(refType)) {