aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineFrameInfo.h
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-08-16 22:30:41 +0000
committerJim Grosbach <grosbach@apple.com>2010-08-16 22:30:41 +0000
commit4861ed60ac68a543d1b88e631e9fe2c55583b24b (patch)
tree0ce9c25e7e4d248c84ec8812633af7636e7867eb /include/llvm/CodeGen/MachineFrameInfo.h
parentdc66edaced5dacb56f06f52723dd340d5cfe4eab (diff)
downloadexternal_llvm-4861ed60ac68a543d1b88e631e9fe2c55583b24b.zip
external_llvm-4861ed60ac68a543d1b88e631e9fe2c55583b24b.tar.gz
external_llvm-4861ed60ac68a543d1b88e631e9fe2c55583b24b.tar.bz2
Better handle alignment requirements for local objects in pre-regalloc frame
mapping. Have the local block track its alignment requirement, and then apply that when the block itself is allocated. Previously, offsets could get adjusted in PEI to be different, relative to one another, than the block allocation thought they would be, which defeats the point of doing the allocation this way. Continuing rdar://8277890 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFrameInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineFrameInfo.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h
index c99b5f5..ba5d6ba 100644
--- a/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/include/llvm/CodeGen/MachineFrameInfo.h
@@ -212,6 +212,10 @@ class MachineFrameInfo {
/// target in eliminateFrameIndex().
int64_t LocalFrameBaseOffset;
+ /// Required alignment of the local object blob, which is the strictest
+ /// alignment of any object in it.
+ unsigned LocalFrameMaxAlign;
+
public:
explicit MachineFrameInfo(const TargetFrameInfo &tfi) : TFI(tfi) {
StackSize = NumFixedObjects = OffsetAdjustment = MaxAlignment = 0;
@@ -225,6 +229,7 @@ public:
CSIValid = false;
LocalFrameSize = 0;
LocalFrameBaseOffset = 0;
+ LocalFrameMaxAlign = 0;
}
/// hasStackObjects - Return true if there are any stack objects in this
@@ -302,6 +307,15 @@ public:
/// getLocalFrameSize - Get the size of the local object blob.
int64_t getLocalFrameSize() const { return LocalFrameSize; }
+ /// setLocalFrameMaxAlign - Required alignment of the local object blob,
+ /// which is the strictest alignment of any object in it.
+ void setLocalFrameMaxAlign(unsigned Align) { LocalFrameMaxAlign = Align; }
+
+ /// getLocalFrameMaxAlign - Return the required alignment of the local
+ /// object blob.
+ unsigned getLocalFrameMaxAlign() { return LocalFrameMaxAlign; }
+
+
/// isObjectPreAllocated - Return true if the object was pre-allocated into
/// the local block.
bool isObjectPreAllocated(int ObjectIdx) const {