[llvm-commits] [llvm] r129104 - /llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp
Akira Hatanaka
ahatanak at gmail.com
Thu Apr 7 13:23:26 PDT 2011
Author: ahatanak
Date: Thu Apr 7 15:23:26 2011
New Revision: 129104
URL: http://llvm.org/viewvc/llvm-project?rev=129104&view=rev
Log:
Update ATUsed every time after expandRegLargeImmPair is called.
Modified:
llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp?rev=129104&r1=129103&r2=129104&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp Thu Apr 7 15:23:26 2011
@@ -288,7 +288,8 @@
// Save the return address only if the function isnt a leaf one.
// sw $ra, stack_loc($sp)
if (MFI->adjustsStack()) {
- expandRegLargeImmPair(Mips::SP, RAOffset, NewReg, NewImm, MBB, MBBI);
+ ATUsed = expandRegLargeImmPair(Mips::SP, RAOffset, NewReg, NewImm, MBB,
+ MBBI);
BuildMI(MBB, MBBI, dl, TII.get(Mips::SW))
.addReg(Mips::RA).addImm(NewImm).addReg(NewReg);
@@ -301,7 +302,8 @@
// to point to the stack pointer
if (hasFP(MF)) {
// sw $fp,stack_loc($sp)
- expandRegLargeImmPair(Mips::SP, FPOffset, NewReg, NewImm, MBB, MBBI);
+ ATUsed = expandRegLargeImmPair(Mips::SP, FPOffset, NewReg, NewImm, MBB,
+ MBBI);
BuildMI(MBB, MBBI, dl, TII.get(Mips::SW))
.addReg(Mips::FP).addImm(NewImm).addReg(NewReg);
@@ -361,7 +363,8 @@
// Restore the return address only if the function isnt a leaf one.
// lw $ra, stack_loc($sp)
if (MFI->adjustsStack()) {
- expandRegLargeImmPair(Mips::SP, RAOffset, NewReg, NewImm, MBB, MBBI);
+ ATUsed = expandRegLargeImmPair(Mips::SP, RAOffset, NewReg, NewImm, MBB,
+ MBBI);
BuildMI(MBB, MBBI, dl, TII.get(Mips::LW), Mips::RA)
.addImm(NewImm).addReg(NewReg);
@@ -372,7 +375,8 @@
// adjust stack : insert addi sp, sp, (imm)
if (NumBytes) {
- expandRegLargeImmPair(Mips::SP, NumBytes, NewReg, NewImm, MBB, MBBI);
+ ATUsed = expandRegLargeImmPair(Mips::SP, NumBytes, NewReg, NewImm, MBB,
+ MBBI);
BuildMI(MBB, MBBI, dl, TII.get(Mips::ADDiu), Mips::SP)
.addReg(NewReg).addImm(NewImm);
More information about the llvm-commits
mailing list