diff options
| author | Petar Jovanovic <petar.jovanovic@mips.com> | 2018-06-06 16:36:30 +0000 |
|---|---|---|
| committer | Petar Jovanovic <petar.jovanovic@mips.com> | 2018-06-06 16:36:30 +0000 |
| commit | 8cb6a521be9abebc2174353dcb7025f9674023fb (patch) | |
| tree | a36229923524e9fe9d9c7422a0df307f25c1914f /llvm/lib/Target/ARM | |
| parent | 64541ff29733ada162a392e83d9580691c5d1378 (diff) | |
| download | bcm5719-llvm-8cb6a521be9abebc2174353dcb7025f9674023fb.tar.gz bcm5719-llvm-8cb6a521be9abebc2174353dcb7025f9674023fb.zip | |
Change TII isCopyInstr way of returning arguments(NFC)
Make TII isCopyInstr() return MachineOperands through pointer to pointer
instead via reference.
Patch by Nikola Prica.
Differential Revision: https://reviews.llvm.org/D47364
llvm-svn: 334105
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | 9 | ||||
| -rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.h | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp index 8c7de5fc7c1..4b589f5b447 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -935,8 +935,9 @@ void ARMBaseInstrInfo::copyPhysReg(MachineBasicBlock &MBB, Mov->addRegisterKilled(SrcReg, TRI); } -bool ARMBaseInstrInfo::isCopyInstr(const MachineInstr &MI, MachineOperand &Src, - MachineOperand &Dest) const { +bool ARMBaseInstrInfo::isCopyInstr(const MachineInstr &MI, + const MachineOperand *&Src, + const MachineOperand *&Dest) const { // VMOVRRD is also a copy instruction but it requires // special way of handling. It is more complex copy version // and since that we are not considering it. For recognition @@ -948,8 +949,8 @@ bool ARMBaseInstrInfo::isCopyInstr(const MachineInstr &MI, MachineOperand &Src, (MI.getOpcode() == ARM::VORRq && MI.getOperand(1).getReg() != MI.getOperand(2).getReg())) return false; - Dest = MI.getOperand(0); - Src = MI.getOperand(1); + Dest = &MI.getOperand(0); + Src = &MI.getOperand(1); return true; } diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h index d4db997326a..b54be15097b 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h @@ -201,8 +201,8 @@ public: const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override; - bool isCopyInstr(const MachineInstr &MI, MachineOperand &Src, - MachineOperand &Dest) const override; + bool isCopyInstr(const MachineInstr &MI, const MachineOperand *&Src, + const MachineOperand *&Dest) const override; void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, |

