Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
20761d0b
R
runtime
项目概览
dotNET Platform
/
runtime
11 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
runtime
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
20761d0b
编写于
3月 27, 2022
作者:
E
Egor Bogatov
提交者:
GitHub
3月 27, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[arm64] JIT: Move LowerSIMD to shared lower.cpp (#67190)
上级
a56b1066
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
63 addition
and
85 deletion
+63
-85
src/coreclr/jit/lower.cpp
src/coreclr/jit/lower.cpp
+63
-0
src/coreclr/jit/lowerarmarch.cpp
src/coreclr/jit/lowerarmarch.cpp
+0
-22
src/coreclr/jit/lowerxarch.cpp
src/coreclr/jit/lowerxarch.cpp
+0
-63
未找到文件。
src/coreclr/jit/lower.cpp
浏览文件 @
20761d0b
...
...
@@ -7386,3 +7386,66 @@ bool Lowering::TryTransformStoreObjAsStoreInd(GenTreeBlk* blkNode)
LowerStoreIndirCommon
(
blkNode
->
AsStoreInd
());
return
true
;
}
#ifdef FEATURE_SIMD
//----------------------------------------------------------------------------------------------
// Lowering::LowerSIMD: Perform containment analysis for a SIMD intrinsic node.
//
// Arguments:
// simdNode - The SIMD intrinsic node.
//
void
Lowering
::
LowerSIMD
(
GenTreeSIMD
*
simdNode
)
{
if
(
simdNode
->
TypeGet
()
==
TYP_SIMD12
)
{
// GT_SIMD node requiring to produce TYP_SIMD12 in fact
// produces a TYP_SIMD16 result
simdNode
->
gtType
=
TYP_SIMD16
;
}
if
(
simdNode
->
GetSIMDIntrinsicId
()
==
SIMDIntrinsicInitN
)
{
assert
(
simdNode
->
GetSimdBaseType
()
==
TYP_FLOAT
);
size_t
argCount
=
simdNode
->
GetOperandCount
();
size_t
constArgCount
=
0
;
float
constArgValues
[
4
]{
0
,
0
,
0
,
0
};
for
(
GenTree
*
arg
:
simdNode
->
Operands
())
{
assert
(
arg
->
TypeIs
(
simdNode
->
GetSimdBaseType
()));
if
(
arg
->
IsCnsFltOrDbl
())
{
constArgValues
[
constArgCount
]
=
static_cast
<
float
>
(
arg
->
AsDblCon
()
->
gtDconVal
);
constArgCount
++
;
}
}
if
(
constArgCount
==
argCount
)
{
for
(
GenTree
*
arg
:
simdNode
->
Operands
())
{
BlockRange
().
Remove
(
arg
);
}
assert
(
sizeof
(
constArgValues
)
==
16
);
unsigned
cnsSize
=
sizeof
(
constArgValues
);
unsigned
cnsAlign
=
(
comp
->
compCodeOpt
()
!=
Compiler
::
SMALL_CODE
)
?
cnsSize
:
1
;
CORINFO_FIELD_HANDLE
hnd
=
comp
->
GetEmitter
()
->
emitBlkConst
(
constArgValues
,
cnsSize
,
cnsAlign
,
simdNode
->
GetSimdBaseType
());
GenTree
*
clsVarAddr
=
new
(
comp
,
GT_CLS_VAR_ADDR
)
GenTreeClsVar
(
GT_CLS_VAR_ADDR
,
TYP_I_IMPL
,
hnd
,
nullptr
);
BlockRange
().
InsertBefore
(
simdNode
,
clsVarAddr
);
simdNode
->
ChangeOper
(
GT_IND
);
simdNode
->
AsOp
()
->
gtOp1
=
clsVarAddr
;
ContainCheckIndir
(
simdNode
->
AsIndir
());
return
;
}
}
ContainCheckSIMD
(
simdNode
);
}
#endif // FEATURE_SIMD
src/coreclr/jit/lowerarmarch.cpp
浏览文件 @
20761d0b
...
...
@@ -612,28 +612,6 @@ void Lowering::LowerRotate(GenTree* tree)
ContainCheckShiftRotate
(
tree
->
AsOp
());
}
#ifdef FEATURE_SIMD
//----------------------------------------------------------------------------------------------
// Lowering::LowerSIMD: Perform containment analysis for a SIMD intrinsic node.
//
// Arguments:
// simdNode - The SIMD intrinsic node.
//
void
Lowering
::
LowerSIMD
(
GenTreeSIMD
*
simdNode
)
{
assert
(
simdNode
->
gtType
!=
TYP_SIMD32
);
if
(
simdNode
->
TypeGet
()
==
TYP_SIMD12
)
{
// GT_SIMD node requiring to produce TYP_SIMD12 in fact
// produces a TYP_SIMD16 result
simdNode
->
gtType
=
TYP_SIMD16
;
}
ContainCheckSIMD
(
simdNode
);
}
#endif // FEATURE_SIMD
#ifdef FEATURE_HW_INTRINSICS
//----------------------------------------------------------------------------------------------
...
...
src/coreclr/jit/lowerxarch.cpp
浏览文件 @
20761d0b
...
...
@@ -755,69 +755,6 @@ void Lowering::LowerCast(GenTree* tree)
ContainCheckCast
(
tree
->
AsCast
());
}
#ifdef FEATURE_SIMD
//----------------------------------------------------------------------------------------------
// Lowering::LowerSIMD: Perform containment analysis for a SIMD intrinsic node.
//
// Arguments:
// simdNode - The SIMD intrinsic node.
//
void
Lowering
::
LowerSIMD
(
GenTreeSIMD
*
simdNode
)
{
if
(
simdNode
->
TypeGet
()
==
TYP_SIMD12
)
{
// GT_SIMD node requiring to produce TYP_SIMD12 in fact
// produces a TYP_SIMD16 result
simdNode
->
gtType
=
TYP_SIMD16
;
}
if
(
simdNode
->
GetSIMDIntrinsicId
()
==
SIMDIntrinsicInitN
)
{
assert
(
simdNode
->
GetSimdBaseType
()
==
TYP_FLOAT
);
size_t
argCount
=
simdNode
->
GetOperandCount
();
size_t
constArgCount
=
0
;
float
constArgValues
[
4
]{
0
,
0
,
0
,
0
};
for
(
GenTree
*
arg
:
simdNode
->
Operands
())
{
assert
(
arg
->
TypeIs
(
simdNode
->
GetSimdBaseType
()));
if
(
arg
->
IsCnsFltOrDbl
())
{
constArgValues
[
constArgCount
]
=
static_cast
<
float
>
(
arg
->
AsDblCon
()
->
gtDconVal
);
constArgCount
++
;
}
}
if
(
constArgCount
==
argCount
)
{
for
(
GenTree
*
arg
:
simdNode
->
Operands
())
{
BlockRange
().
Remove
(
arg
);
}
assert
(
sizeof
(
constArgValues
)
==
16
);
unsigned
cnsSize
=
sizeof
(
constArgValues
);
unsigned
cnsAlign
=
(
comp
->
compCodeOpt
()
!=
Compiler
::
SMALL_CODE
)
?
cnsSize
:
1
;
CORINFO_FIELD_HANDLE
hnd
=
comp
->
GetEmitter
()
->
emitBlkConst
(
constArgValues
,
cnsSize
,
cnsAlign
,
simdNode
->
GetSimdBaseType
());
GenTree
*
clsVarAddr
=
new
(
comp
,
GT_CLS_VAR_ADDR
)
GenTreeClsVar
(
GT_CLS_VAR_ADDR
,
TYP_I_IMPL
,
hnd
,
nullptr
);
BlockRange
().
InsertBefore
(
simdNode
,
clsVarAddr
);
simdNode
->
ChangeOper
(
GT_IND
);
simdNode
->
AsOp
()
->
gtOp1
=
clsVarAddr
;
ContainCheckIndir
(
simdNode
->
AsIndir
());
return
;
}
}
ContainCheckSIMD
(
simdNode
);
}
#endif // FEATURE_SIMD
#ifdef FEATURE_HW_INTRINSICS
//----------------------------------------------------------------------------------------------
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录