projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
11ce02d
)
If the operand is marked M_OPTIONAL_DEF_OPERAND, then it's a def.
author
Evan Cheng
<evan.cheng@apple.com>
Tue, 10 Jul 2007 17:52:20 +0000
(17:52 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Tue, 10 Jul 2007 17:52:20 +0000
(17:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38496
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index a1cb244e6b90025edf0f8ff04fd55ef644f3c31f..2252e7dcd795a4880fc5d6f405bb66d7497dc573 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/
lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@
-323,7
+323,10
@@
void ScheduleDAG::AddOperand(MachineInstr *MI, SDOperand Op,
// 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?");