[llvm-commits] CVS: llvm/lib/CodeGen/MachineInstr.cpp
Evan Cheng
evan.cheng at apple.com
Sat Nov 11 02:20:19 PST 2006
Changes in directory llvm/lib/CodeGen:
MachineInstr.cpp updated: 1.128 -> 1.129
---
Log message:
Add methods to add implicit def use operands to a MI.
---
Diffs of the changes: (+12 -0)
MachineInstr.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+)
Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.128 llvm/lib/CodeGen/MachineInstr.cpp:1.129
--- llvm/lib/CodeGen/MachineInstr.cpp:1.128 Fri Nov 10 02:38:19 2006
+++ llvm/lib/CodeGen/MachineInstr.cpp Sat Nov 11 04:20:02 2006
@@ -125,6 +125,18 @@
}
}
+/// addImplicitDefUseOperands - Add all implicit def and use operands to
+/// this instruction.
+void MachineInstr::addImplicitDefUseOperands() {
+ const TargetInstrDescriptor &TID = TargetInstrDescriptors[Opcode];
+ if (TID.ImplicitDefs)
+ for (const unsigned *ImpDefs = TID.ImplicitDefs; *ImpDefs; ++ImpDefs)
+ addRegOperand(*ImpDefs, true, true);
+ if (TID.ImplicitUses)
+ for (const unsigned *ImpUses = TID.ImplicitUses; *ImpUses; ++ImpUses)
+ addRegOperand(*ImpUses, false, true);
+}
+
void MachineInstr::dump() const {
std::cerr << " " << *this;
More information about the llvm-commits
mailing list