Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0fe7042
Initial impl of Jan's suggestions
EgorBo Oct 29, 2022
e428363
Address part of the feedback
EgorBo Oct 29, 2022
774af69
Address feedback
EgorBo Oct 29, 2022
28b9be3
Remove "is frozen" check from jit
EgorBo Oct 29, 2022
9f92bfb
NativeAOT support
EgorBo Oct 29, 2022
687d5cb
Use CORINFO_OBJECT_HANDLE in more places
EgorBo Oct 29, 2022
872058d
Free jit handles upon exit
EgorBo Oct 29, 2022
860d706
Update src/coreclr/vm/jitinterface.cpp
EgorBo Oct 29, 2022
bffb8e6
Clean up
EgorBo Oct 29, 2022
f0a35cc
clean up in getArrayLength
EgorBo Oct 29, 2022
bfaf6ee
Update jitinterface.h
EgorBo Oct 29, 2022
a3ccc91
Remove unnecessary DestroyHandle
EgorBo Oct 29, 2022
7e041c1
Rename to getArrayOrStringLength, free jit handles in destructor
EgorBo Oct 29, 2022
1bba1ec
fix compilation
EgorBo Oct 29, 2022
ee0117e
Use IND instead of LoadVector
EgorBo Oct 30, 2022
b20f1fb
Update hwintrinsicxarch.cpp
EgorBo Oct 30, 2022
2a12b10
Update hwintrinsicxarch.cpp
EgorBo Oct 30, 2022
504acf3
Apply suggestions from code review
EgorBo Oct 30, 2022
b56a67f
Address feedback
EgorBo Oct 30, 2022
15a39a6
Address feedback
EgorBo Oct 30, 2022
1683f29
Address feedback
EgorBo Oct 30, 2022
43a32c9
Move "Is frozen" check to getJitHandleForObject
EgorBo Oct 30, 2022
d10f4eb
Update src/coreclr/vm/jitinterface.cpp
EgorBo Oct 30, 2022
4443383
Update src/coreclr/vm/jitinterface.cpp
EgorBo Oct 30, 2022
429b4d1
use OBJECTREF everywhere
EgorBo Oct 30, 2022
49c32c4
fix bad merge
EgorBo Oct 30, 2022
5dbbef4
Cannonize more loads
EgorBo Oct 30, 2022
62f5cbb
check ISAs
EgorBo Oct 30, 2022
a096211
Fix comments
EgorBo Oct 30, 2022
efd71e9
Handle stores
EgorBo Oct 31, 2022
27a2619
Fix compilation & address feedback around redundant IsFrozenSegment call
EgorBo Oct 31, 2022
1f95212
Merge branch 'use-ind-for-loads' of github.com:EgorBo/runtime-1 into …
EgorBo Oct 31, 2022
d5c3cab
DescriptionDescription -> Description
EgorBo Oct 31, 2022
7621045
Merge branch 'main' of github.com:dotnet/runtime into fold-static-rea…
EgorBo Oct 31, 2022
96397b1
Update valuenum.cpp
EgorBo Oct 31, 2022
076d4cd
Add comments
EgorBo Oct 31, 2022
1ecceca
Merge branch 'main' of github.com:dotnet/runtime into fold-static-rea…
EgorBo Oct 31, 2022
752c840
Revert unrelated SIMD changes (accidentally pushed)
EgorBo Oct 31, 2022
ea8e369
Use Exception sets
EgorBo Oct 31, 2022
2fab46b
Address feedback
EgorBo Oct 31, 2022
07d42e5
Address feedback
EgorBo Oct 31, 2022
8c2ec20
Update src/coreclr/jit/valuenum.cpp
EgorBo Oct 31, 2022
93c11c9
Address feedback
EgorBo Oct 31, 2022
19df3e6
Apply suggestions from code review
EgorBo Oct 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cannonize more loads
  • Loading branch information
EgorBo committed Oct 30, 2022
commit 5dbbef4ba9b3bb1a50b03326a9e83d00e0e6c9fc
51 changes: 7 additions & 44 deletions src/coreclr/jit/hwintrinsicarm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1242,38 +1242,6 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
break;
}

