[llvm-commits] [llvm] r117959 - /llvm/trunk/lib/CodeGen/SplitKit.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Nov 1 14:51:29 PDT 2010
Author: stoklund
Date: Mon Nov 1 16:51:29 2010
New Revision: 117959
URL: http://llvm.org/viewvc/llvm-project?rev=117959&view=rev
Log:
Update kill flags while rewriting instructions after splitting.
Modified:
llvm/trunk/lib/CodeGen/SplitKit.cpp
Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=117959&r1=117958&r2=117959&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SplitKit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SplitKit.cpp Mon Nov 1 16:51:29 2010
@@ -822,6 +822,7 @@
for (MachineRegisterInfo::reg_iterator RI = mri_.reg_begin(reg),
RE = mri_.reg_end(); RI != RE;) {
MachineOperand &MO = RI.getOperand();
+ unsigned OpNum = RI.getOperandNo();
MachineInstr *MI = MO.getParent();
++RI;
if (MI->isDebugValue()) {
@@ -844,6 +845,8 @@
DEBUG(dbgs() << " rewr BB#" << MI->getParent()->getNumber() << '\t'<< Idx);
assert(LI && "No register was live at use");
MO.setReg(LI->reg);
+ if (MO.isUse() && !MI->isRegTiedToDefOperand(OpNum))
+ MO.setIsKill(LI->killedAt(Idx.getDefIndex()));
DEBUG(dbgs() << '\t' << *MI);
}
}
More information about the llvm-commits
mailing list