[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Dec 15 16:06:01 PST 2002
Changes in directory llvm/include/llvm/CodeGen:
MachineInstr.h updated: 1.91 -> 1.92
---
Log message:
Add new opIsUse method
---
Diffs of the changes:
Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.91 llvm/include/llvm/CodeGen/MachineInstr.h:1.92
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.91 Sun Dec 15 02:01:02 2002
+++ llvm/include/llvm/CodeGen/MachineInstr.h Sun Dec 15 16:05:02 2002
@@ -84,12 +84,14 @@
private:
// Bit fields of the flags variable used for different operand properties
- static const char DEFFLAG = 0x1; // this is a def of the operand
- static const char DEFUSEFLAG = 0x2; // this is both a def and a use
- static const char HIFLAG32 = 0x4; // operand is %hi32(value_or_immedVal)
- static const char LOFLAG32 = 0x8; // operand is %lo32(value_or_immedVal)
+ static const char DEFFLAG = 0x01; // this is a def of the operand
+ static const char DEFUSEFLAG = 0x02; // this is both a def and a use
+ static const char HIFLAG32 = 0x04; // operand is %hi32(value_or_immedVal)
+ static const char LOFLAG32 = 0x08; // operand is %lo32(value_or_immedVal)
static const char HIFLAG64 = 0x10; // operand is %hi64(value_or_immedVal)
static const char LOFLAG64 = 0x20; // operand is %lo64(value_or_immedVal)
+
+ static const char USEDEFMASK = 0x03;
private:
union {
@@ -203,6 +205,7 @@
return MBB;
}
+ bool opIsUse () const { return (flags & USEDEFMASK) == 0; }
bool opIsDef () const { return flags & DEFFLAG; }
bool opIsDefAndUse () const { return flags & DEFUSEFLAG; }
bool opHiBits32 () const { return flags & HIFLAG32; }
More information about the llvm-commits
mailing list