[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h MachineInstrBuilder.h
Chris Lattner
lattner at cs.uiuc.edu
Thu May 4 10:21:37 PDT 2006
Changes in directory llvm/include/llvm/CodeGen:
MachineInstr.h updated: 1.173 -> 1.174
MachineInstrBuilder.h updated: 1.33 -> 1.34
---
Log message:
There shalt be only one "immediate" operand type!
---
Diffs of the changes: (+4 -25)
MachineInstr.h | 22 ++++------------------
MachineInstrBuilder.h | 7 -------
2 files changed, 4 insertions(+), 25 deletions(-)
Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.173 llvm/include/llvm/CodeGen/MachineInstr.h:1.174
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.173 Thu May 4 12:02:50 2006
+++ llvm/include/llvm/CodeGen/MachineInstr.h Thu May 4 12:21:19 2006
@@ -62,8 +62,7 @@
enum MachineOperandType {
MO_VirtualRegister, // virtual register for *value
- MO_SignExtendedImmed,
- MO_UnextendedImmed,
+ MO_Immediate, // Immediate Operand
MO_MachineBasicBlock, // MachineBasicBlock reference
MO_FrameIndex, // Abstract Stack Frame Index
MO_ConstantPoolIndex, // Address of indexed Constant in Constant Pool
@@ -160,9 +159,7 @@
/// Accessors that tell you what kind of MachineOperand you're looking at.
///
bool isMachineBasicBlock() const { return opType == MO_MachineBasicBlock; }
- bool isImmediate() const {
- return opType == MO_SignExtendedImmed || opType == MO_UnextendedImmed;
- }
+ bool isImmediate() const { return opType == MO_Immediate; }
bool isFrameIndex() const { return opType == MO_FrameIndex; }
bool isConstantPoolIndex() const { return opType == MO_ConstantPoolIndex; }
bool isJumpTableIndex() const { return opType == MO_JumpTableIndex; }
@@ -380,7 +377,7 @@
assert(!OperandsComplete() &&
"Trying to add an operand to a machine instr that is already done!");
operands.push_back(
- MachineOperand(intValue, MachineOperand::MO_UnextendedImmed));
+ MachineOperand(intValue, MachineOperand::MO_Immediate));
}
/// addZeroExtImm64Operand - Add a zero extended 64-bit constant argument
@@ -389,18 +386,7 @@
void addZeroExtImm64Operand(uint64_t intValue) {
assert(!OperandsComplete() &&
"Trying to add an operand to a machine instr that is already done!");
- operands.push_back(
- MachineOperand(intValue, MachineOperand::MO_UnextendedImmed));
- }
-
- /// addSignExtImmOperand - Add a zero extended constant argument to the
- /// machine instruction.
- ///
- void addSignExtImmOperand(int intValue) {
- assert(!OperandsComplete() &&
- "Trying to add an operand to a machine instr that is already done!");
- operands.push_back(
- MachineOperand(intValue, MachineOperand::MO_SignExtendedImmed));
+ operands.push_back(MachineOperand(intValue, MachineOperand::MO_Immediate));
}
void addMachineBasicBlockOperand(MachineBasicBlock *MBB) {
Index: llvm/include/llvm/CodeGen/MachineInstrBuilder.h
diff -u llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.33 llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.34
--- llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.33 Thu May 4 12:02:51 2006
+++ llvm/include/llvm/CodeGen/MachineInstrBuilder.h Thu May 4 12:21:19 2006
@@ -47,13 +47,6 @@
return *this;
}
- /// addSImm - Add a new sign extended immediate operand...
- ///
- const MachineInstrBuilder &addSImm(int val) const {
- MI->addSignExtImmOperand(val);
- return *this;
- }
-
/// addZImm - Add a new zero extended immediate operand...
///
const MachineInstrBuilder &addZImm(unsigned Val) const {
More information about the llvm-commits
mailing list