summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/SystemZRegisterInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-05-14 22:17:42 +0000
committerBill Wendling <isanbard@gmail.com>2010-05-14 22:17:42 +0000
commit23ead992838188a3696a0c4510010b41824e789e (patch)
tree870d6ea5fb602947a1a1dfa3ed9e7c9792e4a2e5 /lib/Target/SystemZ/SystemZRegisterInfo.cpp
parentefa155fd6e3820495205a09f8b9f20390d126153 (diff)
downloadllvm-23ead992838188a3696a0c4510010b41824e789e.tar.gz
llvm-23ead992838188a3696a0c4510010b41824e789e.tar.bz2
llvm-23ead992838188a3696a0c4510010b41824e789e.tar.xz
SystemZ really does mean "has calls" and not just "adjusts stack." Go ahead and
replace the check with the appropriate predicate. Modify the testcase to reflect the correct code. (It should be saving callee-saved registers on the stack allocated by the calling fuction.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZRegisterInfo.cpp')
-rw-r--r--lib/Target/SystemZ/SystemZRegisterInfo.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/lib/Target/SystemZ/SystemZRegisterInfo.cpp
index 420005b73e..638fd17c99 100644
--- a/lib/Target/SystemZ/SystemZRegisterInfo.cpp
+++ b/lib/Target/SystemZ/SystemZRegisterInfo.cpp
@@ -102,7 +102,7 @@ int SystemZRegisterInfo::getFrameIndexOffset(const MachineFunction &MF,
Offset += StackSize - TFI.getOffsetOfLocalArea();
// Skip the register save area if we generated the stack frame.
- if (StackSize || MFI->adjustsStack())
+ if (StackSize || MFI->hasCalls())
Offset -= TFI.getOffsetOfLocalArea();
return Offset;
@@ -163,14 +163,14 @@ SystemZRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
for (unsigned i = 0, e = array_lengthof(HighFPRs); i != e; ++i)
HighFPRsUsed |= MRI.isPhysRegUsed(HighFPRs[i]);
- if (FFI->adjustsStack())
+ if (FFI->hasCalls())
/* FIXME: function is varargs */
/* FIXME: function grabs RA */
/* FIXME: function calls eh_return */
MRI.setPhysRegUsed(SystemZ::R14D);
if (HighFPRsUsed ||
- FFI->adjustsStack() ||
+ FFI->hasCalls() ||
FFI->getObjectIndexEnd() != 0 || // Contains automatic variables
FFI->hasVarSizedObjects() // Function calls dynamic alloca's
/* FIXME: function is varargs */)
@@ -234,7 +234,7 @@ void SystemZRegisterInfo::emitPrologue(MachineFunction &MF) const {
DL = MBBI->getDebugLoc();
// adjust stack pointer: R15 -= numbytes
- if (StackSize || MFI->adjustsStack()) {
+ if (StackSize || MFI->hasCalls()) {
assert(MF.getRegInfo().isPhysRegUsed(SystemZ::R15D) &&
"Invalid stack frame calculation!");
emitSPUpdate(MBB, MBBI, -(int64_t)NumBytes, TII);
@@ -286,7 +286,7 @@ void SystemZRegisterInfo::emitEpilogue(MachineFunction &MF,
// During callee-saved restores emission stack frame was not yet finialized
// (and thus - the stack size was unknown). Tune the offset having full stack
// size in hands.
- if (StackSize || MFI->adjustsStack()) {
+ if (StackSize || MFI->hasCalls()) {
assert((MBBI->getOpcode() == SystemZ::MOV64rmm ||
MBBI->getOpcode() == SystemZ::MOV64rm) &&
"Expected to see callee-save register restore code");