diff options
author | Juergen Ributzka <juergen@apple.com> | 2014-09-04 02:07:36 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2014-09-04 02:07:36 +0000 |
commit | 4bea494569b6e8bd83a01d229981eca98b8d6427 (patch) | |
tree | dc0bd41c28a6d76f461913b970878c1b65dbabea /llvm/lib/CodeGen/MachineSink.cpp | |
parent | 30c02e36cc1acde5d09117a9d6178f599d9e0109 (diff) | |
download | llvm-4bea494569b6e8bd83a01d229981eca98b8d6427.zip llvm-4bea494569b6e8bd83a01d229981eca98b8d6427.tar.gz llvm-4bea494569b6e8bd83a01d229981eca98b8d6427.tar.bz2 |
Revert r216803 "[MachineSinking] Clear kill flag of all operands at all their uses."
This reverts commit r216803, because it might have broken the buildbot.
The issue is tracked in PR20842.
llvm-svn: 217120
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineSink.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index edf8fc0..7782001 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/lib/CodeGen/MachineSink.cpp @@ -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; } |