diff options
author | Dan Gohman <gohman@apple.com> | 2010-05-13 20:34:42 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-05-13 20:34:42 +0000 |
commit | c90f51c00bd527970c45299df108ed0e01b055a9 (patch) | |
tree | e23064c791737d29071c967ec120a0df263e03bd /llvm/lib/CodeGen/MachineSink.cpp | |
parent | 83887a7d3a1cfb0901850c09f57be335fe245cb0 (diff) | |
download | bcm5719-llvm-c90f51c00bd527970c45299df108ed0e01b055a9.tar.gz bcm5719-llvm-c90f51c00bd527970c45299df108ed0e01b055a9.zip |
Teach MachineLICM and MachineSink how to clear kill flags conservatively
when they move instructions.
llvm-svn: 103737
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineSink.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index ef489dc5560..1610e6c9610 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/lib/CodeGen/MachineSink.cpp @@ -314,5 +314,10 @@ bool MachineSinking::SinkInstruction(MachineInstr *MI, bool &SawStore) { // Move the instruction. SuccToSinkTo->splice(InsertPos, ParentBlock, MI, ++MachineBasicBlock::iterator(MI)); + + // Conservatively, clear any kill flags, since it's possible that + // they are no longer correct. + MI->clearKillInfo(); + return true; } |