Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKunal Pathak <Kunal.Pathak@microsoft.com>2021-06-30 05:10:56 +0300
committerGitHub <noreply@github.com>2021-06-30 05:10:56 +0300
commit685eda620e0f058b157b6d0a66da6f21c2d165fa (patch)
tree000405f1edaa9bb72b5d9be79ab4ffb5232263e7 /src/coreclr/jit
parent36e0432547d7d734ef23fce40e8c278ef80c34c8 (diff)
Print spillweight of RefPosition (#54933)
Diffstat (limited to 'src/coreclr/jit')
-rw-r--r--src/coreclr/jit/lsra.cpp8
-rw-r--r--src/coreclr/jit/lsra.h3
-rw-r--r--src/coreclr/jit/lsrabuild.cpp6
3 files changed, 10 insertions, 7 deletions
diff --git a/src/coreclr/jit/lsra.cpp b/src/coreclr/jit/lsra.cpp
index e137b7f678a..86d037e12ac 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("<RefPosition #%-3u @%-3u", rpNum, nodeLocation);
@@ -8969,6 +8969,8 @@ void RefPosition::dump()
{
printf(" regOptional");
}
+
+ printf(" wt=%.2f", linearScan->getWeight(this));
printf(">\n");
}
diff --git a/src/coreclr/jit/lsra.h b/src/coreclr/jit/lsra.h
index eda5d014c65..10ff1f471b4 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 @@ public:
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 dcea8813119..f4ea6fb3579 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))
{