[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h
Alkis Evlogimenos
alkis at niobe.cs.uiuc.edu
Sun Feb 22 00:55:01 PST 2004
Changes in directory llvm/include/llvm/CodeGen:
MachineInstr.h updated: 1.137 -> 1.138
---
Log message:
When folding memory operands in machine instructions be careful to
leave register operands with the same use/def flags as the original
instruction.
---
Diffs of the changes: (+7 -0)
Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.137 llvm/include/llvm/CodeGen/MachineInstr.h:1.138
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.137 Mon Feb 16 01:17:43 2004
+++ llvm/include/llvm/CodeGen/MachineInstr.h Sun Feb 22 00:54:26 2004
@@ -197,6 +197,13 @@
///
MachineOperandType getType() const { return opType; }
+ /// getUseType - Returns the MachineOperandUseType of this operand.
+ ///
+ MOTy::UseType getUseType() const {
+ return isUse() ^ isDef() ? MOTy::UseAndDef :
+ (isUse() ? MOTy::Use : MOTy::Def);
+ }
+
/// isPCRelative - This returns the value of the PCRELATIVE flag, which
/// indicates whether this operand should be emitted as a PC relative value
/// instead of a global address. This is used for operands of the forms:
More information about the llvm-commits
mailing list