summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-05-05 22:04:05 +0000
committerMatthias Braun <matze@braunis.de>2017-05-05 22:04:05 +0000
commit4682ac6c83d83f24100fd5293fabd97009e27996 (patch)
tree607f8fe81402fe80ec5a2cd4cf5fb7de608d8367 /llvm/lib/Target/ARM/ARMISelLowering.cpp
parent8c74673388f62f5f4bffc7e840d405c0914558a4 (diff)
downloadbcm5719-llvm-4682ac6c83d83f24100fd5293fabd97009e27996.tar.gz
bcm5719-llvm-4682ac6c83d83f24100fd5293fabd97009e27996.zip
ARM: Compute MaxCallFrame size early
This exposes a method in MachineFrameInfo that calculates MaxCallFrameSize and calls it after instruction selection in the ARM target. This avoids ARMBaseRegisterInfo::canRealignStack()/ARMFrameLowering::hasReservedCallFrame() giving different answers in early/late phases of codegen. The testcase shows a particular nasty example result of that where we would fail to properly align an alloca. Differential Revision: https://reviews.llvm.org/D32622 llvm-svn: 302303
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index f248a829b8e..bbf5b6665e6 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -14054,3 +14054,8 @@ void ARMTargetLowering::insertCopiesSplitCSR(
.addReg(NewVR);
}
}
+
+void ARMTargetLowering::finalizeLowering(MachineFunction &MF) const {
+ MF.getFrameInfo().computeMaxCallFrameSize(MF);
+ TargetLoweringBase::finalizeLowering(MF);
+}
OpenPOWER on IntegriCloud