[PATCH] D32622: ARM: Compute MaxCallFrame size early
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 16:10:37 PDT 2017
MatzeB created this revision.
Herald added subscribers: mcrosier, aemerson.
This avoids
ARMBaseRegisterInfo::canRealignStack()/ARMFrameLowering::hasReservedCallFrame()
giving different answers in early/late phases of codegen.
The attached testcase shows a particular nasty example where we would call TargetRegisterInfo::needsStackRealignment()->canRealignStack()->hasReservedCallFrame() and would end up not aligning the stack because `hasReservedCallFrame()` would report `false` in late passes only.
This exposes a method in MachineFrameInfo that calculates
MaxCallFrameSize and calls it after instruction selection to get the value computed early.
Repository:
rL LLVM
https://reviews.llvm.org/D32622
Files:
include/llvm/CodeGen/MachineFrameInfo.h
lib/CodeGen/MachineFrameInfo.cpp
lib/CodeGen/PrologEpilogInserter.cpp
lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
test/CodeGen/ARM/alloca-align.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32622.97012.patch
Type: text/x-patch
Size: 6043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170427/4c5b27d9/attachment.bin>
More information about the llvm-commits
mailing list