diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-12-05 03:14:33 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-12-05 03:14:33 +0000 |
commit | 2af4a6c288939754c302cb397c3c334dff6def41 (patch) | |
tree | 833ba21d24aa346a057bf617a4b89ce36d9ae304 /lib/Target/Mips/MipsRegisterInfo.cpp | |
parent | 6fe053afa3e33f885e7428b27f5943cac17bd7cd (diff) | |
download | external_llvm-2af4a6c288939754c302cb397c3c334dff6def41.zip external_llvm-2af4a6c288939754c302cb397c3c334dff6def41.tar.gz external_llvm-2af4a6c288939754c302cb397c3c334dff6def41.tar.bz2 |
Add a argument to storeRegToStackSlot and storeRegToAddr to specify whether
the stored register is killed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsRegisterInfo.cpp')
-rw-r--r-- | lib/Target/Mips/MipsRegisterInfo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/Mips/MipsRegisterInfo.cpp b/lib/Target/Mips/MipsRegisterInfo.cpp index 37c0933..8159189 100644 --- a/lib/Target/Mips/MipsRegisterInfo.cpp +++ b/lib/Target/Mips/MipsRegisterInfo.cpp @@ -85,24 +85,25 @@ getRegisterNumbering(unsigned RegEnum) void MipsRegisterInfo:: storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator I, - unsigned SrcReg, int FI, + unsigned SrcReg, bool isKill, int FI, const TargetRegisterClass *RC) const { if (RC == Mips::CPURegsRegisterClass) - BuildMI(MBB, I, TII.get(Mips::SW)).addReg(SrcReg, false, false, true) + BuildMI(MBB, I, TII.get(Mips::SW)).addReg(SrcReg, false, false, isKill) .addImm(0).addFrameIndex(FI); else assert(0 && "Can't store this register to stack slot"); } void MipsRegisterInfo::storeRegToAddr(MachineFunction &MF, unsigned SrcReg, + bool isKill, SmallVectorImpl<MachineOperand> &Addr, const TargetRegisterClass *RC, SmallVectorImpl<MachineInstr*> &NewMIs) const { if (RC != Mips::CPURegsRegisterClass) assert(0 && "Can't store this register"); MachineInstrBuilder MIB = BuildMI(TII.get(Mips::SW)) - .addReg(SrcReg, false, false, true); + .addReg(SrcReg, false, false, isKill); for (unsigned i = 0, e = Addr.size(); i != e; ++i) { MachineOperand &MO = Addr[i]; if (MO.isRegister()) |