summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-04-05 16:58:41 +0000
committerMatthias Braun <matze@braunis.de>2017-04-05 16:58:41 +0000
commit44047427b1d085b42e1c4b799c0d32e2b20a99ea (patch)
treedd1bc8746d3edeb79d191caf5c27fab034860243 /llvm
parent0c0c8c4d381c0f070cd9929687544ab1d42a3b96 (diff)
downloadbcm5719-llvm-44047427b1d085b42e1c4b799c0d32e2b20a99ea.tar.gz
bcm5719-llvm-44047427b1d085b42e1c4b799c0d32e2b20a99ea.zip
ARMFrameLowering: Slight cleanups; NFC
llvm-svn: 299562
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/ARM/ARMFrameLowering.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
index 63c608dde95..37be22bed54 100644
--- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
@@ -1700,13 +1700,14 @@ void ARMFrameLowering::determineCalleeSaves(MachineFunction &MF,
// worth the effort and added fragility?
unsigned EstimatedStackSize =
MFI.estimateStackSize(MF) + 4 * (NumGPRSpills + NumFPRSpills);
- if (hasFP(MF)) {
+ bool HasFP = hasFP(MF);
+ if (HasFP) {
if (AFI->hasStackFrame())
EstimatedStackSize += 4;
} else {
// If FP is not used, SP will be used to access arguments, so count the
// size of arguments into the estimation.
- EstimatedStackSize += MF.getInfo<ARMFunctionInfo>()->getArgumentStackSize();
+ EstimatedStackSize += AFI->getArgumentStackSize();
}
EstimatedStackSize += 16; // For possible paddings.
@@ -1717,7 +1718,7 @@ void ARMFrameLowering::determineCalleeSaves(MachineFunction &MF,
if (BigStack || !CanEliminateFrame || RegInfo->cannotEliminateFrame(MF)) {
AFI->setHasStackFrame(true);
- if (hasFP(MF)) {
+ if (HasFP) {
SavedRegs.set(FramePtr);
// If the frame pointer is required by the ABI, also spill LR so that we
// emit a complete frame record.
@@ -1788,7 +1789,7 @@ void ARMFrameLowering::determineCalleeSaves(MachineFunction &MF,
}
// r7 can be used if it is not being used as the frame pointer.
- if (!hasFP(MF)) {
+ if (!HasFP) {
if (SavedRegs.test(ARM::R7)) {
--RegDeficit;
DEBUG(dbgs() << "%R7 is saved low register, RegDeficit = "
OpenPOWER on IntegriCloud