diff options
author | Dan Gohman <gohman@apple.com> | 2007-09-14 20:33:02 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-09-14 20:33:02 +0000 |
commit | 92dfe2001e96f6e2b6d327e8816f38033f88b295 (patch) | |
tree | 14670779a18a50be87d7bbd426a595a04ca6ed77 /lib/Target | |
parent | 693f541526cdd5f084adc5b8a5a5b290401a0b8e (diff) | |
download | llvm-92dfe2001e96f6e2b6d327e8816f38033f88b295.tar.gz llvm-92dfe2001e96f6e2b6d327e8816f38033f88b295.tar.bz2 llvm-92dfe2001e96f6e2b6d327e8816f38033f88b295.tar.xz |
Remove isReg, isImm, and isMBB, and change all their users to use
isRegister, isImmediate, and isMachineBasicBlock, which are equivalent,
and more popular.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/ARM/ARMInstrInfo.cpp | 6 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCBranchSelector.cpp | 2 | ||||
-rw-r--r-- | lib/Target/TargetInstrInfo.cpp | 6 | ||||
-rw-r--r-- | lib/Target/X86/X86ATTAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/X86/X86FloatingPoint.cpp | 2 | ||||
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 12 |
7 files changed, 16 insertions, 16 deletions
diff --git a/lib/Target/ARM/ARMInstrInfo.cpp b/lib/Target/ARM/ARMInstrInfo.cpp index 0ec3b9f72b..0be0fd69b4 100644 --- a/lib/Target/ARM/ARMInstrInfo.cpp +++ b/lib/Target/ARM/ARMInstrInfo.cpp @@ -68,7 +68,7 @@ unsigned ARMInstrInfo::isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) co default: break; case ARM::LDR: if (MI->getOperand(1).isFrameIndex() && - MI->getOperand(2).isReg() && + MI->getOperand(2).isRegister() && MI->getOperand(3).isImmediate() && MI->getOperand(2).getReg() == 0 && MI->getOperand(3).getImmedValue() == 0) { @@ -102,7 +102,7 @@ unsigned ARMInstrInfo::isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) con default: break; case ARM::STR: if (MI->getOperand(1).isFrameIndex() && - MI->getOperand(2).isReg() && + MI->getOperand(2).isRegister() && MI->getOperand(3).isImmediate() && MI->getOperand(2).getReg() == 0 && MI->getOperand(3).getImmedValue() == 0) { @@ -521,7 +521,7 @@ bool ARMInstrInfo::DefinesPredicate(MachineInstr *MI, bool Found = false; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { const MachineOperand &MO = MI->getOperand(i); - if (MO.isReg() && MO.getReg() == ARM::CPSR) { + if (MO.isRegister() && MO.getReg() == ARM::CPSR) { Pred.push_back(MO); Found = true; } diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 102249c781..1bfa23b4b6 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -450,7 +450,7 @@ bool PPCAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, case 'I': // Write 'i' if an integer constant, otherwise nothing. Used to print // addi vs add, etc. - if (MI->getOperand(OpNo).isImm()) + if (MI->getOperand(OpNo).isImmediate()) O << "i"; return false; } diff --git a/lib/Target/PowerPC/PPCBranchSelector.cpp b/lib/Target/PowerPC/PPCBranchSelector.cpp index 4286f01b30..5220c642cb 100644 --- a/lib/Target/PowerPC/PPCBranchSelector.cpp +++ b/lib/Target/PowerPC/PPCBranchSelector.cpp @@ -129,7 +129,7 @@ bool PPCBSel::runOnMachineFunction(MachineFunction &Fn) { unsigned MBBStartOffset = 0; for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E; ++I) { - if (I->getOpcode() != PPC::BCC || I->getOperand(2).isImm()) { + if (I->getOpcode() != PPC::BCC || I->getOperand(2).isImmediate()) { MBBStartOffset += getNumBytesForInstruction(I); continue; } diff --git a/lib/Target/TargetInstrInfo.cpp b/lib/Target/TargetInstrInfo.cpp index 11b5b635db..e4508e43eb 100644 --- a/lib/Target/TargetInstrInfo.cpp +++ b/lib/Target/TargetInstrInfo.cpp @@ -68,13 +68,13 @@ bool TargetInstrInfo::PredicateInstruction(MachineInstr *MI, for (unsigned j = 0, i = 0, e = MI->getNumOperands(); i != e; ++i) { if ((TID->OpInfo[i].Flags & M_PREDICATE_OPERAND)) { MachineOperand &MO = MI->getOperand(i); - if (MO.isReg()) { + if (MO.isRegister()) { MO.setReg(Pred[j].getReg()); MadeChange = true; - } else if (MO.isImm()) { + } else if (MO.isImmediate()) { MO.setImm(Pred[j].getImmedValue()); MadeChange = true; - } else if (MO.isMBB()) { + } else if (MO.isMachineBasicBlock()) { MO.setMachineBasicBlock(Pred[j].getMachineBasicBlock()); MadeChange = true; } diff --git a/lib/Target/X86/X86ATTAsmPrinter.cpp b/lib/Target/X86/X86ATTAsmPrinter.cpp index 3d54d69ebb..e53edff65d 100644 --- a/lib/Target/X86/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/X86ATTAsmPrinter.cpp @@ -547,7 +547,7 @@ bool X86ATTAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, case 'h': // Print QImode high register case 'w': // Print HImode register case 'k': // Print SImode register - if (MI->getOperand(OpNo).isReg()) + if (MI->getOperand(OpNo).isRegister()) return printAsmMRegister(MI->getOperand(OpNo), ExtraCode[0]); printOperand(MI, OpNo); return false; diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp index 615c05533f..ac6d6145e5 100644 --- a/lib/Target/X86/X86FloatingPoint.cpp +++ b/lib/Target/X86/X86FloatingPoint.cpp @@ -220,7 +220,7 @@ bool FPS::processBasicBlock(MachineFunction &MF, MachineBasicBlock &BB) { SmallVector<unsigned, 8> DeadRegs; for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { const MachineOperand &MO = MI->getOperand(i); - if (MO.isReg() && MO.isDead()) + if (MO.isRegister() && MO.isDead()) DeadRegs.push_back(MO.getReg()); } diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 774531e7a7..557f07e8b4 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -291,9 +291,9 @@ void X86RegisterInfo::reMaterialize(MachineBasicBlock &MBB, static const MachineInstrBuilder &FuseInstrAddOperand(MachineInstrBuilder &MIB, MachineOperand &MO) { - if (MO.isReg()) + if (MO.isRegister()) MIB = MIB.addReg(MO.getReg(), MO.isDef(), MO.isImplicit()); - else if (MO.isImm()) + else if (MO.isImmediate()) MIB = MIB.addImm(MO.getImm()); else if (MO.isFrameIndex()) MIB = MIB.addFrameIndex(MO.getFrameIndex()); @@ -340,7 +340,7 @@ static MachineInstr *FuseInst(unsigned Opcode, unsigned OpNo, for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { MachineOperand &MO = MI->getOperand(i); if (i == OpNo) { - assert(MO.isReg() && "Expected to fold into reg operand!"); + assert(MO.isRegister() && "Expected to fold into reg operand!"); unsigned NumAddrOps = MOs.size(); for (unsigned i = 0; i != NumAddrOps; ++i) MIB = FuseInstrAddOperand(MIB, MOs[i]); @@ -440,8 +440,8 @@ X86RegisterInfo::foldMemoryOperand(MachineInstr *MI, unsigned i, // instruction is different than folding it other places. It requires // replacing the *two* registers with the memory location. if (isTwoAddr && NumOps >= 2 && i < 2 && - MI->getOperand(0).isReg() && - MI->getOperand(1).isReg() && + MI->getOperand(0).isRegister() && + MI->getOperand(1).isRegister() && MI->getOperand(0).getReg() == MI->getOperand(1).getReg()) { static const TableEntry OpcodeTable[] = { { X86::ADC32ri, X86::ADC32mi }, @@ -1528,7 +1528,7 @@ void X86RegisterInfo::emitEpilogue(MachineFunction &MF, if (RetOpcode == X86::EH_RETURN) { MBBI = prior(MBB.end()); MachineOperand &DestAddr = MBBI->getOperand(0); - assert(DestAddr.isReg() && "Offset should be in register!"); + assert(DestAddr.isRegister() && "Offset should be in register!"); BuildMI(MBB, MBBI, TII.get(Is64Bit ? X86::MOV64rr : X86::MOV32rr),StackPtr). addReg(DestAddr.getReg()); } |