summaryrefslogtreecommitdiff
path: root/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-08-17 22:41:55 +0000
committerJim Grosbach <grosbach@apple.com>2010-08-17 22:41:55 +0000
commitdc140c6e7b8350ca51aa1d408c10e25a27826e2c (patch)
tree8e765076d7d76778bf3621e93456bc6405628111 /lib/CodeGen/PrologEpilogInserter.cpp
parentb9072fdaad6f36c96fe294c523dca048fd50c36f (diff)
downloadllvm-dc140c6e7b8350ca51aa1d408c10e25a27826e2c.tar.gz
llvm-dc140c6e7b8350ca51aa1d408c10e25a27826e2c.tar.bz2
llvm-dc140c6e7b8350ca51aa1d408c10e25a27826e2c.tar.xz
Add materialization of virtual base registers for frame indices allocated into
the local block. Resolve references to those indices to a new base register. For simplification and testing purposes, a new virtual base register is allocated for each frame index being resolved. The result is truly horrible, but correct, code that's good for exercising the new code paths. Next up is adding thumb1 support, which should be very simple. Following that will be adding base register re-use and implementing a reasonable ARM heuristic for when a virtual base register should be generated at all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp
index 7b67473636..569faceffd 100644
--- a/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/lib/CodeGen/PrologEpilogInserter.cpp
@@ -560,7 +560,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
// check for whether the frame is large enough to want to use virtual
// frame index registers. Functions which don't want/need this optimization
// will continue to use the existing code path.
- if (EnableLocalStackAlloc) {
+ if (EnableLocalStackAlloc && MFI->getLocalFrameSize()) {
unsigned Align = MFI->getLocalFrameMaxAlign();
// Adjust to alignment boundary.