[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h

Evan Cheng evan.cheng at apple.com
Wed Apr 25 00:24:42 PDT 2007



Changes in directory llvm/include/llvm/CodeGen:

MachineInstr.h updated: 1.215 -> 1.216
---
Log message:

Minor speed tweak.

---
Diffs of the changes:  (+3 -4)

 MachineInstr.h |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)


Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.215 llvm/include/llvm/CodeGen/MachineInstr.h:1.216
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.215	Mon Mar 26 17:37:45 2007
+++ llvm/include/llvm/CodeGen/MachineInstr.h	Wed Apr 25 02:24:13 2007
@@ -517,13 +517,12 @@
   MachineOperand &AddNewOperand(bool IsImp = false) {
     assert((IsImp || !OperandsComplete()) &&
            "Trying to add an operand to a machine instr that is already done!");
-    if (NumImplicitOps == 0) { // This is true most of the time.
+    if (IsImp || NumImplicitOps == 0) { // This is true most of the time.
       Operands.push_back(MachineOperand());
       return Operands.back();
-    } else {
-      return *Operands.insert(Operands.begin()+Operands.size()-NumImplicitOps,
-                              MachineOperand());
     }
+    return *Operands.insert(Operands.begin()+Operands.size()-NumImplicitOps,
+                            MachineOperand());
   }
 
   /// addImplicitDefUseOperands - Add all implicit def and use operands to






More information about the llvm-commits mailing list