llvm.org GIT mirror llvm / 34adeaf
R600: Remove unused InstrInfo::getMovImmInstr() function git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193178 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 7 years ago
5 changed file(s) with 0 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
138138 // Pure virtual funtions to be implemented by sub-classes.
139139 //===---------------------------------------------------------------------===//
140140
141 virtual MachineInstr* getMovImmInstr(MachineFunction *MF, unsigned DstReg,
142 int64_t Imm) const = 0;
143141 virtual unsigned getIEQOpcode() const = 0;
144142 virtual bool isMov(unsigned opcode) const = 0;
145143
7474 NewMI->getOperand(getOperandIdx(*NewMI, AMDGPU::OpName::src0))
7575 .setIsKill(KillSrc);
7676 }
77 }
78
79 MachineInstr * R600InstrInfo::getMovImmInstr(MachineFunction *MF,
80 unsigned DstReg, int64_t Imm) const {
81 MachineInstr * MI = MF->CreateMachineInstr(get(AMDGPU::MOV), DebugLoc());
82 MachineInstrBuilder MIB(*MF, MI);
83 MIB.addReg(DstReg, RegState::Define);
84 MIB.addReg(AMDGPU::ALU_LITERAL_X);
85 MIB.addImm(Imm);
86 MIB.addReg(0); // PREDICATE_BIT
87
88 return MI;
8977 }
9078
9179 unsigned R600InstrInfo::getIEQOpcode() const {
135135 /// instruction slots within an instruction group.
136136 bool isVector(const MachineInstr &MI) const;
137137
138 virtual MachineInstr * getMovImmInstr(MachineFunction *MF, unsigned DstReg,
139 int64_t Imm) const;
140
141138 virtual unsigned getIEQOpcode() const;
142139 virtual bool isMov(unsigned Opcode) const;
143140
194194 MI->setDesc(get(commuteOpcode(MI->getOpcode())));
195195
196196 return MI;
197 }
198
199 MachineInstr * SIInstrInfo::getMovImmInstr(MachineFunction *MF, unsigned DstReg,
200 int64_t Imm) const {
201 MachineInstr * MI = MF->CreateMachineInstr(get(AMDGPU::V_MOV_B32_e32), DebugLoc());
202 MachineInstrBuilder MIB(*MF, MI);
203 MIB.addReg(DstReg, RegState::Define);
204 MIB.addImm(Imm);
205
206 return MI;
207
208197 }
209198
210199 bool SIInstrInfo::isMov(unsigned Opcode) const {
3838
3939 virtual MachineInstr *commuteInstruction(MachineInstr *MI,
4040 bool NewMI=false) const;
41
42 virtual MachineInstr * getMovImmInstr(MachineFunction *MF, unsigned DstReg,
43 int64_t Imm) const;
4441
4542 virtual unsigned getIEQOpcode() const { assert(!"Implement"); return 0;}
4643 virtual bool isMov(unsigned Opcode) const;