[llvm-commits] [llvm] r121498 - /llvm/trunk/lib/Target/ARM/ARMFrameInfo.cpp
Jim Grosbach
grosbach at apple.com
Fri Dec 10 10:41:15 PST 2010
Author: grosbach
Date: Fri Dec 10 12:41:15 2010
New Revision: 121498
URL: http://llvm.org/viewvc/llvm-project?rev=121498&view=rev
Log:
Teach isCSRestore() that ARM/Thumb2 functions will use post-modify LDR
instructions to restore a single register rather than an LDM instruction.
rdar://8754999
Modified:
llvm/trunk/lib/Target/ARM/ARMFrameInfo.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMFrameInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFrameInfo.cpp?rev=121498&r1=121497&r2=121498&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFrameInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFrameInfo.cpp Fri Dec 10 12:41:15 2010
@@ -92,6 +92,11 @@
return false;
return true;
}
+ if ((MI->getOpcode() == ARM::LDR_POST ||
+ MI->getOpcode() == ARM::t2LDR_POST) &&
+ isCalleeSavedRegister(MI->getOperand(0).getReg(), CSRegs) &&
+ MI->getOperand(1).getReg() == ARM::SP)
+ return true;
return false;
}
More information about the llvm-commits
mailing list