summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
diff options
context:
space:
mode:
authorPetar Jovanovic <petar.jovanovic@mips.com>2018-05-23 15:28:28 +0000
committerPetar Jovanovic <petar.jovanovic@mips.com>2018-05-23 15:28:28 +0000
commitc051000b838a6c30e7efa6111dc3867c844ec027 (patch)
tree0cece070468a54a3caf0cb033af4b7c375832878 /llvm/lib/Target/Mips/Mips16InstrInfo.cpp
parentba917bf053dffc91bc14616637e6fd4d2b08e2c7 (diff)
downloadbcm5719-llvm-c051000b838a6c30e7efa6111dc3867c844ec027.tar.gz
bcm5719-llvm-c051000b838a6c30e7efa6111dc3867c844ec027.zip
[X86][MIPS][ARM] New machine instruction property 'isMoveReg'
This property is needed in order to follow values movement between registers. This property is used in TII to implement method that returns true if simple copy like instruction is recognized, along with source and destination machine operands. Patch by Nikola Prica. Differential Revision: https://reviews.llvm.org/D45204 llvm-svn: 333093
Diffstat (limited to 'llvm/lib/Target/Mips/Mips16InstrInfo.cpp')
-rw-r--r--llvm/lib/Target/Mips/Mips16InstrInfo.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/Mips16InstrInfo.cpp b/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
index e11023b4d27..593dafbb9fc 100644
--- a/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
+++ b/llvm/lib/Target/Mips/Mips16InstrInfo.cpp
@@ -97,6 +97,16 @@ void Mips16InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
MIB.addReg(SrcReg, getKillRegState(KillSrc));
}
+bool Mips16InstrInfo::isCopyInstr(const MachineInstr &MI, MachineOperand &Src,
+ MachineOperand &Dest) const {
+ if (MI.isMoveReg()) {
+ Dest = MI.getOperand(0);
+ Src = MI.getOperand(1);
+ return true;
+ }
+ return false;
+}
+
void Mips16InstrInfo::storeRegToStack(MachineBasicBlock &MBB,
MachineBasicBlock::iterator I,
unsigned SrcReg, bool isKill, int FI,
OpenPOWER on IntegriCloud