Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
87bb2436
R
runtime
项目概览
dotNET Platform
/
runtime
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
87bb2436
编写于
2月 04, 2020
作者:
S
Sergey Andreenko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Small refactoring changes.
上级
65587ba7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
25 addition
and
17 deletion
+25
-17
src/coreclr/src/jit/codegenxarch.cpp
src/coreclr/src/jit/codegenxarch.cpp
+2
-1
src/coreclr/src/jit/importer.cpp
src/coreclr/src/jit/importer.cpp
+8
-6
src/coreclr/src/jit/lower.cpp
src/coreclr/src/jit/lower.cpp
+5
-5
src/coreclr/src/jit/lower.h
src/coreclr/src/jit/lower.h
+2
-2
src/coreclr/src/jit/lsrabuild.cpp
src/coreclr/src/jit/lsrabuild.cpp
+6
-2
src/coreclr/src/jit/morph.cpp
src/coreclr/src/jit/morph.cpp
+2
-1
未找到文件。
src/coreclr/src/jit/codegenxarch.cpp
浏览文件 @
87bb2436
...
...
@@ -4557,7 +4557,8 @@ void CodeGen::genCodeForLclVar(GenTreeLclVar* tree)
// lcl_vars are not defs
assert
((
tree
->
gtFlags
&
GTF_VAR_DEF
)
==
0
);
bool
isRegCandidate
=
compiler
->
lvaTable
[
tree
->
GetLclNum
()].
lvIsRegCandidate
();
LclVarDsc
*
varDsc
=
compiler
->
lvaGetDesc
(
tree
);
bool
isRegCandidate
=
varDsc
->
lvIsRegCandidate
();
// If this is a register candidate that has been spilled, genConsumeReg() will
// reload it at the point of use. Otherwise, if it's not in a register, we load it here.
...
...
src/coreclr/src/jit/importer.cpp
浏览文件 @
87bb2436
...
...
@@ -1214,7 +1214,9 @@ GenTree* Compiler::impAssignStructPtr(GenTree* destAddr,
// If it is a multi-reg struct return, don't change the oper to GT_LCL_FLD.
// That is, the IR will be of the form lclVar = call for multi-reg return
//
GenTreeLclVar* lcl = destAddr->AsOp()->gtOp1->AsLclVar();
GenTreeLclVar* lcl = destAddr->AsOp()->gtOp1->AsLclVar();
unsigned lclNum = lcl->GetLclNum();
LclVarDsc* varDsc = lvaGetDesc(lclNum);
if (src->AsCall()->HasMultiRegRetVal())
{
// Mark the struct LclVar as used in a MultiReg return context
...
...
@@ -1222,13 +1224,13 @@ GenTree* Compiler::impAssignStructPtr(GenTree* destAddr,
// TODO-1stClassStructs: Eliminate this pessimization when we can more generally
// handle multireg returns.
lcl->gtFlags |= GTF_DONT_CSE;
lvaTable[lcl->AsLclVarCommon()->GetLclNum()].
lvIsMultiRegRet = true;
varDsc->
lvIsMultiRegRet = true;
}
else if (lcl->gtType != src->gtType)
{
// We change this to a GT_LCL_FLD (from a GT_ADDR of a GT_LCL_VAR)
lcl->ChangeOper(GT_LCL_FLD);
fgLclFldAssign(lcl
->AsLclVarCommon()->GetLclNum()
);
fgLclFldAssign(lcl
Num
);
lcl->gtType = src->gtType;
asgType = src->gtType;
}
...
...
@@ -1238,7 +1240,7 @@ GenTree* Compiler::impAssignStructPtr(GenTree* destAddr,
#if defined(TARGET_ARM)
// TODO-Cleanup: This should have been taken care of in the above HasMultiRegRetVal() case,
// but that method has not been updadted to include ARM.
impMarkLclDstNotPromotable(lcl
->AsLclVarCommon()->GetLclNum()
, src, structHnd);
impMarkLclDstNotPromotable(lcl
Num
, src, structHnd);
lcl->gtFlags |= GTF_DONT_CSE;
#elif defined(UNIX_AMD64_ABI)
// Not allowed for FEATURE_CORCLR which is the only SKU available for System V OSs.
...
...
@@ -1250,7 +1252,7 @@ GenTree* Compiler::impAssignStructPtr(GenTree* destAddr,
// TODO-Cleanup: Why is this needed here? This seems that it will set this even for
// non-multireg returns.
lcl->gtFlags |= GTF_DONT_CSE;
lvaTable[lcl->AsLclVarCommon()->GetLclNum()].
lvIsMultiRegRet = true;
varDsc->
lvIsMultiRegRet = true;
#endif
}
else // we don't have a GT_ADDR of a GT_LCL_VAR
...
...
@@ -2558,7 +2560,7 @@ BasicBlock* Compiler::impPushCatchArgOnStack(BasicBlock* hndBlk, CORINFO_CLASS_H
#if defined(JIT32_GCENCODER)
const bool forceInsertNewBlock = isSingleBlockFilter || compStressCompile(STRESS_CATCH_ARG, 5);
#else
const bool forceInsertNewBlock
= compStressCompile(STRESS_CATCH_ARG, 5);
const bool forceInsertNewBlock = compStressCompile(STRESS_CATCH_ARG, 5);
#endif // defined(JIT32_GCENCODER)
/* Spill GT_CATCH_ARG to a temp if there are jumps to the beginning of the handler */
...
...
src/coreclr/src/jit/lower.cpp
浏览文件 @
87bb2436
...
...
@@ -190,7 +190,7 @@ GenTree* Lowering::LowerNode(GenTree* node)
break
;
case
GT_RETURN
:
LowerRet
(
node
);
LowerRet
(
node
->
AsUnOp
()
);
break
;
case
GT_RETURNTRAP
:
...
...
@@ -3084,7 +3084,7 @@ void Lowering::LowerJmpMethod(GenTree* jmp)
}
// Lower GT_RETURN node to insert PInvoke method epilog if required.
void
Lowering
::
LowerRet
(
GenTree
*
ret
)
void
Lowering
::
LowerRet
(
GenTree
UnOp
*
ret
)
{
assert
(
ret
->
OperGet
()
==
GT_RETURN
);
...
...
@@ -3097,7 +3097,7 @@ void Lowering::LowerRet(GenTree* ret)
(
varTypeUsesFloatReg
(
ret
)
!=
varTypeUsesFloatReg
(
ret
->
gtGetOp1
())))
{
GenTreeUnOp
*
bitcast
=
new
(
comp
,
GT_BITCAST
)
GenTreeOp
(
GT_BITCAST
,
ret
->
TypeGet
(),
ret
->
gtGetOp1
(),
nullptr
);
ret
->
AsOp
()
->
gtOp1
=
bitcast
;
ret
->
gtOp1
=
bitcast
;
BlockRange
().
InsertBefore
(
ret
,
bitcast
);
ContainCheckBitCast
(
bitcast
);
}
...
...
@@ -3107,7 +3107,7 @@ void Lowering::LowerRet(GenTree* ret)
{
InsertPInvokeMethodEpilog
(
comp
->
compCurBB
DEBUGARG
(
ret
));
}
ContainCheckRet
(
ret
->
AsOp
()
);
ContainCheckRet
(
ret
);
}
GenTree
*
Lowering
::
LowerDirectCall
(
GenTreeCall
*
call
)
...
...
@@ -5764,7 +5764,7 @@ void Lowering::ContainCheckLclHeap(GenTreeOp* node)
// Arguments:
// node - pointer to the node
//
void
Lowering
::
ContainCheckRet
(
GenTreeOp
*
ret
)
void
Lowering
::
ContainCheckRet
(
GenTree
Un
Op
*
ret
)
{
assert
(
ret
->
OperIs
(
GT_RETURN
));
...
...
src/coreclr/src/jit/lower.h
浏览文件 @
87bb2436
...
...
@@ -83,7 +83,7 @@ private:
void
ContainCheckReturnTrap
(
GenTreeOp
*
node
);
void
ContainCheckArrOffset
(
GenTreeArrOffs
*
node
);
void
ContainCheckLclHeap
(
GenTreeOp
*
node
);
void
ContainCheckRet
(
GenTree
Op
*
node
);
void
ContainCheckRet
(
GenTree
UnOp
*
ret
);
void
ContainCheckJTrue
(
GenTreeOp
*
node
);
void
ContainCheckBitCast
(
GenTree
*
node
);
...
...
@@ -133,7 +133,7 @@ private:
GenTree
*
LowerJTrue
(
GenTreeOp
*
jtrue
);
GenTreeCC
*
LowerNodeCC
(
GenTree
*
node
,
GenCondition
condition
);
void
LowerJmpMethod
(
GenTree
*
jmp
);
void
LowerRet
(
GenTree
*
ret
);
void
LowerRet
(
GenTree
UnOp
*
ret
);
GenTree
*
LowerDelegateInvoke
(
GenTreeCall
*
call
);
GenTree
*
LowerIndirectNonvirtCall
(
GenTreeCall
*
call
);
GenTree
*
LowerDirectCall
(
GenTreeCall
*
call
);
...
...
src/coreclr/src/jit/lsrabuild.cpp
浏览文件 @
87bb2436
...
...
@@ -2473,14 +2473,18 @@ void setTgtPref(Interval* interval, RefPosition* tgtPrefUse)
RefPosition
*
LinearScan
::
BuildDef
(
GenTree
*
tree
,
regMaskTP
dstCandidates
,
int
multiRegIdx
)
{
assert
(
!
tree
->
isContained
());
RegisterType
type
=
getDefType
(
tree
);
if
(
dstCandidates
!=
RBM_NONE
)
{
assert
((
tree
->
GetRegNum
()
==
REG_NA
)
||
(
dstCandidates
==
genRegMask
(
tree
->
GetRegByIndex
(
multiRegIdx
))));
}
if
(
tree
->
IsMultiRegNode
())
RegisterType
type
=
getDefType
(
tree
);
if
(
!
tree
->
IsMultiRegNode
())
{
type
=
getDefType
(
tree
);
}
else
{
type
=
tree
->
GetRegTypeByIndex
(
multiRegIdx
);
}
...
...
src/coreclr/src/jit/morph.cpp
浏览文件 @
87bb2436
...
...
@@ -8888,7 +8888,8 @@ GenTree* Compiler::fgMorphOneAsgBlockOp(GenTree* tree)
if (dest == destLclVarTree)
{
dest = gtNewIndir(asgType, gtNewOperNode(GT_ADDR, TYP_BYREF, dest));
GenTree* addr = gtNewOperNode(GT_ADDR, TYP_BYREF, dest);
dest = gtNewIndir(asgType, addr);
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录