1 //===-- CodeGen/MachineFrameInfo.h - Abstract Stack Frame Rep. --*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // The file defines the MachineFrameInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CODEGEN_MACHINEFRAMEINFO_H
15 #define LLVM_CODEGEN_MACHINEFRAMEINFO_H
17 #include "llvm/ADT/SmallVector.h"
18 #include "llvm/Support/DataTypes.h"
25 class TargetRegisterClass;
27 class MachineFunction;
28 class MachineBasicBlock;
29 class TargetFrameLowering;
35 /// The CalleeSavedInfo class tracks the information need to locate where a
36 /// callee saved register is in the current frame.
37 class CalleeSavedInfo {
42 explicit CalleeSavedInfo(unsigned R, int FI = 0)
43 : Reg(R), FrameIdx(FI) {}
46 unsigned getReg() const { return Reg; }
47 int getFrameIdx() const { return FrameIdx; }
48 void setFrameIdx(int FI) { FrameIdx = FI; }
51 /// The MachineFrameInfo class represents an abstract stack frame until
52 /// prolog/epilog code is inserted. This class is key to allowing stack frame
53 /// representation optimizations, such as frame pointer elimination. It also
54 /// allows more mundane (but still important) optimizations, such as reordering
55 /// of abstract objects on the stack frame.
57 /// To support this, the class assigns unique integer identifiers to stack
58 /// objects requested clients. These identifiers are negative integers for
59 /// fixed stack objects (such as arguments passed on the stack) or nonnegative
60 /// for objects that may be reordered. Instructions which refer to stack
61 /// objects use a special MO_FrameIndex operand to represent these frame
64 /// Because this class keeps track of all references to the stack frame, it
65 /// knows when a variable sized object is allocated on the stack. This is the
66 /// sole condition which prevents frame pointer elimination, which is an
67 /// important optimization on register-poor architectures. Because original
68 /// variable sized alloca's in the source program are the only source of
69 /// variable sized stack objects, it is safe to decide whether there will be
70 /// any variable sized objects before all stack objects are known (for
71 /// example, register allocator spill code never needs variable sized
74 /// When prolog/epilog code emission is performed, the final stack frame is
75 /// built and the machine instructions are modified to refer to the actual
76 /// stack offsets of the object, eliminating all MO_FrameIndex operands from
79 /// @brief Abstract Stack Frame Information
80 class MachineFrameInfo {
82 // StackObject - Represent a single object allocated on the stack.
84 // SPOffset - The offset of this object from the stack pointer on entry to
85 // the function. This field has no meaning for a variable sized element.
88 // The size of this object on the stack. 0 means a variable sized object,
89 // ~0ULL means a dead object.
92 // Alignment - The required alignment of this stack slot.
95 // isImmutable - If true, the value of the stack object is set before
96 // entering the function and is not modified inside the function. By
97 // default, fixed objects are immutable unless marked otherwise.
100 // isSpillSlot - If true the stack object is used as spill slot. It
101 // cannot alias any other memory objects.
104 /// Alloca - If this stack object is originated from an Alloca instruction
105 /// this value saves the original IR allocation. Can be NULL.
106 const AllocaInst *Alloca;
108 // PreAllocated - If true, the object was mapped into the local frame
109 // block and doesn't need additional handling for allocation beyond that.
112 // If true, an LLVM IR value might point to this object.
113 // Normally, spill slots and fixed-offset objects don't alias IR-accessible
114 // objects, but there are exceptions (on PowerPC, for example, some byval
115 // arguments have ABI-prescribed offsets).
118 StackObject(uint64_t Sz, unsigned Al, int64_t SP, bool IM,
119 bool isSS, const AllocaInst *Val, bool A)
120 : SPOffset(SP), Size(Sz), Alignment(Al), isImmutable(IM),
121 isSpillSlot(isSS), Alloca(Val), PreAllocated(false), isAliased(A) {}
124 /// StackAlignment - The alignment of the stack.
125 unsigned StackAlignment;
127 /// StackRealignable - Can the stack be realigned.
128 bool StackRealignable;
130 /// Objects - The list of stack objects allocated...
132 std::vector<StackObject> Objects;
134 /// NumFixedObjects - This contains the number of fixed objects contained on
135 /// the stack. Because fixed objects are stored at a negative index in the
136 /// Objects list, this is also the index to the 0th object in the list.
138 unsigned NumFixedObjects;
140 /// HasVarSizedObjects - This boolean keeps track of whether any variable
141 /// sized objects have been allocated yet.
143 bool HasVarSizedObjects;
145 /// FrameAddressTaken - This boolean keeps track of whether there is a call
146 /// to builtin \@llvm.frameaddress.
147 bool FrameAddressTaken;
149 /// ReturnAddressTaken - This boolean keeps track of whether there is a call
150 /// to builtin \@llvm.returnaddress.
151 bool ReturnAddressTaken;
153 /// HasStackMap - This boolean keeps track of whether there is a call
154 /// to builtin \@llvm.experimental.stackmap.
157 /// HasPatchPoint - This boolean keeps track of whether there is a call
158 /// to builtin \@llvm.experimental.patchpoint.
161 /// StackSize - The prolog/epilog code inserter calculates the final stack
162 /// offsets for all of the fixed size objects, updating the Objects list
163 /// above. It then updates StackSize to contain the number of bytes that need
164 /// to be allocated on entry to the function.
168 /// OffsetAdjustment - The amount that a frame offset needs to be adjusted to
169 /// have the actual offset from the stack/frame pointer. The exact usage of
170 /// this is target-dependent, but it is typically used to adjust between
171 /// SP-relative and FP-relative offsets. E.G., if objects are accessed via
172 /// SP then OffsetAdjustment is zero; if FP is used, OffsetAdjustment is set
173 /// to the distance between the initial SP and the value in FP. For many
174 /// targets, this value is only used when generating debug info (via
175 /// TargetRegisterInfo::getFrameIndexOffset); when generating code, the
176 /// corresponding adjustments are performed directly.
177 int OffsetAdjustment;
179 /// MaxAlignment - The prolog/epilog code inserter may process objects
180 /// that require greater alignment than the default alignment the target
181 /// provides. To handle this, MaxAlignment is set to the maximum alignment
182 /// needed by the objects on the current frame. If this is greater than the
183 /// native alignment maintained by the compiler, dynamic alignment code will
186 unsigned MaxAlignment;
188 /// AdjustsStack - Set to true if this function adjusts the stack -- e.g.,
189 /// when calling another function. This is only valid during and after
190 /// prolog/epilog code insertion.
193 /// HasCalls - Set to true if this function has any function calls.
196 /// StackProtectorIdx - The frame index for the stack protector.
197 int StackProtectorIdx;
199 /// FunctionContextIdx - The frame index for the function context. Used for
201 int FunctionContextIdx;
203 /// MaxCallFrameSize - This contains the size of the largest call frame if the
204 /// target uses frame setup/destroy pseudo instructions (as defined in the
205 /// TargetFrameInfo class). This information is important for frame pointer
206 /// elimination. If is only valid during and after prolog/epilog code
209 unsigned MaxCallFrameSize;
211 /// CSInfo - The prolog/epilog code inserter fills in this vector with each
212 /// callee saved register saved in the frame. Beyond its use by the prolog/
213 /// epilog code inserter, this data used for debug info and exception
215 std::vector<CalleeSavedInfo> CSInfo;
217 /// CSIValid - Has CSInfo been set yet?
220 /// LocalFrameObjects - References to frame indices which are mapped
221 /// into the local frame allocation block. <FrameIdx, LocalOffset>
222 SmallVector<std::pair<int, int64_t>, 32> LocalFrameObjects;
224 /// LocalFrameSize - Size of the pre-allocated local frame block.
225 int64_t LocalFrameSize;
227 /// Required alignment of the local object blob, which is the strictest
228 /// alignment of any object in it.
229 unsigned LocalFrameMaxAlign;
231 /// Whether the local object blob needs to be allocated together. If not,
232 /// PEI should ignore the isPreAllocated flags on the stack objects and
233 /// just allocate them normally.
234 bool UseLocalStackAllocationBlock;
236 /// Whether the "realign-stack" option is on.
239 /// True if the function includes inline assembly that adjusts the stack
241 bool HasInlineAsmWithSPAdjust;
243 /// True if the function contains a call to the llvm.vastart intrinsic.
246 /// True if this is a varargs function that contains a musttail call.
247 bool HasMustTailInVarArgFunc;
249 /// True if this function contains a tail call. If so immutable objects like
250 /// function arguments are no longer so. A tail call *can* override fixed
251 /// stack objects like arguments so we can't treat them as immutable.
254 /// Not null, if shrink-wrapping found a better place for the prologue.
255 MachineBasicBlock *Save;
256 /// Not null, if shrink-wrapping found a better place for the epilogue.
257 MachineBasicBlock *Restore;
259 /// Check if it exists a path from \p MBB leading to the basic
260 /// block with a SavePoint (a.k.a. prologue).
261 bool isBeforeSavePoint(const MachineFunction &MF,
262 const MachineBasicBlock &MBB) const;
265 explicit MachineFrameInfo(unsigned StackAlign, bool isStackRealign,
267 : StackAlignment(StackAlign), StackRealignable(isStackRealign),
268 RealignOption(RealignOpt) {
269 StackSize = NumFixedObjects = OffsetAdjustment = MaxAlignment = 0;
270 HasVarSizedObjects = false;
271 FrameAddressTaken = false;
272 ReturnAddressTaken = false;
274 HasPatchPoint = false;
275 AdjustsStack = false;
277 StackProtectorIdx = -1;
278 FunctionContextIdx = -1;
279 MaxCallFrameSize = 0;
282 LocalFrameMaxAlign = 0;
283 UseLocalStackAllocationBlock = false;
284 HasInlineAsmWithSPAdjust = false;
286 HasMustTailInVarArgFunc = false;
292 /// hasStackObjects - Return true if there are any stack objects in this
295 bool hasStackObjects() const { return !Objects.empty(); }
297 /// hasVarSizedObjects - This method may be called any time after instruction
298 /// selection is complete to determine if the stack frame for this function
299 /// contains any variable sized objects.
301 bool hasVarSizedObjects() const { return HasVarSizedObjects; }
303 /// getStackProtectorIndex/setStackProtectorIndex - Return the index for the
304 /// stack protector object.
306 int getStackProtectorIndex() const { return StackProtectorIdx; }
307 void setStackProtectorIndex(int I) { StackProtectorIdx = I; }
309 /// getFunctionContextIndex/setFunctionContextIndex - Return the index for the
310 /// function context object. This object is used for SjLj exceptions.
311 int getFunctionContextIndex() const { return FunctionContextIdx; }
312 void setFunctionContextIndex(int I) { FunctionContextIdx = I; }
314 /// isFrameAddressTaken - This method may be called any time after instruction
315 /// selection is complete to determine if there is a call to
316 /// \@llvm.frameaddress in this function.
317 bool isFrameAddressTaken() const { return FrameAddressTaken; }
318 void setFrameAddressIsTaken(bool T) { FrameAddressTaken = T; }
320 /// isReturnAddressTaken - This method may be called any time after
321 /// instruction selection is complete to determine if there is a call to
322 /// \@llvm.returnaddress in this function.
323 bool isReturnAddressTaken() const { return ReturnAddressTaken; }
324 void setReturnAddressIsTaken(bool s) { ReturnAddressTaken = s; }
326 /// hasStackMap - This method may be called any time after instruction
327 /// selection is complete to determine if there is a call to builtin
328 /// \@llvm.experimental.stackmap.
329 bool hasStackMap() const { return HasStackMap; }
330 void setHasStackMap(bool s = true) { HasStackMap = s; }
332 /// hasPatchPoint - This method may be called any time after instruction
333 /// selection is complete to determine if there is a call to builtin
334 /// \@llvm.experimental.patchpoint.
335 bool hasPatchPoint() const { return HasPatchPoint; }
336 void setHasPatchPoint(bool s = true) { HasPatchPoint = s; }
338 /// getObjectIndexBegin - Return the minimum frame object index.
340 int getObjectIndexBegin() const { return -NumFixedObjects; }
342 /// getObjectIndexEnd - Return one past the maximum frame object index.
344 int getObjectIndexEnd() const { return (int)Objects.size()-NumFixedObjects; }
346 /// getNumFixedObjects - Return the number of fixed objects.
347 unsigned getNumFixedObjects() const { return NumFixedObjects; }
349 /// getNumObjects - Return the number of objects.
351 unsigned getNumObjects() const { return Objects.size(); }
353 /// mapLocalFrameObject - Map a frame index into the local object block
354 void mapLocalFrameObject(int ObjectIndex, int64_t Offset) {
355 LocalFrameObjects.push_back(std::pair<int, int64_t>(ObjectIndex, Offset));
356 Objects[ObjectIndex + NumFixedObjects].PreAllocated = true;
359 /// getLocalFrameObjectMap - Get the local offset mapping for a for an object
360 std::pair<int, int64_t> getLocalFrameObjectMap(int i) {
361 assert (i >= 0 && (unsigned)i < LocalFrameObjects.size() &&
362 "Invalid local object reference!");
363 return LocalFrameObjects[i];
366 /// getLocalFrameObjectCount - Return the number of objects allocated into
367 /// the local object block.
368 int64_t getLocalFrameObjectCount() { return LocalFrameObjects.size(); }
370 /// setLocalFrameSize - Set the size of the local object blob.
371 void setLocalFrameSize(int64_t sz) { LocalFrameSize = sz; }
373 /// getLocalFrameSize - Get the size of the local object blob.
374 int64_t getLocalFrameSize() const { return LocalFrameSize; }
376 /// setLocalFrameMaxAlign - Required alignment of the local object blob,
377 /// which is the strictest alignment of any object in it.
378 void setLocalFrameMaxAlign(unsigned Align) { LocalFrameMaxAlign = Align; }
380 /// getLocalFrameMaxAlign - Return the required alignment of the local
382 unsigned getLocalFrameMaxAlign() const { return LocalFrameMaxAlign; }
384 /// getUseLocalStackAllocationBlock - Get whether the local allocation blob
385 /// should be allocated together or let PEI allocate the locals in it
387 bool getUseLocalStackAllocationBlock() {return UseLocalStackAllocationBlock;}
389 /// setUseLocalStackAllocationBlock - Set whether the local allocation blob
390 /// should be allocated together or let PEI allocate the locals in it
392 void setUseLocalStackAllocationBlock(bool v) {
393 UseLocalStackAllocationBlock = v;
396 /// isObjectPreAllocated - Return true if the object was pre-allocated into
398 bool isObjectPreAllocated(int ObjectIdx) const {
399 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
400 "Invalid Object Idx!");
401 return Objects[ObjectIdx+NumFixedObjects].PreAllocated;
404 /// getObjectSize - Return the size of the specified object.
406 int64_t getObjectSize(int ObjectIdx) const {
407 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
408 "Invalid Object Idx!");
409 return Objects[ObjectIdx+NumFixedObjects].Size;
412 /// setObjectSize - Change the size of the specified stack object.
413 void setObjectSize(int ObjectIdx, int64_t Size) {
414 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
415 "Invalid Object Idx!");
416 Objects[ObjectIdx+NumFixedObjects].Size = Size;
419 /// getObjectAlignment - Return the alignment of the specified stack object.
420 unsigned getObjectAlignment(int ObjectIdx) const {
421 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
422 "Invalid Object Idx!");
423 return Objects[ObjectIdx+NumFixedObjects].Alignment;
426 /// setObjectAlignment - Change the alignment of the specified stack object.
427 void setObjectAlignment(int ObjectIdx, unsigned Align) {
428 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
429 "Invalid Object Idx!");
430 Objects[ObjectIdx+NumFixedObjects].Alignment = Align;
431 ensureMaxAlignment(Align);
434 /// getObjectAllocation - Return the underlying Alloca of the specified
435 /// stack object if it exists. Returns 0 if none exists.
436 const AllocaInst* getObjectAllocation(int ObjectIdx) const {
437 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
438 "Invalid Object Idx!");
439 return Objects[ObjectIdx+NumFixedObjects].Alloca;
442 /// getObjectOffset - Return the assigned stack offset of the specified object
443 /// from the incoming stack pointer.
445 int64_t getObjectOffset(int ObjectIdx) const {
446 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
447 "Invalid Object Idx!");
448 assert(!isDeadObjectIndex(ObjectIdx) &&
449 "Getting frame offset for a dead object?");
450 return Objects[ObjectIdx+NumFixedObjects].SPOffset;
453 /// setObjectOffset - Set the stack frame offset of the specified object. The
454 /// offset is relative to the stack pointer on entry to the function.
456 void setObjectOffset(int ObjectIdx, int64_t SPOffset) {
457 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
458 "Invalid Object Idx!");
459 assert(!isDeadObjectIndex(ObjectIdx) &&
460 "Setting frame offset for a dead object?");
461 Objects[ObjectIdx+NumFixedObjects].SPOffset = SPOffset;
464 /// getStackSize - Return the number of bytes that must be allocated to hold
465 /// all of the fixed size frame objects. This is only valid after
466 /// Prolog/Epilog code insertion has finalized the stack frame layout.
468 uint64_t getStackSize() const { return StackSize; }
470 /// setStackSize - Set the size of the stack...
472 void setStackSize(uint64_t Size) { StackSize = Size; }
474 /// Estimate and return the size of the stack frame.
475 unsigned estimateStackSize(const MachineFunction &MF) const;
477 /// getOffsetAdjustment - Return the correction for frame offsets.
479 int getOffsetAdjustment() const { return OffsetAdjustment; }
481 /// setOffsetAdjustment - Set the correction for frame offsets.
483 void setOffsetAdjustment(int Adj) { OffsetAdjustment = Adj; }
485 /// getMaxAlignment - Return the alignment in bytes that this function must be
486 /// aligned to, which is greater than the default stack alignment provided by
489 unsigned getMaxAlignment() const { return MaxAlignment; }
491 /// ensureMaxAlignment - Make sure the function is at least Align bytes
493 void ensureMaxAlignment(unsigned Align);
495 /// AdjustsStack - Return true if this function adjusts the stack -- e.g.,
496 /// when calling another function. This is only valid during and after
497 /// prolog/epilog code insertion.
498 bool adjustsStack() const { return AdjustsStack; }
499 void setAdjustsStack(bool V) { AdjustsStack = V; }
501 /// hasCalls - Return true if the current function has any function calls.
502 bool hasCalls() const { return HasCalls; }
503 void setHasCalls(bool V) { HasCalls = V; }
505 /// Returns true if the function contains any stack-adjusting inline assembly.
506 bool hasInlineAsmWithSPAdjust() const { return HasInlineAsmWithSPAdjust; }
507 void setHasInlineAsmWithSPAdjust(bool B) { HasInlineAsmWithSPAdjust = B; }
509 /// Returns true if the function calls the llvm.va_start intrinsic.
510 bool hasVAStart() const { return HasVAStart; }
511 void setHasVAStart(bool B) { HasVAStart = B; }
513 /// Returns true if the function is variadic and contains a musttail call.
514 bool hasMustTailInVarArgFunc() const { return HasMustTailInVarArgFunc; }
515 void setHasMustTailInVarArgFunc(bool B) { HasMustTailInVarArgFunc = B; }
517 /// Returns true if the function contains a tail call.
518 bool hasTailCall() const { return HasTailCall; }
519 void setHasTailCall() { HasTailCall = true; }
521 /// getMaxCallFrameSize - Return the maximum size of a call frame that must be
522 /// allocated for an outgoing function call. This is only available if
523 /// CallFrameSetup/Destroy pseudo instructions are used by the target, and
524 /// then only during or after prolog/epilog code insertion.
526 unsigned getMaxCallFrameSize() const { return MaxCallFrameSize; }
527 void setMaxCallFrameSize(unsigned S) { MaxCallFrameSize = S; }
529 /// CreateFixedObject - Create a new object at a fixed location on the stack.
530 /// All fixed objects should be created before other objects are created for
531 /// efficiency. By default, fixed objects are not pointed to by LLVM IR
532 /// values. This returns an index with a negative value.
534 int CreateFixedObject(uint64_t Size, int64_t SPOffset, bool Immutable,
535 bool isAliased = false);
537 /// CreateFixedSpillStackObject - Create a spill slot at a fixed location
538 /// on the stack. Returns an index with a negative value.
539 int CreateFixedSpillStackObject(uint64_t Size, int64_t SPOffset);
541 /// isFixedObjectIndex - Returns true if the specified index corresponds to a
542 /// fixed stack object.
543 bool isFixedObjectIndex(int ObjectIdx) const {
544 return ObjectIdx < 0 && (ObjectIdx >= -(int)NumFixedObjects);
547 /// isAliasedObjectIndex - Returns true if the specified index corresponds
548 /// to an object that might be pointed to by an LLVM IR value.
549 bool isAliasedObjectIndex(int ObjectIdx) const {
550 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
551 "Invalid Object Idx!");
552 return Objects[ObjectIdx+NumFixedObjects].isAliased;
555 /// isImmutableObjectIndex - Returns true if the specified index corresponds
556 /// to an immutable object.
557 bool isImmutableObjectIndex(int ObjectIdx) const {
558 // Tail calling functions can clobber their function arguments.
561 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
562 "Invalid Object Idx!");
563 return Objects[ObjectIdx+NumFixedObjects].isImmutable;
566 /// isSpillSlotObjectIndex - Returns true if the specified index corresponds
567 /// to a spill slot..
568 bool isSpillSlotObjectIndex(int ObjectIdx) const {
569 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
570 "Invalid Object Idx!");
571 return Objects[ObjectIdx+NumFixedObjects].isSpillSlot;
574 /// isDeadObjectIndex - Returns true if the specified index corresponds to
576 bool isDeadObjectIndex(int ObjectIdx) const {
577 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
578 "Invalid Object Idx!");
579 return Objects[ObjectIdx+NumFixedObjects].Size == ~0ULL;
582 /// CreateStackObject - Create a new statically sized stack object, returning
583 /// a nonnegative identifier to represent it.
585 int CreateStackObject(uint64_t Size, unsigned Alignment, bool isSS,
586 const AllocaInst *Alloca = nullptr);
588 /// CreateSpillStackObject - Create a new statically sized stack object that
589 /// represents a spill slot, returning a nonnegative identifier to represent
592 int CreateSpillStackObject(uint64_t Size, unsigned Alignment);
594 /// RemoveStackObject - Remove or mark dead a statically sized stack object.
596 void RemoveStackObject(int ObjectIdx) {
598 Objects[ObjectIdx+NumFixedObjects].Size = ~0ULL;
601 /// CreateVariableSizedObject - Notify the MachineFrameInfo object that a
602 /// variable sized object has been created. This must be created whenever a
603 /// variable sized object is created, whether or not the index returned is
606 int CreateVariableSizedObject(unsigned Alignment, const AllocaInst *Alloca);
608 /// getCalleeSavedInfo - Returns a reference to call saved info vector for the
609 /// current function.
610 const std::vector<CalleeSavedInfo> &getCalleeSavedInfo() const {
614 /// setCalleeSavedInfo - Used by prolog/epilog inserter to set the function's
615 /// callee saved information.
616 void setCalleeSavedInfo(const std::vector<CalleeSavedInfo> &CSI) {
620 /// isCalleeSavedInfoValid - Has the callee saved info been calculated yet?
621 bool isCalleeSavedInfoValid() const { return CSIValid; }
623 void setCalleeSavedInfoValid(bool v) { CSIValid = v; }
625 MachineBasicBlock *getSavePoint() const { return Save; }
626 void setSavePoint(MachineBasicBlock *NewSave) { Save = NewSave; }
627 MachineBasicBlock *getRestorePoint() const { return Restore; }
628 void setRestorePoint(MachineBasicBlock *NewRestore) { Restore = NewRestore; }
630 /// getPristineRegs - Return a set of physical registers that are pristine on
631 /// entry to the MBB.
633 /// Pristine registers hold a value that is useless to the current function,
634 /// but that must be preserved - they are callee saved registers that have not
637 /// Before the PrologueEpilogueInserter has placed the CSR spill code, this
638 /// method always returns an empty set.
639 BitVector getPristineRegs(const MachineBasicBlock *MBB) const;
641 /// print - Used by the MachineFunction printer to print information about
642 /// stack objects. Implemented in MachineFunction.cpp
644 void print(const MachineFunction &MF, raw_ostream &OS) const;
646 /// dump - Print the function to stderr.
647 void dump(const MachineFunction &MF) const;
650 } // End llvm namespace