Skip to content

Commit

Permalink
Revert r216803 "[MachineSinking] Clear kill flag of all operands at a…
Browse files Browse the repository at this point in the history
…ll their uses."

This reverts commit r216803, because it might have broken the buildbot.
The issue is tracked in PR20842.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217120 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ributzka committed Sep 4, 2014
1 parent 319b5d0 commit cd72c21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 40 deletions.
16 changes: 3 additions & 13 deletions lib/CodeGen/MachineSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,19 +724,9 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) {
++MachineBasicBlock::iterator(DbgMI));
}

// When sinking the instruction the live time of its operands can be extended
// bejond their original last use (marked with a kill flag). Conservatively
// clear the kill flag in all instructions that use the same operand
// registers.
for (auto &MO : MI->uses())
if (MO.isReg() && MO.isUse()) {
// Preserve the kill flag for this instruction.
bool IsKill = MO.isKill();
// Clear the kill flag in all instruction that use this operand.
MRI->clearKillFlags(MO.getReg());
// Restore the kill flag for only this instruction.
MO.setIsKill(IsKill);
}
// Conservatively, clear any kill flags, since it's possible that they are no
// longer correct.
MI->clearKillInfo();

return true;
}
27 changes: 0 additions & 27 deletions test/CodeGen/AArch64/fast-isel-machine-sink.ll

This file was deleted.

0 comments on commit cd72c21

Please sign in to comment.