Don't track max alignment during stack object allocations since they can be deleted later. Let PEI compute it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2008-02-27 10:04:56 +00:00
parent e90a615f37
commit be680dcea6
3 changed files with 34 additions and 6 deletions

View File

@@ -305,9 +305,6 @@ public:
/// a postive identifier to represent it.
///
int CreateStackObject(uint64_t 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;
@@ -331,7 +328,6 @@ public:
///
int CreateVariableSizedObject() {
HasVarSizedObjects = true;
if (MaxAlignment < 1) MaxAlignment = 1;
Objects.push_back(StackObject(0, 1, -1));
return Objects.size()-NumFixedObjects-1;
}