Changes in directory llvm/include/llvm/CodeGen:
MachineInstr.h updated: 1.177 -> 1.178 MachineInstrBuilder.h updated: 1.35 -> 1.36 --- Log message: Remove and simplify some more machineinstr/machineoperand stuff. --- Diffs of the changes: (+10 -44) MachineInstr.h | 30 +++++------------------------- MachineInstrBuilder.h | 24 +++++------------------- 2 files changed, 10 insertions(+), 44 deletions(-) Index: llvm/include/llvm/CodeGen/MachineInstr.h diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.177 llvm/include/llvm/CodeGen/MachineInstr.h:1.178 --- llvm/include/llvm/CodeGen/MachineInstr.h:1.177 Thu May 4 13:05:42 2006 +++ llvm/include/llvm/CodeGen/MachineInstr.h Thu May 4 13:16:01 2006 @@ -261,23 +261,8 @@ //===----------------------------------------------------------------------===// -// class MachineInstr -// -// Purpose: -// Representation of each machine instruction. -// -// MachineOpCode must be an enum, defined separately for each target. -// E.g., It is defined in SparcInstructionSelection.h for the SPARC. -// -// There are 2 kinds of operands: -// -// (1) Explicit operands of the machine instruction in vector operands[] -// -// (2) "Implicit operands" are values implicitly used or defined by the -// machine instruction, such as arguments to a CALL, return value of -// a CALL (if any), and return value of a RETURN. -//===----------------------------------------------------------------------===// - +/// MachineInstr - Representation of each machine instruction. +/// class MachineInstr { short Opcode; // the opcode std::vector<MachineOperand> operands; // the operands @@ -287,9 +272,7 @@ // OperandComplete - Return true if it's illegal to add a new operand bool OperandsComplete() const; - //Constructor used by clone() method MachineInstr(const MachineInstr&); - void operator=(const MachineInstr&); // DO NOT IMPLEMENT // Intrusive list support @@ -297,12 +280,9 @@ friend struct ilist_traits<MachineInstr>; public: - /// MachineInstr ctor - This constructor only does a _reserve_ of the - /// operands, not a resize for them. It is expected that if you use this that - /// you call add* methods below to fill up the operands, instead of the Set - /// methods. Eventually, the "resizing" ctors will be phased out. - /// - MachineInstr(short Opcode, unsigned numOperands, bool XX, bool YY); + /// MachineInstr ctor - This constructor reserve's space for numOperand + /// operands. + MachineInstr(short Opcode, unsigned numOperands); /// MachineInstr ctor - Work exactly the same as the ctor above, except that /// the MachineInstr is created and added to the end of the specified basic Index: llvm/include/llvm/CodeGen/MachineInstrBuilder.h diff -u llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.35 llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.36 --- llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.35 Thu May 4 13:05:43 2006 +++ llvm/include/llvm/CodeGen/MachineInstrBuilder.h Thu May 4 13:16:01 2006 @@ -47,20 +47,6 @@ return *this; } - /// addZImm - Add a new zero extended immediate operand... - /// - const MachineInstrBuilder &addZImm(unsigned Val) const { - MI->addImmOperand(Val); - return *this; - } - - /// addImm64 - Add a new 64-bit immediate operand... - /// - const MachineInstrBuilder &addImm64(uint64_t Val) const { - MI->addImmOperand(Val); - return *this; - } - const MachineInstrBuilder &addMBB(MachineBasicBlock *MBB) const { MI->addMachineBasicBlockOperand(MBB); return *this; @@ -99,7 +85,7 @@ /// allow for memory efficient representation of machine instructions. /// inline MachineInstrBuilder BuildMI(int Opcode, unsigned NumOperands) { - return MachineInstrBuilder(new MachineInstr(Opcode, NumOperands, true, true)); + return MachineInstrBuilder(new MachineInstr(Opcode, NumOperands)); } /// BuildMI - This version of the builder sets up the first operand as a @@ -110,8 +96,8 @@ int Opcode, unsigned NumOperands, unsigned DestReg, MachineOperand::UseType useType = MachineOperand::Def) { - return MachineInstrBuilder(new MachineInstr(Opcode, NumOperands+1, - true, true)).addReg(DestReg, useType); + return MachineInstrBuilder(new MachineInstr(Opcode, NumOperands+1)) + .addReg(DestReg, useType); } /// BuildMI - This version of the builder inserts the newly-built @@ -124,7 +110,7 @@ MachineBasicBlock::iterator I, int Opcode, unsigned NumOperands, unsigned DestReg) { - MachineInstr *MI = new MachineInstr(Opcode, NumOperands+1, true, true); + MachineInstr *MI = new MachineInstr(Opcode, NumOperands+1); BB.insert(I, MI); return MachineInstrBuilder(MI).addReg(DestReg, MachineOperand::Def); } @@ -136,7 +122,7 @@ inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, MachineBasicBlock::iterator I, int Opcode, unsigned NumOperands) { - MachineInstr *MI = new MachineInstr(Opcode, NumOperands, true, true); + MachineInstr *MI = new MachineInstr(Opcode, NumOperands); BB.insert(I, MI); return MachineInstrBuilder(MI); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits