Skip to content
Merged
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
Next Next commit
Do not allocate register if ZeroInit/EHWriteThru
  • Loading branch information
kunalspathak authored and github-actions committed Sep 7, 2021
commit d0095a563064ebb5e613416374b3845a7f576a06
6 changes: 6 additions & 0 deletions src/coreclr/jit/lsra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4945,6 +4945,12 @@ void LinearScan::allocateRegisters()
// it to a different register file.
allocate = false;
}
else if ((currentInterval->isWriteThru) && (refType == RefTypeZeroInit))
{
// For RefTypeZeroInit which is a write thru, there is no need to allocate register
// right away. It can be assigned when actually definition occurs.
allocate = false;
}
if (!allocate)
{
INDEBUG(dumpLsraAllocationEvent(LSRA_EVENT_NO_ENTRY_REG_ALLOCATED, currentInterval));
Expand Down