[llvm-commits] [llvm] r38496 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
Evan Cheng
evan.cheng at apple.com
Tue Jul 10 10:52:21 PDT 2007
Author: evancheng
Date: Tue Jul 10 12:52:20 2007
New Revision: 38496
URL: http://llvm.org/viewvc/llvm-project?rev=38496&view=rev
Log:
If the operand is marked M_OPTIONAL_DEF_OPERAND, then it's a def.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp?rev=38496&r1=38495&r2=38496&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Tue Jul 10 12:52:20 2007
@@ -323,7 +323,10 @@
// Get/emit the operand.
unsigned VReg = getVR(Op, VRBaseMap);
- MI->addRegOperand(VReg, false);
+ const TargetInstrDescriptor *TID = MI->getInstrDescriptor();
+ bool isOptDef = (IIOpNum < TID->numOperands)
+ ? (TID->OpInfo[IIOpNum].Flags & M_OPTIONAL_DEF_OPERAND) : false;
+ MI->addRegOperand(VReg, isOptDef);
// Verify that it is right.
assert(MRegisterInfo::isVirtualRegister(VReg) && "Not a vreg?");
More information about the llvm-commits
mailing list