summaryrefslogtreecommitdiff
path: root/src/jit/liveness.cpp
diff options
context:
space:
mode:
authorPat Gavlin <pgavlin@gmail.com>2017-07-17 11:06:57 -0700
committerGitHub <noreply@github.com>2017-07-17 11:06:57 -0700
commitf7becf9e5ce5431ff52a4845b4488766697b46f3 (patch)
treed31fc4bcf3e426a22acb0e62c90d0d2fa4d4116c /src/jit/liveness.cpp
parent7f70e548bb22d7e551dd7167863c83e984d0755e (diff)
parent06b2680e52dfe30c6c108c86bfea98f02d99ecd5 (diff)
downloadcoreclr-f7becf9e5ce5431ff52a4845b4488766697b46f3.tar.gz
coreclr-f7becf9e5ce5431ff52a4845b4488766697b46f3.tar.bz2
coreclr-f7becf9e5ce5431ff52a4845b4488766697b46f3.zip
Merge pull request #12838 from pgavlin/PInvokeKills
Do not mark GC vars live across an unmanged call as DNER in liveness for RyuJIT.
Diffstat (limited to 'src/jit/liveness.cpp')
-rw-r--r--src/jit/liveness.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/jit/liveness.cpp b/src/jit/liveness.cpp
index b77aa40c5a..432ac80065 100644
--- a/src/jit/liveness.cpp
+++ b/src/jit/liveness.cpp
@@ -1647,13 +1647,14 @@ void Compiler::fgComputeLifeCall(VARSET_TP& life, GenTreeCall* call)
}
}
+#ifdef LEGACY_BACKEND
/* Do we have any live variables? */
-
if (!VarSetOps::IsEmpty(this, life))
{
- // For each live variable if it is a GC-ref type, we
- // mark it volatile to prevent if from being enregistered
+ // For each live variable if it is a GC-ref type, mark it volatile to prevent if from being enregistered
// across the unmanaged call.
+ //
+ // Note that this is not necessary when targeting the RyuJIT backend, as its RA handles these kills itself.
unsigned lclNum;
LclVarDsc* varDsc;
@@ -1682,6 +1683,7 @@ void Compiler::fgComputeLifeCall(VARSET_TP& life, GenTreeCall* call)
}
}
}
+#endif // LEGACY_BACKEND
}
}