summaryrefslogtreecommitdiff
path: root/src/jit/lower.cpp
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2018-08-02 11:23:27 -0700
committerAndy Ayers <andya@microsoft.com>2018-08-06 18:59:11 -0700
commit0862b3077b301195fbbcfeb4d302e31cfe74845d (patch)
tree179f1b74ec0c8af9660de2317b7878c8211e9252 /src/jit/lower.cpp
parentaa1d28a7b24f896df4a389db5f8fa984e84764b7 (diff)
downloadcoreclr-0862b3077b301195fbbcfeb4d302e31cfe74845d.tar.gz
coreclr-0862b3077b301195fbbcfeb4d302e31cfe74845d.tar.bz2
coreclr-0862b3077b301195fbbcfeb4d302e31cfe74845d.zip
JIT: recompute local ref counts after lower
Update `lvaComputeRefCounts` to encapsulate running ref counts post-lower and to also handle the fast jitting cases. Invoke this after lower to provide recomputed (and more accurate) counts. Part of #18969.
Diffstat (limited to 'src/jit/lower.cpp')
-rw-r--r--src/jit/lower.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/jit/lower.cpp b/src/jit/lower.cpp
index 8b1229616b..13780ca188 100644
--- a/src/jit/lower.cpp
+++ b/src/jit/lower.cpp
@@ -5249,6 +5249,12 @@ void Lowering::DoPhase()
}
#endif
+ // Recompute local var ref counts before potentially sorting.
+ // Note this does minimal work in cases where we are not going to sort.
+ const bool isRecompute = true;
+ const bool setSlotNumbers = false;
+ comp->lvaComputeRefCounts(isRecompute, setSlotNumbers);
+
// TODO-Throughput: We re-sort local variables to get the goodness of enregistering recently
// introduced local variables both by Rationalize and Lower; downside is we need to
// recompute standard local variable liveness in order to get Linear CodeGen working.