summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFrameInfo.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-07-17 00:28:22 +0000
committerEric Christopher <echristo@apple.com>2010-07-17 00:28:22 +0000
commit2b8271e0298f4218d6dddc80b49b51b38a646353 (patch)
treedb44867300795b3f121562a0c58cfd8e7b272b6d /include/llvm/CodeGen/MachineFrameInfo.h
parentd4c36cec1db81b4ee48cd4ab462262615d78f22c (diff)
downloadllvm-2b8271e0298f4218d6dddc80b49b51b38a646353.tar.gz
llvm-2b8271e0298f4218d6dddc80b49b51b38a646353.tar.bz2
llvm-2b8271e0298f4218d6dddc80b49b51b38a646353.tar.xz
Propagate alloca alignment information via variable size object frame
information. No functional change yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFrameInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineFrameInfo.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h
index 9471316d25..86fb23787b 100644
--- a/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/include/llvm/CodeGen/MachineFrameInfo.h
@@ -417,9 +417,10 @@ public:
/// variable sized object is created, whether or not the index returned is
/// actually used.
///
- int CreateVariableSizedObject() {
+ int CreateVariableSizedObject(unsigned Alignment) {
HasVarSizedObjects = true;
- Objects.push_back(StackObject(0, 1, 0, false, false));
+ Objects.push_back(StackObject(0, Alignment, 0, false, false));
+ MaxAlignment = std::max(MaxAlignment, Alignment);
return (int)Objects.size()-NumFixedObjects-1;
}