- Objects.push_back(StackObject(Size, Alignment));
- return (int)Objects.size()-NumFixedObjects-1;
+ Objects.push_back(StackObject(Size, Alignment, 0, false, isSS));
+ int Index = (int)Objects.size()-NumFixedObjects-1;
+ assert(Index >= 0 && "Bad frame index!");
+ MaxAlignment = std::max(MaxAlignment, Alignment);
+ return Index;
+ }
+
+ /// CreateSpillStackObject - Create a new statically sized stack
+ /// object that represents a spill slot, returning a nonnegative
+ /// identifier to represent it.
+ ///
+ int CreateSpillStackObject(uint64_t Size, unsigned Alignment) {
+ CreateStackObject(Size, Alignment, true);
+ int Index = (int)Objects.size()-NumFixedObjects-1;
+ MaxAlignment = std::max(MaxAlignment, Alignment);
+ return Index;