diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-11-07 04:04:34 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-11-07 04:04:34 +0000 |
commit | a8e8a7c976986137d8918a9af8e760130d2fb4f5 (patch) | |
tree | 7fcad41ffd81bdc8f5f375214bab3a872b731c75 /llvm/lib/Target/ARM/Thumb2InstrInfo.cpp | |
parent | ae3361de2d39e372ac362ad93cab12c75217b7ee (diff) | |
download | bcm5719-llvm-a8e8a7c976986137d8918a9af8e760130d2fb4f5.tar.gz bcm5719-llvm-a8e8a7c976986137d8918a9af8e760130d2fb4f5.zip |
Refactor code. Fix a potential missing check. Teach isIdentical() about tLDRpci_pic.
llvm-svn: 86330
Diffstat (limited to 'llvm/lib/Target/ARM/Thumb2InstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/Thumb2InstrInfo.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp b/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp index cdb06cbd957..da8ceb462b0 100644 --- a/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp +++ b/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp @@ -175,32 +175,6 @@ void Thumb2InstrInfo::reMaterialize(MachineBasicBlock &MBB, NewMI->getOperand(0).setSubReg(SubIdx); } -bool Thumb2InstrInfo::isIdentical(const MachineInstr *MI0, - const MachineInstr *MI1, - const MachineRegisterInfo *MRI) const { - unsigned Opcode = MI0->getOpcode(); - if (Opcode == ARM::t2LDRpci_pic) { - const MachineOperand &MO0 = MI0->getOperand(1); - const MachineOperand &MO1 = MI1->getOperand(1); - if (MO0.getOffset() != MO1.getOffset()) - return false; - - const MachineFunction *MF = MI0->getParent()->getParent(); - const MachineConstantPool *MCP = MF->getConstantPool(); - int CPI0 = MO0.getIndex(); - int CPI1 = MO1.getIndex(); - const MachineConstantPoolEntry &MCPE0 = MCP->getConstants()[CPI0]; - const MachineConstantPoolEntry &MCPE1 = MCP->getConstants()[CPI1]; - ARMConstantPoolValue *ACPV0 = - static_cast<ARMConstantPoolValue*>(MCPE0.Val.MachineCPVal); - ARMConstantPoolValue *ACPV1 = - static_cast<ARMConstantPoolValue*>(MCPE1.Val.MachineCPVal); - return ACPV0->hasSameValue(ACPV1); - } - - return TargetInstrInfoImpl::isIdentical(MI0, MI1, MRI); -} - void llvm::emitT2RegPlusImmediate(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, DebugLoc dl, unsigned DestReg, unsigned BaseReg, int NumBytes, |