[llvm-commits] CVS: llvm/lib/CodeGen/MachineInstr.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Aug 4 00:00:21 PDT 2003


Changes in directory llvm/lib/CodeGen:

MachineInstr.cpp updated: 1.74 -> 1.75

---
Log message:

Simplify code, eliminating the need for the X86 isVoid target instr flag


---
Diffs of the changes:

Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.74 llvm/lib/CodeGen/MachineInstr.cpp:1.75
--- llvm/lib/CodeGen/MachineInstr.cpp:1.74	Sun Aug  3 15:24:29 2003
+++ llvm/lib/CodeGen/MachineInstr.cpp	Sun Aug  3 16:51:45 2003
@@ -126,10 +126,11 @@
   operands[i].value = NULL;
   operands[i].regNum = regNum;
 
-  if (isdef || TargetInstrDescriptors[opCode].resultPos == (int) i)
+  if (isdef || TargetInstrDescriptors[opCode].resultPos == (int)i) {
+    assert(operands[i].flags == MachineOperand::DEFONLYFLAG &&
+           "Shouldn't be changing a register type once set!");
     operands[i].flags = MachineOperand::DEFONLYFLAG;
-  else
-    operands[i].flags = 0;
+  }
 
   insertUsedReg(regNum);
 }





More information about the llvm-commits mailing list