aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-10 21:43:11 +0000
committerChris Lattner <sabre@nondot.org>2004-02-10 21:43:11 +0000
commitd6b5e5f637c87c156a5464cf23ecc7419ae7254f (patch)
treec93f947a5702b965fc450039fee270a9a99b55d2
parent376ad9fa9f66facc7100186f0a1f56c1be858ff5 (diff)
Urg, the X86 backend DOES use virtual register operands. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11288 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/MachineInstr.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index b148baa85d..aa0ae5cfdb 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -220,12 +220,15 @@ public:
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; }