Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
[Merge chakra-core/ChakraCore@177a7beaae] [1.6>1.7] [MERGE #3496 @Mik…
Browse files Browse the repository at this point in the history
…eHolman] remove invalid special case in regalloc

Merge pull request #3496 from MikeHolman:regalloc

We had special case in regalloc if we are storing to a tmp reg and the next instr has the same dst, we don't need to insert a store. Unfortunately, this is invalid in case the sym is also a source of the next instr.

Benchmark perf is flat.

OS: 11480955
  • Loading branch information
chakrabot authored and kfarnung committed Aug 10, 2017
1 parent bf0b020 commit 569128f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions deps/chakrashim/core/lib/Backend/LinearScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,6 @@ LinearScan::SetDstReg(IR::Instr *instr)
return;
}


if (reg == RegNOREG)
{
IR::Opnd *src = instr->GetSrc1();
Expand All @@ -908,13 +907,7 @@ LinearScan::SetDstReg(IR::Instr *instr)
if (!lifetime->isDeadStore && !lifetime->isSecondChanceAllocated)
{
// Insert a store since the lifetime is spilled
IR::Opnd *nextDst = instr->m_next->GetDst();

// Don't need the store however if the next instruction has the same dst
if (nextDst == nullptr || !nextDst->IsEqual(regOpnd))
{
this->InsertStore(instr, regOpnd->m_sym, reg);
}
this->InsertStore(instr, regOpnd->m_sym, reg);
}
}
else
Expand Down

0 comments on commit 569128f

Please sign in to comment.