diff options
| author | Alexander Ivchenko <alexander.ivchenko@intel.com> | 2018-08-30 14:32:47 +0000 |
|---|---|---|
| committer | Alexander Ivchenko <alexander.ivchenko@intel.com> | 2018-08-30 14:32:47 +0000 |
| commit | af96112ec625e303fe5d62cd85f9a778d492fd8e (patch) | |
| tree | 62025d86bc3f2393711d68337ba823f1bb60f437 /llvm/lib/Target/ARM | |
| parent | 35617ed4cb81ca442a519fd4134ff28b90f06655 (diff) | |
| download | bcm5719-llvm-af96112ec625e303fe5d62cd85f9a778d492fd8e.tar.gz bcm5719-llvm-af96112ec625e303fe5d62cd85f9a778d492fd8e.zip | |
Make TargetInstrInfo::isCopyInstr return true for regular COPY-instructions
..Move all target-dependent checks into new isCopyInstrImpl method.
This change allows us to treat MoveReg-type instructions and generic
COPY instruction in the same way
Differential Revision: https://reviews.llvm.org/D49913
llvm-svn: 341072
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.h | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp index 4c8f6288720..1b626ff5580 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -935,9 +935,9 @@ void ARMBaseInstrInfo::copyPhysReg(MachineBasicBlock &MBB, Mov->addRegisterKilled(SrcReg, TRI); } -bool ARMBaseInstrInfo::isCopyInstr(const MachineInstr &MI, - const MachineOperand *&Src, - const MachineOperand *&Dest) const { +bool ARMBaseInstrInfo::isCopyInstrImpl(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 diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h index ce731ad1316..de1f307083b 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h @@ -101,6 +101,12 @@ protected: unsigned OpIdx1, unsigned OpIdx2) const override; + /// If the specific machine instruction is a instruction that moves/copies + /// value from one register to another register return true along with + /// @Source machine operand and @Destination machine operand. + bool isCopyInstrImpl(const MachineInstr &MI, const MachineOperand *&Source, + const MachineOperand *&Destination) const override; + public: // Return whether the target has an explicit NOP encoding. bool hasNOP() const; @@ -201,9 +207,6 @@ public: const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override; - bool isCopyInstr(const MachineInstr &MI, const MachineOperand *&Src, - const MachineOperand *&Dest) const override; - void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg, bool isKill, int FrameIndex, |

