mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-06 09:44:39 +00:00
switch MIBuilder over to use the simplified operand addition methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e86d0d089e
commit
c8313f1d79
@ -40,46 +40,47 @@ public:
|
||||
MachineInstrBuilder &addReg(unsigned RegNo, bool isDef = false,
|
||||
bool isImp = false, bool isKill = false,
|
||||
bool isDead = false, unsigned SubReg = 0) const {
|
||||
MI->addRegOperand(RegNo, isDef, isImp, isKill, isDead, SubReg);
|
||||
MI->addOperand(MachineOperand::CreateReg(RegNo, isDef, isImp, isKill,
|
||||
isDead, SubReg));
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// addImm - Add a new immediate operand.
|
||||
///
|
||||
const MachineInstrBuilder &addImm(int64_t Val) const {
|
||||
MI->addImmOperand(Val);
|
||||
MI->addOperand(MachineOperand::CreateImm(Val));
|
||||
return *this;
|
||||
}
|
||||
|
||||
const MachineInstrBuilder &addMBB(MachineBasicBlock *MBB) const {
|
||||
MI->addMachineBasicBlockOperand(MBB);
|
||||
MI->addOperand(MachineOperand::CreateBasicBlock(MBB));
|
||||
return *this;
|
||||
}
|
||||
|
||||
const MachineInstrBuilder &addFrameIndex(unsigned Idx) const {
|
||||
MI->addFrameIndexOperand(Idx);
|
||||
MI->addOperand(MachineOperand::CreateFrameIndex(Idx));
|
||||
return *this;
|
||||
}
|
||||
|
||||
const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx,
|
||||
int Offset = 0) const {
|
||||
MI->addConstantPoolIndexOperand(Idx, Offset);
|
||||
MI->addOperand(MachineOperand::CreateConstantPoolIndex(Idx, Offset));
|
||||
return *this;
|
||||
}
|
||||
|
||||
const MachineInstrBuilder &addJumpTableIndex(unsigned Idx) const {
|
||||
MI->addJumpTableIndexOperand(Idx);
|
||||
MI->addOperand(MachineOperand::CreateJumpTableIndex(Idx));
|
||||
return *this;
|
||||
}
|
||||
|
||||
const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV,
|
||||
int Offset = 0) const {
|
||||
MI->addGlobalAddressOperand(GV, Offset);
|
||||
MI->addOperand(MachineOperand::CreateGlobalAddress(GV, Offset));
|
||||
return *this;
|
||||
}
|
||||
|
||||
const MachineInstrBuilder &addExternalSymbol(const char *FnName) const{
|
||||
MI->addExternalSymbolOperand(FnName);
|
||||
MI->addOperand(MachineOperand::CreateExternalSymbol(FnName, 0));
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user