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:
authorEgor Bogatov <egorbo@gmail.com>2021-02-12 19:56:39 +0300
committerGitHub <noreply@github.com>2021-02-12 19:56:39 +0300
commita08fec6608cc31734d358581c6eaea45b1600a64 (patch)
tree1dd3c1f83e5d05b1c568d6d7e7e941257b511903 /src/coreclr/jit/flowgraph.cpp
parent3844c76b37b197cdef1b8fcce423964fffe188cd (diff)
[RyuJIT] Devirtualize Comparer<T>.Default (#48160)
Diffstat (limited to 'src/coreclr/jit/flowgraph.cpp')
-rw-r--r--src/coreclr/jit/flowgraph.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/coreclr/jit/flowgraph.cpp b/src/coreclr/jit/flowgraph.cpp
index 594a59af14e..d6a9ed7642b 100644
--- a/src/coreclr/jit/flowgraph.cpp
+++ b/src/coreclr/jit/flowgraph.cpp
@@ -926,13 +926,14 @@ GenTreeCall* Compiler::fgGetStaticsCCtorHelper(CORINFO_CLASS_HANDLE cls, CorInfo
GenTreeCall* result = gtNewHelperCallNode(helper, type, argList);
result->gtFlags |= callFlags;
- // If we're importing the special EqualityComparer<T>.Default
- // intrinsic, flag the helper call. Later during inlining, we can
+ // If we're importing the special EqualityComparer<T>.Default or Comparer<T>.Default
+ // intrinsics, flag the helper call. Later during inlining, we can
// remove the helper call if the associated field lookup is unused.
if ((info.compFlags & CORINFO_FLG_JIT_INTRINSIC) != 0)
{
NamedIntrinsic ni = lookupNamedIntrinsic(info.compMethodHnd);
- if (ni == NI_System_Collections_Generic_EqualityComparer_get_Default)
+ if ((ni == NI_System_Collections_Generic_EqualityComparer_get_Default) ||
+ (ni == NI_System_Collections_Generic_Comparer_get_Default))
{
JITDUMP("\nmarking helper call [%06u] as special dce...\n", result->gtTreeID);
result->gtCallMoreFlags |= GTF_CALL_M_HELPER_SPECIAL_DCE;