Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/coreclr/jit/async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ void AsyncLiveness::StartBlock(BasicBlock* block)
//
void AsyncLiveness::Update(GenTree* node)
{
m_updater.UpdateLife(node);
m_updater.UpdateLife<true>(node);
}

//------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ void CodeGen::genMarkLabelsForCodegen()

void CodeGenInterface::genUpdateLife(GenTree* tree)
{
treeLifeUpdater->UpdateLife(tree);
treeLifeUpdater->UpdateLife<false>(tree);
}

void CodeGenInterface::genUpdateLife(VARSET_VALARG_TP newLife)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/copyprop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ bool Compiler::optBlockCopyProp(BasicBlock* block, LclNumToLiveDefsMap* curSsaNa
// SSA renaming process.
for (GenTree* const tree : stmt->TreeList())
{
treeLifeUpdater.UpdateLife(tree);
treeLifeUpdater.UpdateLife<false>(tree);

if (tree->OperIsSsaDef())
{
Expand Down
10 changes: 9 additions & 1 deletion src/coreclr/jit/treelifeupdater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLifeVar(GenTree* tree, GenTreeLclVarComm
// tree - the tree which effect on liveness is processed.
//
template <bool ForCodeGen>
template <bool GeneralLclAddrHandling>
void TreeLifeUpdater<ForCodeGen>::UpdateLife(GenTree* tree)
{
assert(m_compiler->GetCurLVEpoch() == epoch);
Expand All @@ -299,7 +300,7 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLife(GenTree* tree)
{
UpdateLifeVar(tree, tree->AsLclVarCommon());
}
else if (tree->OperIsIndir() && tree->AsIndir()->Addr()->OperIs(GT_LCL_ADDR))
else if (!GeneralLclAddrHandling && tree->OperIsIndir() && tree->AsIndir()->Addr()->OperIs(GT_LCL_ADDR))
{
UpdateLifeVar(tree, tree->AsIndir()->Addr()->AsLclVarCommon());
}
Expand All @@ -311,6 +312,10 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLife(GenTree* tree)
};
tree->VisitLocalDefNodes(m_compiler, visitDef);
}
else if (GeneralLclAddrHandling && tree->OperIs(GT_LCL_ADDR))
{
UpdateLifeVar(tree, tree->AsLclVarCommon());
}
}

//------------------------------------------------------------------------
Expand Down Expand Up @@ -405,3 +410,6 @@ void TreeLifeUpdater<ForCodeGen>::DumpLifeDelta(GenTree* tree)

template class TreeLifeUpdater<true>;
template class TreeLifeUpdater<false>;
template void TreeLifeUpdater<false>::UpdateLife<false>(GenTree*);
template void TreeLifeUpdater<false>::UpdateLife<true>(GenTree*);
template void TreeLifeUpdater<true>::UpdateLife<false>(GenTree*);
1 change: 1 addition & 0 deletions src/coreclr/jit/treelifeupdater.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class TreeLifeUpdater
{
public:
TreeLifeUpdater(Compiler* compiler);
template <bool GeneralLclAddrHandling>
void UpdateLife(GenTree* tree);
bool UpdateLifeFieldVar(GenTreeLclVar* lclNode, unsigned multiRegIndex);

Expand Down
Loading