case NI_Vector64_Load:
case NI_Vector128_Load:
{
assert(sig->numArgs == 1);

op1 = impPopStack().val;

if (op1->OperIs(GT_CAST))
{
// Although the API specifies a pointer, if what we have is a BYREF, that's what
// we really want, so throw away the cast.
if (op1->gtGetOp1()->TypeGet() == TYP_BYREF)
{
op1 = op1->gtGetOp1();
}
}

NamedIntrinsic loadIntrinsic = NI_Illegal;

if (simdSize == 16)
{
loadIntrinsic = NI_AdvSimd_LoadVector128;
}
else
{
loadIntrinsic = NI_AdvSimd_LoadVector64;
}

retNode = gtNewSimdHWIntrinsicNode(retType, op1, loadIntrinsic, simdBaseJitType, simdSize);
break;
}

case NI_Vector64_LoadAligned:
case NI_Vector128_LoadAligned:
{
Expand Down Expand Up @@ -1354,11 +1322,16 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
break;
}

case NI_AdvSimd_LoadVector64:
case NI_AdvSimd_LoadVector128:
case NI_Vector64_Load:
case NI_Vector128_Load:
case NI_Vector64_LoadUnsafe:
case NI_Vector128_LoadUnsafe:
{
if (sig->numArgs == 2)
{
assert((intrinsic == NI_Vector128_LoadUnsafe) || (intrinsic == NI_Vector64_LoadUnsafe));
op2 = impPopStack().val;
}
else
Expand All @@ -1385,18 +1358,8 @@ GenTree* Compiler::impSpecialIntrinsic(NamedIntrinsic intrinsic,
op1 = gtNewOperNode(GT_ADD, op1->TypeGet(), op1, op2);
}

NamedIntrinsic loadIntrinsic = NI_Illegal;

if (simdSize == 16)
{
loadIntrinsic = NI_AdvSimd_LoadVector128;
}
else
{
loadIntrinsic = NI_AdvSimd_LoadVector64;
}

retNode = gtNewSimdHWIntrinsicNode(retType, op1, loadIntrinsic, simdBaseJitType, simdSize);
retNode = gtNewIndir(retType, op1);
retNode->gtFlags |= GTF_IND_UNALIGNED | GTF_GLOB_REF;
break;
}

Expand Down
42 changes: 6 additions & 36 deletions src/coreclr/jit/hwintrinsicxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1657,42 +1657,6 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic,
break;
}

case NI_Vector128_Load:
case NI_Vector256_Load:
{
assert(sig->numArgs == 1);

op1 = impPopStack().val;

if (op1->OperIs(GT_CAST))
{
// Although the API specifies a pointer, if what we have is a BYREF, that's what
// we really want, so throw away the cast.
if (op1->gtGetOp1()->TypeGet() == TYP_BYREF)
{
op1 = op1->gtGetOp1();
}
}

NamedIntrinsic loadIntrinsic = NI_Illegal;

if (simdSize == 32)
{
loadIntrinsic = NI_AVX_LoadVector256;
}
else if (simdBaseType != TYP_FLOAT)
{
loadIntrinsic = NI_SSE2_LoadVector128;
}
else
{
loadIntrinsic = NI_SSE_LoadVector128;
}

retNode = gtNewSimdHWIntrinsicNode(retType, op1, loadIntrinsic, simdBaseJitType, simdSize);
break;
}

case NI_Vector128_LoadAligned:
case NI_Vector256_LoadAligned:
{
Expand Down Expand Up @@ -1784,11 +1748,17 @@ GenTree* Compiler::impBaseIntrinsic(NamedIntrinsic intrinsic,
break;
}

case NI_SSE_LoadVector128:
case NI_SSE2_LoadVector128:
case NI_AVX_LoadVector256:
case NI_Vector128_Load:
case NI_Vector256_Load:
case NI_Vector128_LoadUnsafe:
case NI_Vector256_LoadUnsafe:
{
if (sig->numArgs == 2)
{
assert((intrinsic == NI_Vector128_LoadUnsafe) || (intrinsic == NI_Vector256_LoadUnsafe));
op2 = impPopStack().val;
}
else
Expand Down