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

Chris Lattner lattner at cs.uiuc.edu
Tue Feb 10 15:44:03 PST 2004


Changes in directory llvm/include/llvm/CodeGen:

MachineInstr.h updated: 1.125 -> 1.126

---
Log message:

Urg, the X86 backend DOES use virtual register operands. :(


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

Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.125 llvm/include/llvm/CodeGen/MachineInstr.h:1.126
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.125	Tue Feb 10 15:21:17 2004
+++ llvm/include/llvm/CodeGen/MachineInstr.h	Tue Feb 10 15:43:11 2004
@@ -220,12 +220,15 @@
   bool isPCRelative() const { return (flags & PCRELATIVE) != 0; }
 
 
-  /// isRegister - Return true if this operand is a register operand.
+  /// isRegister - Return true if this operand is a register operand.  The X86
+  /// backend currently can't decide whether to use MO_MR or MO_VR to represent
+  /// them, so we accept both.
   ///
-  /// Note: In the sparc backend, this only returns true for "machine
-  /// registers", not for "virtual registers".
+  /// Note: The sparc backend should not use this method.
   ///
-  bool isRegister() const { return opType == MO_MachineRegister; }
+  bool isRegister() const {
+    return opType == MO_MachineRegister || opType == MO_VirtualRegister;
+  }
 
   bool isMachineBasicBlock() const { return opType == MO_MachineBasicBlock; }
   bool isPCRelativeDisp() const { return opType == MO_PCRelativeDisp; }





More information about the llvm-commits mailing list