summaryrefslogtreecommitdiff
path: root/src/jit/compiler.hpp
diff options
context:
space:
mode:
authorJarret Shook <jashoo@microsoft.com>2019-04-17 11:06:16 -0700
committerAndy Ayers <andya@microsoft.com>2019-04-17 11:06:16 -0700
commitadf6d4661a5f7367e70256ac1c37d71149a37f5b (patch)
tree7a5d54397a5f800501086874bf25d0fa815012e9 /src/jit/compiler.hpp
parent35172e140236d5197a4d7d19f46d627dd6c119c1 (diff)
downloadcoreclr-adf6d4661a5f7367e70256ac1c37d71149a37f5b.tar.gz
coreclr-adf6d4661a5f7367e70256ac1c37d71149a37f5b.tar.bz2
coreclr-adf6d4661a5f7367e70256ac1c37d71149a37f5b.zip
Add lvIsImplicitByRef information to lvaSetStruct (#19223)
Before implicit byrefs were tracked by setting lvIsParam and lvIsTemp. This change explicitly adds a flag for implicitByRef instead of overloading. In addition, it fixes the decision to copy an implicitByRef for arm64 varargs. Temporarily bump weight on byref params to match old behavior and avoid codegen diffs. Re-enabled various tests and parts of tests. Closes #20046 Closes #19860
Diffstat (limited to 'src/jit/compiler.hpp')
-rw-r--r--src/jit/compiler.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jit/compiler.hpp b/src/jit/compiler.hpp
index 0b30114f67..9b10542722 100644
--- a/src/jit/compiler.hpp
+++ b/src/jit/compiler.hpp
@@ -1756,8 +1756,15 @@ inline void LclVarDsc::incRefCnts(BasicBlock::weight_t weight, Compiler* comp, R
if (weight != 0)
{
// We double the weight of internal temps
- //
- if (lvIsTemp && (weight * 2 > weight))
+
+ bool doubleWeight = lvIsTemp;
+
+#if defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)
+ // and, for the time being, implict byref params
+ doubleWeight |= lvIsImplicitByRef;
+#endif // defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)
+
+ if (doubleWeight && (weight * 2 > weight))
{
weight *= 2;
}