aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFrameInfo.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-03 21:38:39 +0000
committerChris Lattner <sabre@nondot.org>2006-04-03 21:38:39 +0000
commit208aa29feb38db9151526df2473713bd616582a8 (patch)
tree4a815ae800cd704c330ec4700a3bedee52a477fa /include/llvm/CodeGen/MachineFrameInfo.h
parent11e15b38e965731e5bfff6c73d8d269196e5048c (diff)
Keep track of max stack alignment as objects are added. Remove an obsolete method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFrameInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineFrameInfo.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h
index 32ec2ddaf9..201136d85c 100644
--- a/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/include/llvm/CodeGen/MachineFrameInfo.h
@@ -210,16 +210,14 @@ public:
/// a postive identifier to represent it.
///
int CreateStackObject(unsigned Size, unsigned Alignment) {
+ // Keep track of the maximum alignment.
+ if (MaxAlignment < Alignment) MaxAlignment = Alignment;
+
assert(Size != 0 && "Cannot allocate zero size stack objects!");
Objects.push_back(StackObject(Size, Alignment, -1));
return Objects.size()-NumFixedObjects-1;
}
- /// CreateStackObject - Create a stack object for a value of the specified
- /// LLVM type.
- ///
- int CreateStackObject(const Type *Ty, const TargetData &TD);
-
/// CreateVariableSizedObject - Notify the MachineFrameInfo object that a
/// variable sized object has been created. This must be created whenever a
/// variable sized object is created, whether or not the index returned is