提交 c771d81a 编写于 作者: T Tanner Gooding

Adding basic containment analysis support for hardware intrinsics.


Commit migrated from https://github.com/dotnet/coreclr/commit/fc89ab8156b8f6534ada439569bdacbbcb1be2ca
上级 4ddca1e7
......@@ -262,6 +262,12 @@ GenTree* Lowering::LowerNode(GenTree* node)
break;
#endif //
#ifdef FEATURE_HW_INTRINSICS
case GT_HWIntrinsic:
LowerHWIntrinsic(node->AsHWIntrinsic());
break;
#endif // FEATURE_HW_INTRINSICS
case GT_LCL_VAR:
WidenSIMD12IfNecessary(node->AsLclVarCommon());
break;
......@@ -5857,6 +5863,11 @@ void Lowering::ContainCheckNode(GenTree* node)
ContainCheckSIMD(node->AsSIMD());
break;
#endif // FEATURE_SIMD
#ifdef FEATURE_HW_INTRINSICS
case GT_HWIntrinsic:
ContainCheckHWIntrinsic(node->AsHWIntrinsic());
break;
#endif // FEATURE_HW_INTRINSICS
default:
break;
}
......
......@@ -120,6 +120,9 @@ private:
#ifdef FEATURE_SIMD
void ContainCheckSIMD(GenTreeSIMD* simdNode);
#endif // FEATURE_SIMD
#ifdef FEATURE_HW_INTRINSICS
void ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node);
#endif // FEATURE_HW_INTRINSICS
#ifdef DEBUG
static void CheckCallArg(GenTree* arg);
......@@ -306,6 +309,9 @@ private:
#ifdef FEATURE_SIMD
void LowerSIMD(GenTreeSIMD* simdNode);
#endif // FEATURE_SIMD
#ifdef FEATURE_HW_INTRINSICS
void LowerHWIntrinsic(GenTreeHWIntrinsic* node);
#endif // FEATURE_HW_INTRINSICS
// Utility functions
void MorphBlkIntoHelperCall(GenTreePtr pTree, GenTreePtr treeStmt);
......
......@@ -867,6 +867,19 @@ void Lowering::LowerSIMD(GenTreeSIMD* simdNode)
}
#endif // FEATURE_SIMD
#ifdef FEATURE_HW_INTRINSICS
//----------------------------------------------------------------------------------------------
// Lowering::LowerHWIntrinsic: Perform containment analysis for a hardware intrinsic node.
//
// Arguments:
// node - The hardware intrinsic node.
//
void Lowering::LowerHWIntrinsic(GenTreeHWIntrinsic* node)
{
ContainCheckHWIntrinsic(node);
}
#endif // FEATURE_HW_INTRINSICS
//----------------------------------------------------------------------------------------------
// Lowering::IsRMWIndirCandidate:
// Returns true if the given operand is a candidate indirection for a read-modify-write
......@@ -2278,6 +2291,28 @@ void Lowering::ContainCheckSIMD(GenTreeSIMD* simdNode)
}
#endif // FEATURE_SIMD
#ifdef FEATURE_HW_INTRINSICS
//----------------------------------------------------------------------------------------------
// ContainCheckHWIntrinsic: Perform containment analysis for a hardware intrinsic node.
//
// Arguments:
// node - The hardware intrinsic node.
//
void Lowering::ContainCheckHWIntrinsic(GenTreeHWIntrinsic* node)
{
NamedIntrinsic intrinsicID = node->gtHWIntrinsicId;
GenTree* op1 = node->gtOp.gtOp1;
GenTree* op2 = node->gtOp.gtOp2;
switch (node->gtHWIntrinsicId)
{
default:
assert((intrinsicID > NI_HW_INTRINSIC_START) && (intrinsicID < NI_HW_INTRINSIC_END));
break;
}
}
#endif // FEATURE_HW_INTRINSICS
//------------------------------------------------------------------------
// ContainCheckFloatBinary: determine whether the sources of a floating point binary node should be contained.
//
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册