[llvm-commits] [llvm] r85638 - /llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
Dan Gohman
gohman at apple.com
Fri Oct 30 16:57:48 PDT 2009
Author: djg
Date: Fri Oct 30 18:57:47 2009
New Revision: 85638
URL: http://llvm.org/viewvc/llvm-project?rev=85638&view=rev
Log:
Don't mark registers dead here when processing nodes with MVT::Flag
results. This works around a problem affecting targets which rely on
MVT::Flag to handle physical register defs.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp?rev=85638&r1=85637&r2=85638&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Fri Oct 30 18:57:47 2009
@@ -573,7 +573,11 @@
unsigned Reg = II.getImplicitDefs()[i - II.getNumDefs()];
if (Node->hasAnyUseOfValue(i))
EmitCopyFromReg(Node, i, IsClone, IsCloned, Reg, VRBaseMap);
- else
+ // If there are no uses, mark the register as dead now, so that
+ // MachineLICM/Sink can see that it's dead. Don't do this if the
+ // node has a Flag value, for the benefit of targets still using
+ // Flag for values in physregs.
+ else if (Node->getValueType(Node->getNumValues()-1) != MVT::Flag)
MI->addRegisterDead(Reg, TRI);
}
}
More information about the llvm-commits
mailing list