Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
jit format
  • Loading branch information
kunalspathak authored and github-actions committed Sep 7, 2021
commit 60cbf4d2627a84d219fbb75c49de94c19528ceb3
3 changes: 2 additions & 1 deletion src/coreclr/jit/lclvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4154,7 +4154,8 @@ void Compiler::lvaMarkLclRefs(GenTree* tree, BasicBlock* block, Statement* stmt,
bool bbIsReturn = block->bbJumpKind == BBJ_RETURN;
// TODO: Zero-inits in LSRA are created with below condition. But if filter out based on that condition
// we filter lot of interesting variables that would benefit otherwise with EH var enregistration.
//bool needsExplicitZeroInit = !varDsc->lvIsParam && (info.compInitMem || varTypeIsGC(varDsc->TypeGet()));
// bool needsExplicitZeroInit = !varDsc->lvIsParam && (info.compInitMem ||
// varTypeIsGC(varDsc->TypeGet()));
bool needsExplicitZeroInit = fgVarNeedsExplicitZeroInit(lclNum, bbInALoop, bbIsReturn);

if (varDsc->lvSingleDefRegCandidate || needsExplicitZeroInit)
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/jit/lsra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4949,6 +4949,7 @@ void LinearScan::allocateRegisters()
{
// For RefTypeZeroInit which is a write thru, there is no need to allocate register
// right away. It can be assigned when actually definition occurs.
// In future, see if avoiding allocation for RefTypeZeroInit gives any benefit in general.
allocate = false;
}
if (!allocate)
Expand Down