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

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2017-05-22 07:39:44 +0300
committerJan Kotas <jkotas@microsoft.com>2017-05-22 07:39:44 +0300
commitb6cf2ac7fd726012ed54924fc18d28369920aec1 (patch)
treeed0bcc080f44456d312b68e28a83a7a6bf2e3c69 /src/System.Private.CoreLib
parent3075191e58a0543d8ef3cd42da97e268da3d5741 (diff)
Report Span/ReadOnlySpan intrinsics to RyuJIT (#3669)
This lets RyuJIT optimize range checks on Span same way as it does for arrays. * Annotate the intrinsics * Uncomment them in the table * Report `sigInst` for all intrinsics
Diffstat (limited to 'src/System.Private.CoreLib')
-rw-r--r--src/System.Private.CoreLib/shared/System/ReadOnlySpan.cs3
-rw-r--r--src/System.Private.CoreLib/shared/System/Span.cs3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/ReadOnlySpan.cs b/src/System.Private.CoreLib/shared/System/ReadOnlySpan.cs
index 8ec431f6f..0851b255d 100644
--- a/src/System.Private.CoreLib/shared/System/ReadOnlySpan.cs
+++ b/src/System.Private.CoreLib/shared/System/ReadOnlySpan.cs
@@ -174,6 +174,9 @@ namespace System
return Unsafe.Add(ref _pointer.Value, index);
}
#else
+#if CORERT
+ [Intrinsic]
+#endif
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
diff --git a/src/System.Private.CoreLib/shared/System/Span.cs b/src/System.Private.CoreLib/shared/System/Span.cs
index 82ea35f67..2494ce314 100644
--- a/src/System.Private.CoreLib/shared/System/Span.cs
+++ b/src/System.Private.CoreLib/shared/System/Span.cs
@@ -189,6 +189,9 @@ namespace System
return ref Unsafe.Add(ref _pointer.Value, index);
}
#else
+#if CORERT
+ [Intrinsic]
+#endif
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{