From c06fb332e7bb77a55bda724a56b33d6094a0a042 Mon Sep 17 00:00:00 2001 From: Andy Ayers Date: Mon, 17 Apr 2017 13:04:23 -0700 Subject: Jit intrinsics for Span.get_Item and ReadOnlySpan.get_Item. (#10910) Implement these two methods as optional-expand jit intrinsics. Uses `GT_ARR_BOUNDS_CHECK` for the bounds check so in some cases downstream code is able to eliminate redundant checks. Fully general support (on par with arrays in most cases) is still work in progress. Update one bit of code in the optimizer that assumed it knew the tree types that appeared in a `GT_ARR_BOUNDS_CHECK`. Add benchmark tests for Span and ReadOnlySpan indexers. Tests ability of jit to reason about indexer properties with respect to loop bounds and related indexer uses. Some cases inspired by span indexer usage in Kestrel. Closes #10785. Also addresses lack of indexer inlining noted in #10031. Span indexers should now always be inlined, even when invoked from shared methods. --- src/vm/method.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vm/method.cpp') diff --git a/src/vm/method.cpp b/src/vm/method.cpp index a72b07b404..77a6a0d37f 100644 --- a/src/vm/method.cpp +++ b/src/vm/method.cpp @@ -2404,7 +2404,7 @@ BOOL MethodDesc::IsFCallOrIntrinsic() if (IsFCall() || IsArray()) return TRUE; - // Intrinsic methods on ByReference or Span + // Intrinsic methods on ByReference, Span, or ReadOnlySpan MethodTable * pMT = GetMethodTable(); if (pMT->IsByRefLike() && pMT->GetModule()->IsSystem()) return TRUE; -- cgit v1.2.3