summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFrameInfo.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-10-17 09:20:14 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-10-17 09:20:14 +0000
commit491f54f1fd700204db0a19efde0cc2627641d711 (patch)
treeab872f273e18f6668a5aad26d1d7692a6a0b842d /include/llvm/CodeGen/MachineFrameInfo.h
parenta8e65426107be9c04e09ba29b3d7b54e168236d6 (diff)
downloadllvm-491f54f1fd700204db0a19efde0cc2627641d711.tar.gz
llvm-491f54f1fd700204db0a19efde0cc2627641d711.tar.bz2
llvm-491f54f1fd700204db0a19efde0cc2627641d711.tar.xz
Distinquish stack slots from other stack objects. They (and fixed objects) get FixedStack PseudoSourceValues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84326 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFrameInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineFrameInfo.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h
index 99a4c3d07d..a04189c436 100644
--- a/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/include/llvm/CodeGen/MachineFrameInfo.h
@@ -102,8 +102,14 @@ class MachineFrameInfo {
// default, fixed objects are immutable unless marked otherwise.
bool isImmutable;
- StackObject(uint64_t Sz, unsigned Al, int64_t SP = 0, bool IM = false)
- : SPOffset(SP), Size(Sz), Alignment(Al), isImmutable(IM) {}
+ // isSpillSlot - If true, the stack object is used as spill slot. It
+ // cannot alias any other memory objects.
+ bool isSpillSlot;
+
+ StackObject(uint64_t Sz, unsigned Al, int64_t SP = 0, bool IM = false,
+ bool isSS = false)
+ : SPOffset(SP), Size(Sz), Alignment(Al), isImmutable(IM),
+ isSpillSlot(isSS) {}
};
/// Objects - The list of stack objects allocated...
@@ -352,6 +358,14 @@ public:
return Objects[ObjectIdx+NumFixedObjects].isImmutable;
}
+ /// isSpillSlotObjectIndex - Returns true if the specified index corresponds
+ /// to a spill slot..
+ bool isSpillSlotObjectIndex(int ObjectIdx) const {
+ assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
+ "Invalid Object Idx!");
+ return Objects[ObjectIdx+NumFixedObjects].isSpillSlot;;
+ }
+
/// isDeadObjectIndex - Returns true if the specified index corresponds to
/// a dead object.
bool isDeadObjectIndex(int ObjectIdx) const {
@@ -363,9 +377,9 @@ public:
/// CreateStackObject - Create a new statically sized stack object, returning
/// a nonnegative identifier to represent it.
///
- int CreateStackObject(uint64_t Size, unsigned Alignment) {
+ int CreateStackObject(uint64_t Size, unsigned Alignment, bool isSS = false) {
assert(Size != 0 && "Cannot allocate zero size stack objects!");
- Objects.push_back(StackObject(Size, Alignment));
+ Objects.push_back(StackObject(Size, Alignment, 0, false, isSS));
return (int)Objects.size()-NumFixedObjects-1;
}