LLVM 24.0.0git
MachineFrameInfo.h
Go to the documentation of this file.
1//===-- CodeGen/MachineFrameInfo.h - Abstract Stack Frame Rep. --*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// The file defines the MachineFrameInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CODEGEN_MACHINEFRAMEINFO_H
14#define LLVM_CODEGEN_MACHINEFRAMEINFO_H
15
22#include <cassert>
23#include <vector>
24
25namespace llvm {
26class raw_ostream;
27class MachineFunction;
29class BitVector;
30class AllocaInst;
31
32/// The CalleeSavedInfo class tracks the information need to locate where a
33/// callee saved register is in the current frame.
34/// Callee saved reg can also be saved to a different register rather than
35/// on the stack by setting DstReg instead of FrameIdx.
37 MCRegister Reg;
38 union {
40 unsigned DstReg;
41 };
42 /// Flag indicating whether the register is actually restored in the epilog.
43 /// In most cases, if a register is saved, it is also restored. There are
44 /// some situations, though, when this is not the case. For example, the
45 /// LR register on ARM is usually saved, but on exit from the function its
46 /// saved value may be loaded directly into PC. Since liveness tracking of
47 /// physical registers treats callee-saved registers are live outside of
48 /// the function, LR would be treated as live-on-exit, even though in these
49 /// scenarios it is not. This flag is added to indicate that the saved
50 /// register described by this object is not restored in the epilog.
51 /// The long-term solution is to model the liveness of callee-saved registers
52 /// by implicit uses on the return instructions, however, the required
53 /// changes in the ARM backend would be quite extensive.
54 bool Restored = true;
55 /// Flag indicating whether the register is spilled to stack or another
56 /// register.
57 bool SpilledToReg = false;
58
59public:
60 explicit CalleeSavedInfo(MCRegister R, int FI = 0) : Reg(R), FrameIdx(FI) {}
61
62 // Accessors.
63 MCRegister getReg() const { return Reg; }
64 int getFrameIdx() const { return FrameIdx; }
65 MCRegister getDstReg() const { return DstReg; }
66 void setReg(MCRegister R) { Reg = R; }
67 void setFrameIdx(int FI) {
68 FrameIdx = FI;
69 SpilledToReg = false;
70 }
71 void setDstReg(MCRegister SpillReg) {
72 DstReg = SpillReg.id();
73 SpilledToReg = true;
74 }
75 bool isRestored() const { return Restored; }
76 void setRestored(bool R) { Restored = R; }
77 bool isSpilledToReg() const { return SpilledToReg; }
78};
79
82
83/// The MachineFrameInfo class represents an abstract stack frame until
84/// prolog/epilog code is inserted. This class is key to allowing stack frame
85/// representation optimizations, such as frame pointer elimination. It also
86/// allows more mundane (but still important) optimizations, such as reordering
87/// of abstract objects on the stack frame.
88///
89/// To support this, the class assigns unique integer identifiers to stack
90/// objects requested clients. These identifiers are negative integers for
91/// fixed stack objects (such as arguments passed on the stack) or nonnegative
92/// for objects that may be reordered. Instructions which refer to stack
93/// objects use a special MO_FrameIndex operand to represent these frame
94/// indexes.
95///
96/// Because this class keeps track of all references to the stack frame, it
97/// knows when a variable sized object is allocated on the stack. This is the
98/// sole condition which prevents frame pointer elimination, which is an
99/// important optimization on register-poor architectures. Because original
100/// variable sized alloca's in the source program are the only source of
101/// variable sized stack objects, it is safe to decide whether there will be
102/// any variable sized objects before all stack objects are known (for
103/// example, register allocator spill code never needs variable sized
104/// objects).
105///
106/// When prolog/epilog code emission is performed, the final stack frame is
107/// built and the machine instructions are modified to refer to the actual
108/// stack offsets of the object, eliminating all MO_FrameIndex operands from
109/// the program.
110///
111/// Abstract Stack Frame Information
113public:
114 /// Stack Smashing Protection (SSP) rules require that vulnerable stack
115 /// allocations are located close the stack protector.
117 SSPLK_None, ///< Did not trigger a stack protector. No effect on data
118 ///< layout.
119 SSPLK_LargeArray, ///< Array or nested array >= SSP-buffer-size. Closest
120 ///< to the stack protector.
121 SSPLK_SmallArray, ///< Array or nested array < SSP-buffer-size. 2nd closest
122 ///< to the stack protector.
123 SSPLK_AddrOf ///< The address of this allocation is exposed and
124 ///< triggered protection. 3rd closest to the protector.
125 };
126
127private:
128 // Represent a single object allocated on the stack.
129 struct StackObject {
130 // The offset of this object from the stack pointer on entry to
131 // the function. This field has no meaning for a variable sized element.
132 int64_t SPOffset;
133
134 // The size of this object on the stack. 0 means a variable sized object.
136
137 // The required alignment of this stack slot.
138 Align Alignment;
139
140 // If true, the value of the stack object is set before
141 // entering the function and is not modified inside the function. By
142 // default, fixed objects are immutable unless marked otherwise.
143 bool isImmutable;
144
145 // If true the stack object is used as spill slot. It
146 // cannot alias any other memory objects.
147 bool isSpillSlot;
148
149 /// If true, this stack slot is used to spill a value (could be deopt
150 /// and/or GC related) over a statepoint. We know that the address of the
151 /// slot can't alias any LLVM IR value. This is very similar to a Spill
152 /// Slot, but is created by statepoint lowering is SelectionDAG, not the
153 /// register allocator.
154 bool isStatepointSpillSlot = false;
155
156 /// If true, this stack slot is used for spilling a callee saved register
157 /// in the calling convention of the containing function.
158 bool isCalleeSaved = false;
159
160 /// If true, this stack object has been removed and no longer occupies a
161 /// stack slot. Kept separate from Size so that an object of UINT64_MAX
162 /// bytes is not mistaken for a dead one.
163 bool isDead = false;
164
165 /// Identifier for stack memory type analagous to address space. If this is
166 /// non-0, the meaning is target defined. Offsets cannot be directly
167 /// compared between objects with different stack IDs. The object may not
168 /// necessarily reside in the same contiguous memory block as other stack
169 /// objects. Objects with differing stack IDs should not be merged or
170 /// replaced substituted for each other.
171 //
172 /// It is assumed a target uses consecutive, increasing stack IDs starting
173 /// from 1.
174 uint8_t StackID;
175
176 /// If this stack object is originated from an Alloca instruction
177 /// this value saves the original IR allocation. Can be NULL.
178 const AllocaInst *Alloca;
179
180 // If true, the object was mapped into the local frame
181 // block and doesn't need additional handling for allocation beyond that.
182 bool PreAllocated = false;
183
184 // If true, an LLVM IR value might point to this object.
185 // Normally, spill slots and fixed-offset objects don't alias IR-accessible
186 // objects, but there are exceptions (on PowerPC, for example, some byval
187 // arguments have ABI-prescribed offsets).
188 bool isAliased;
189
190 /// If true, the object has been zero-extended.
191 bool isZExt = false;
192
193 /// If true, the object has been sign-extended.
194 bool isSExt = false;
195
196 uint8_t SSPLayout = SSPLK_None;
197
198 StackObject(uint64_t Size, Align Alignment, int64_t SPOffset,
199 bool IsImmutable, bool IsSpillSlot, const AllocaInst *Alloca,
200 bool IsAliased, uint8_t StackID = 0)
201 : SPOffset(SPOffset), Size(Size), Alignment(Alignment),
202 isImmutable(IsImmutable), isSpillSlot(IsSpillSlot), StackID(StackID),
203 Alloca(Alloca), isAliased(IsAliased) {}
204 };
205
206 /// The alignment of the stack.
207 Align StackAlignment;
208
209 /// Can the stack be realigned. This can be false if the target does not
210 /// support stack realignment, or if the user asks us not to realign the
211 /// stack. In this situation, overaligned allocas are all treated as dynamic
212 /// allocations and the target must handle them as part of DYNAMIC_STACKALLOC
213 /// lowering. All non-alloca stack objects have their alignment clamped to the
214 /// base ABI stack alignment.
215 /// FIXME: There is room for improvement in this case, in terms of
216 /// grouping overaligned allocas into a "secondary stack frame" and
217 /// then only use a single alloca to allocate this frame and only a
218 /// single virtual register to access it. Currently, without such an
219 /// optimization, each such alloca gets its own dynamic realignment.
220 bool StackRealignable;
221
222 /// Whether the function has the \c alignstack attribute.
223 bool ForcedRealign;
224
225 /// The list of stack objects allocated.
226 std::vector<StackObject> Objects;
227
228 /// This contains the number of fixed objects contained on
229 /// the stack. Because fixed objects are stored at a negative index in the
230 /// Objects list, this is also the index to the 0th object in the list.
231 unsigned NumFixedObjects = 0;
232
233 /// This boolean keeps track of whether any variable
234 /// sized objects have been allocated yet.
235 bool HasVarSizedObjects = false;
236
237 /// This boolean keeps track of whether there is a call
238 /// to builtin \@llvm.frameaddress.
239 bool FrameAddressTaken = false;
240
241 /// This boolean keeps track of whether there is a call
242 /// to builtin \@llvm.returnaddress.
243 bool ReturnAddressTaken = false;
244
245 /// This boolean keeps track of whether there is a call
246 /// to builtin \@llvm.experimental.stackmap.
247 bool HasStackMap = false;
248
249 /// This boolean keeps track of whether there is a call
250 /// to builtin \@llvm.experimental.patchpoint.
251 bool HasPatchPoint = false;
252
253 /// The prolog/epilog code inserter calculates the final stack
254 /// offsets for all of the fixed size objects, updating the Objects list
255 /// above. It then updates StackSize to contain the number of bytes that need
256 /// to be allocated on entry to the function.
257 uint64_t StackSize = 0;
258
259 /// The amount that a frame offset needs to be adjusted to
260 /// have the actual offset from the stack/frame pointer. The exact usage of
261 /// this is target-dependent, but it is typically used to adjust between
262 /// SP-relative and FP-relative offsets. E.G., if objects are accessed via
263 /// SP then OffsetAdjustment is zero; if FP is used, OffsetAdjustment is set
264 /// to the distance between the initial SP and the value in FP. For many
265 /// targets, this value is only used when generating debug info (via
266 /// TargetRegisterInfo::getFrameIndexReference); when generating code, the
267 /// corresponding adjustments are performed directly.
268 int64_t OffsetAdjustment = 0;
269
270 /// The prolog/epilog code inserter may process objects that require greater
271 /// alignment than the default alignment the target provides.
272 /// To handle this, MaxAlignment is set to the maximum alignment
273 /// needed by the objects on the current frame. If this is greater than the
274 /// native alignment maintained by the compiler, dynamic alignment code will
275 /// be needed.
276 ///
277 Align MaxAlignment;
278
279 /// Set to true if this function adjusts the stack -- e.g.,
280 /// when calling another function. This is only valid during and after
281 /// prolog/epilog code insertion.
282 bool AdjustsStack = false;
283
284 /// Set to true if this function has any function calls.
285 bool HasCalls = false;
286
287 /// Frame-pointer policy for this function to avoid repeated attribute
288 /// lookups in hot paths.
289 FramePointerKind FramePointerPolicy = FramePointerKind::None;
290
291 /// The frame index for the stack protector.
292 int StackProtectorIdx = -1;
293
294 /// The frame index for the function context. Used for SjLj exceptions.
295 int FunctionContextIdx = -1;
296
297 /// This contains the size of the largest call frame if the target uses frame
298 /// setup/destroy pseudo instructions (as defined in the TargetFrameInfo
299 /// class). This information is important for frame pointer elimination.
300 /// It is only valid during and after prolog/epilog code insertion.
301 uint64_t MaxCallFrameSize = ~UINT64_C(0);
302
303 /// The number of bytes of callee saved registers that the target wants to
304 /// report for the current function in the CodeView S_FRAMEPROC record.
305 unsigned CVBytesOfCalleeSavedRegisters = 0;
306
307 /// The prolog/epilog code inserter fills in this vector with each
308 /// callee saved register saved in either the frame or a different
309 /// register. Beyond its use by the prolog/ epilog code inserter,
310 /// this data is used for debug info and exception handling.
311 std::vector<CalleeSavedInfo> CSInfo;
312
313 /// Has CSInfo been set yet?
314 bool CSIValid = false;
315
316 /// References to frame indices which are mapped
317 /// into the local frame allocation block. <FrameIdx, LocalOffset>
318 SmallVector<std::pair<int, int64_t>, 32> LocalFrameObjects;
319
320 /// Size of the pre-allocated local frame block.
321 int64_t LocalFrameSize = 0;
322
323 /// Required alignment of the local object blob, which is the strictest
324 /// alignment of any object in it.
325 Align LocalFrameMaxAlign;
326
327 /// Whether the local object blob needs to be allocated together. If not,
328 /// PEI should ignore the isPreAllocated flags on the stack objects and
329 /// just allocate them normally.
330 bool UseLocalStackAllocationBlock = false;
331
332 /// True if the function dynamically adjusts the stack pointer through some
333 /// opaque mechanism like inline assembly or Win32 EH.
334 bool HasOpaqueSPAdjustment = false;
335
336 /// True if the function contains operations which will lower down to
337 /// instructions which manipulate the stack pointer.
338 bool HasCopyImplyingStackAdjustment = false;
339
340 /// True if the function contains a call to the llvm.vastart intrinsic.
341 bool HasVAStart = false;
342
343 /// True if this is a varargs function that contains a musttail call.
344 bool HasMustTailInVarArgFunc = false;
345
346 /// True if this function contains a tail call. If so immutable objects like
347 /// function arguments are no longer so. A tail call *can* override fixed
348 /// stack objects like arguments so we can't treat them as immutable.
349 bool HasTailCall = false;
350
351 /// Not empty, if shrink-wrapping found a better place for the prologue.
352 SaveRestorePoints SavePoints;
353 /// Not empty, if shrink-wrapping found a better place for the epilogue.
354 SaveRestorePoints RestorePoints;
355
356 /// Size of the UnsafeStack Frame
357 uint64_t UnsafeStackSize = 0;
358
359public:
360 explicit MachineFrameInfo(Align StackAlignment, bool StackRealignable,
361 bool ForcedRealign)
362 : StackAlignment(StackAlignment),
363 StackRealignable(StackRealignable), ForcedRealign(ForcedRealign) {}
364
366
367 bool isStackRealignable() const { return StackRealignable; }
368
369 /// Return true if there are any stack objects in this function.
370 bool hasStackObjects() const { return !Objects.empty(); }
371
372 /// This method may be called any time after instruction
373 /// selection is complete to determine if the stack frame for this function
374 /// contains any variable sized objects.
375 bool hasVarSizedObjects() const { return HasVarSizedObjects; }
376
377 /// Return the index for the stack protector object.
378 int getStackProtectorIndex() const { return StackProtectorIdx; }
379 void setStackProtectorIndex(int I) { StackProtectorIdx = I; }
380 bool hasStackProtectorIndex() const { return StackProtectorIdx != -1; }
381
382 /// Return the index for the function context object.
383 /// This object is used for SjLj exceptions.
384 int getFunctionContextIndex() const { return FunctionContextIdx; }
385 void setFunctionContextIndex(int I) { FunctionContextIdx = I; }
386 bool hasFunctionContextIndex() const { return FunctionContextIdx != -1; }
387
388 /// This method may be called any time after instruction
389 /// selection is complete to determine if there is a call to
390 /// \@llvm.frameaddress in this function.
391 bool isFrameAddressTaken() const { return FrameAddressTaken; }
392 void setFrameAddressIsTaken(bool T) { FrameAddressTaken = T; }
393
394 /// This method may be called any time after
395 /// instruction selection is complete to determine if there is a call to
396 /// \@llvm.returnaddress in this function.
397 bool isReturnAddressTaken() const { return ReturnAddressTaken; }
398 void setReturnAddressIsTaken(bool s) { ReturnAddressTaken = s; }
399
400 /// This method may be called any time after instruction
401 /// selection is complete to determine if there is a call to builtin
402 /// \@llvm.experimental.stackmap.
403 bool hasStackMap() const { return HasStackMap; }
404 void setHasStackMap(bool s = true) { HasStackMap = s; }
405
406 /// This method may be called any time after instruction
407 /// selection is complete to determine if there is a call to builtin
408 /// \@llvm.experimental.patchpoint.
409 bool hasPatchPoint() const { return HasPatchPoint; }
410 void setHasPatchPoint(bool s = true) { HasPatchPoint = s; }
411
412 /// Return true if this function requires a split stack prolog, even if it
413 /// uses no stack space. This is only meaningful for functions where
414 /// MachineFunction::shouldSplitStack() returns true.
415 //
416 // For non-leaf functions we have to allow for the possibility that the call
417 // is to a non-split function, as in PR37807. This function could also take
418 // the address of a non-split function. When the linker tries to adjust its
419 // non-existent prologue, it would fail with an error. Mark the object file so
420 // that such failures are not errors. See this Go language bug-report
421 // https://go-review.googlesource.com/c/go/+/148819/
423 return getStackSize() != 0 || hasTailCall();
424 }
425
426 /// Return the minimum frame object index.
427 int getObjectIndexBegin() const { return -NumFixedObjects; }
428
429 /// Return one past the maximum frame object index.
430 int getObjectIndexEnd() const { return (int)Objects.size()-NumFixedObjects; }
431
432 /// Return the number of fixed objects.
433 unsigned getNumFixedObjects() const { return NumFixedObjects; }
434
435 /// Return the number of objects.
436 unsigned getNumObjects() const { return Objects.size(); }
437
438 /// Map a frame index into the local object block
439 void mapLocalFrameObject(int ObjectIndex, int64_t Offset) {
440 LocalFrameObjects.push_back(std::pair<int, int64_t>(ObjectIndex, Offset));
441 Objects[ObjectIndex + NumFixedObjects].PreAllocated = true;
442 }
443
444 /// Get the local offset mapping for a for an object.
445 std::pair<int, int64_t> getLocalFrameObjectMap(int i) const {
446 assert (i >= 0 && (unsigned)i < LocalFrameObjects.size() &&
447 "Invalid local object reference!");
448 return LocalFrameObjects[i];
449 }
450
451 /// Return the number of objects allocated into the local object block.
452 int64_t getLocalFrameObjectCount() const { return LocalFrameObjects.size(); }
453
454 /// Set the size of the local object blob.
455 void setLocalFrameSize(int64_t sz) { LocalFrameSize = sz; }
456
457 /// Get the size of the local object blob.
458 int64_t getLocalFrameSize() const { return LocalFrameSize; }
459
460 /// Required alignment of the local object blob,
461 /// which is the strictest alignment of any object in it.
462 void setLocalFrameMaxAlign(Align Alignment) {
463 LocalFrameMaxAlign = Alignment;
464 }
465
466 /// Return the required alignment of the local object blob.
467 Align getLocalFrameMaxAlign() const { return LocalFrameMaxAlign; }
468
469 /// Get whether the local allocation blob should be allocated together or
470 /// let PEI allocate the locals in it directly.
472 return UseLocalStackAllocationBlock;
473 }
474
475 /// setUseLocalStackAllocationBlock - Set whether the local allocation blob
476 /// should be allocated together or let PEI allocate the locals in it
477 /// directly.
479 UseLocalStackAllocationBlock = v;
480 }
481
482 /// Return true if the object was pre-allocated into the local block.
483 bool isObjectPreAllocated(int ObjectIdx) const {
484 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
485 "Invalid Object Idx!");
486 return Objects[ObjectIdx+NumFixedObjects].PreAllocated;
487 }
488
489 /// Return the size of the specified object.
490 int64_t getObjectSize(int ObjectIdx) const {
491 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
492 "Invalid Object Idx!");
493 return Objects[ObjectIdx+NumFixedObjects].Size;
494 }
495
496 /// Change the size of the specified stack object.
497 void setObjectSize(int ObjectIdx, int64_t Size) {
498 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
499 "Invalid Object Idx!");
500 Objects[ObjectIdx+NumFixedObjects].Size = Size;
501 }
502
503 /// Return the alignment of the specified stack object.
504 Align getObjectAlign(int ObjectIdx) const {
505 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
506 "Invalid Object Idx!");
507 return Objects[ObjectIdx + NumFixedObjects].Alignment;
508 }
509
510 /// Should this stack ID be considered in MaxAlignment.
512 return StackID == TargetStackID::Default ||
515 }
516
517 bool hasScalableStackID(int ObjectIdx) const {
518 uint8_t StackID = getStackID(ObjectIdx);
519 return isScalableStackID(StackID);
520 }
521
522 bool isScalableStackID(uint8_t StackID) const {
523 return StackID == TargetStackID::ScalableVector ||
525 }
526
527 /// setObjectAlignment - Change the alignment of the specified stack object.
528 void setObjectAlignment(int ObjectIdx, Align Alignment) {
529 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
530 "Invalid Object Idx!");
531 Objects[ObjectIdx + NumFixedObjects].Alignment = Alignment;
532
533 // Only ensure max alignment for the default and scalable vector stack.
534 uint8_t StackID = getStackID(ObjectIdx);
535 if (contributesToMaxAlignment(StackID))
536 ensureMaxAlignment(Alignment);
537 }
538
539 /// Return the underlying Alloca of the specified
540 /// stack object if it exists. Returns 0 if none exists.
541 const AllocaInst* getObjectAllocation(int ObjectIdx) const {
542 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
543 "Invalid Object Idx!");
544 return Objects[ObjectIdx+NumFixedObjects].Alloca;
545 }
546
547 /// Remove the underlying Alloca of the specified stack object if it
548 /// exists. This generally should not be used and is for reduction tooling.
549 void clearObjectAllocation(int ObjectIdx) {
550 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
551 "Invalid Object Idx!");
552 Objects[ObjectIdx + NumFixedObjects].Alloca = nullptr;
553 }
554
555 /// Return the assigned stack offset of the specified object
556 /// from the incoming stack pointer.
557 int64_t getObjectOffset(int ObjectIdx) const {
558 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
559 "Invalid Object Idx!");
560 assert(!isDeadObjectIndex(ObjectIdx) &&
561 "Getting frame offset for a dead object?");
562 return Objects[ObjectIdx+NumFixedObjects].SPOffset;
563 }
564
565 bool isObjectZExt(int ObjectIdx) const {
566 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
567 "Invalid Object Idx!");
568 return Objects[ObjectIdx+NumFixedObjects].isZExt;
569 }
570
571 void setObjectZExt(int ObjectIdx, bool IsZExt) {
572 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
573 "Invalid Object Idx!");
574 Objects[ObjectIdx+NumFixedObjects].isZExt = IsZExt;
575 }
576
577 bool isObjectSExt(int ObjectIdx) const {
578 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
579 "Invalid Object Idx!");
580 return Objects[ObjectIdx+NumFixedObjects].isSExt;
581 }
582
583 void setObjectSExt(int ObjectIdx, bool IsSExt) {
584 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
585 "Invalid Object Idx!");
586 Objects[ObjectIdx+NumFixedObjects].isSExt = IsSExt;
587 }
588
589 /// Set the stack frame offset of the specified object. The
590 /// offset is relative to the stack pointer on entry to the function.
591 void setObjectOffset(int ObjectIdx, int64_t SPOffset) {
592 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
593 "Invalid Object Idx!");
594 assert(!isDeadObjectIndex(ObjectIdx) &&
595 "Setting frame offset for a dead object?");
596 Objects[ObjectIdx+NumFixedObjects].SPOffset = SPOffset;
597 }
598
599 SSPLayoutKind getObjectSSPLayout(int ObjectIdx) const {
600 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
601 "Invalid Object Idx!");
602 return (SSPLayoutKind)Objects[ObjectIdx+NumFixedObjects].SSPLayout;
603 }
604
605 void setObjectSSPLayout(int ObjectIdx, SSPLayoutKind Kind) {
606 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
607 "Invalid Object Idx!");
608 assert(!isDeadObjectIndex(ObjectIdx) &&
609 "Setting SSP layout for a dead object?");
610 Objects[ObjectIdx+NumFixedObjects].SSPLayout = Kind;
611 }
612
613 /// Return the number of bytes that must be allocated to hold
614 /// all of the fixed size frame objects. This is only valid after
615 /// Prolog/Epilog code insertion has finalized the stack frame layout.
616 uint64_t getStackSize() const { return StackSize; }
617
618 /// Set the size of the stack.
619 void setStackSize(uint64_t Size) { StackSize = Size; }
620
621 /// Estimate and return the size of the stack frame.
623
624 /// Return the correction for frame offsets.
625 int64_t getOffsetAdjustment() const { return OffsetAdjustment; }
626
627 /// Set the correction for frame offsets.
628 void setOffsetAdjustment(int64_t Adj) { OffsetAdjustment = Adj; }
629
630 /// Return alignment of this function's frame.
631 Align getMaxAlign() const { return MaxAlignment; }
632
633 /// Overwrite alignment of this function's frame.
634 void setMaxAlign(Align Alignment) { MaxAlignment = Alignment; }
635
636 /// Make sure the function's frame is at least Align bytes aligned.
637 LLVM_ABI void ensureMaxAlignment(Align Alignment);
638
639 /// Return true if stack realignment is forced by function attributes or if
640 /// the stack alignment.
641 bool shouldRealignStack() const {
642 return ForcedRealign || MaxAlignment > StackAlignment;
643 }
644
645 /// Return true if this function adjusts the stack -- e.g.,
646 /// when calling another function. This is only valid during and after
647 /// prolog/epilog code insertion.
648 bool adjustsStack() const { return AdjustsStack; }
649 void setAdjustsStack(bool V) { AdjustsStack = V; }
650
651 /// Return true if the current function has any function calls.
652 bool hasCalls() const { return HasCalls; }
653 void setHasCalls(bool V) { HasCalls = V; }
654
655 FramePointerKind getFramePointerPolicy() const { return FramePointerPolicy; }
657 FramePointerPolicy = Kind;
658 }
659
660 /// Returns true if the function contains opaque dynamic stack adjustments.
661 bool hasOpaqueSPAdjustment() const { return HasOpaqueSPAdjustment; }
662 void setHasOpaqueSPAdjustment(bool B) { HasOpaqueSPAdjustment = B; }
663
664 /// Returns true if the function contains operations which will lower down to
665 /// instructions which manipulate the stack pointer.
667 return HasCopyImplyingStackAdjustment;
668 }
670 HasCopyImplyingStackAdjustment = B;
671 }
672
673 /// Returns true if the function calls the llvm.va_start intrinsic.
674 bool hasVAStart() const { return HasVAStart; }
675 void setHasVAStart(bool B) { HasVAStart = B; }
676
677 /// Returns true if the function is variadic and contains a musttail call.
678 bool hasMustTailInVarArgFunc() const { return HasMustTailInVarArgFunc; }
679 void setHasMustTailInVarArgFunc(bool B) { HasMustTailInVarArgFunc = B; }
680
681 /// Returns true if the function contains a tail call.
682 bool hasTailCall() const { return HasTailCall; }
683 void setHasTailCall(bool V = true) { HasTailCall = V; }
684
685 /// Computes the maximum size of a callframe.
686 /// This only works for targets defining
687 /// TargetInstrInfo::getCallFrameSetupOpcode(), getCallFrameDestroyOpcode(),
688 /// and getFrameSize().
689 /// This is usually computed by the prologue epilogue inserter but some
690 /// targets may call this to compute it earlier.
691 /// If FrameSDOps is passed, the frame instructions in the MF will be
692 /// inserted into it.
694 MachineFunction &MF,
695 std::vector<MachineBasicBlock::iterator> *FrameSDOps = nullptr);
696
697 /// Return the maximum size of a call frame that must be
698 /// allocated for an outgoing function call. This is only available if
699 /// CallFrameSetup/Destroy pseudo instructions are used by the target, and
700 /// then only during or after prolog/epilog code insertion.
701 ///
703 // TODO: Enable this assert when targets are fixed.
704 //assert(isMaxCallFrameSizeComputed() && "MaxCallFrameSize not computed yet");
706 return 0;
707 return MaxCallFrameSize;
708 }
710 return MaxCallFrameSize != ~UINT64_C(0);
711 }
712 void setMaxCallFrameSize(uint64_t S) { MaxCallFrameSize = S; }
713
714 /// Returns how many bytes of callee-saved registers the target pushed in the
715 /// prologue. Only used for debug info.
717 return CVBytesOfCalleeSavedRegisters;
718 }
720 CVBytesOfCalleeSavedRegisters = S;
721 }
722
723 /// Create a new object at a fixed location on the stack.
724 /// All fixed objects should be created before other objects are created for
725 /// efficiency. By default, fixed objects are not pointed to by LLVM IR
726 /// values. This returns an index with a negative value.
727 LLVM_ABI int CreateFixedObject(uint64_t Size, int64_t SPOffset,
728 bool IsImmutable, bool isAliased = false);
729
730 /// Create a spill slot at a fixed location on the stack.
731 /// Returns an index with a negative value.
733 bool IsImmutable = false);
734
735 /// Returns true if the specified index corresponds to a fixed stack object.
736 bool isFixedObjectIndex(int ObjectIdx) const {
737 return ObjectIdx < 0 && (ObjectIdx >= -(int)NumFixedObjects);
738 }
739
740 /// Returns true if the specified index corresponds
741 /// to an object that might be pointed to by an LLVM IR value.
742 bool isAliasedObjectIndex(int ObjectIdx) const {
743 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
744 "Invalid Object Idx!");
745 return Objects[ObjectIdx+NumFixedObjects].isAliased;
746 }
747
748 /// Set "maybe pointed to by an LLVM IR value" for an object.
749 void setIsAliasedObjectIndex(int ObjectIdx, bool IsAliased) {
750 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
751 "Invalid Object Idx!");
752 Objects[ObjectIdx+NumFixedObjects].isAliased = IsAliased;
753 }
754
755 /// Returns true if the specified index corresponds to an immutable object.
756 bool isImmutableObjectIndex(int ObjectIdx) const {
757 // Tail calling functions can clobber their function arguments.
758 if (HasTailCall)
759 return false;
760 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
761 "Invalid Object Idx!");
762 return Objects[ObjectIdx+NumFixedObjects].isImmutable;
763 }
764
765 /// Marks the immutability of an object.
766 void setIsImmutableObjectIndex(int ObjectIdx, bool IsImmutable) {
767 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
768 "Invalid Object Idx!");
769 Objects[ObjectIdx+NumFixedObjects].isImmutable = IsImmutable;
770 }
771
772 /// Returns true if the specified index corresponds to a spill slot.
773 bool isSpillSlotObjectIndex(int ObjectIdx) const {
774 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
775 "Invalid Object Idx!");
776 return Objects[ObjectIdx+NumFixedObjects].isSpillSlot;
777 }
778
779 bool isStatepointSpillSlotObjectIndex(int ObjectIdx) const {
780 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
781 "Invalid Object Idx!");
782 return Objects[ObjectIdx+NumFixedObjects].isStatepointSpillSlot;
783 }
784
785 bool isCalleeSavedObjectIndex(int ObjectIdx) const {
786 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
787 "Invalid Object Idx!");
788 return Objects[ObjectIdx + NumFixedObjects].isCalleeSaved;
789 }
790
791 void setIsCalleeSavedObjectIndex(int ObjectIdx, bool IsCalleeSaved) {
792 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
793 "Invalid Object Idx!");
794 Objects[ObjectIdx + NumFixedObjects].isCalleeSaved = IsCalleeSaved;
795 }
796
797 /// \see StackID
798 uint8_t getStackID(int ObjectIdx) const {
799 return Objects[ObjectIdx+NumFixedObjects].StackID;
800 }
801
802 /// \see StackID
803 void setStackID(int ObjectIdx, uint8_t ID) {
804 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
805 "Invalid Object Idx!");
806 Objects[ObjectIdx+NumFixedObjects].StackID = ID;
807 // If ID > 0, MaxAlignment may now be overly conservative.
808 // If ID == 0, MaxAlignment will need to be updated separately.
809 }
810
811 /// Returns true if the specified index corresponds to a dead object.
812 bool isDeadObjectIndex(int ObjectIdx) const {
813 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
814 "Invalid Object Idx!");
815 return Objects[ObjectIdx + NumFixedObjects].isDead;
816 }
817
818 /// Returns true if the specified index corresponds to a variable sized
819 /// object.
820 bool isVariableSizedObjectIndex(int ObjectIdx) const {
821 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
822 "Invalid Object Idx!");
823 return Objects[ObjectIdx + NumFixedObjects].Size == 0;
824 }
825
827 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
828 "Invalid Object Idx!");
829 Objects[ObjectIdx+NumFixedObjects].isStatepointSpillSlot = true;
830 assert(isStatepointSpillSlotObjectIndex(ObjectIdx) && "inconsistent");
831 }
832
833 /// Create a new statically sized stack object, returning
834 /// a nonnegative identifier to represent it.
836 bool isSpillSlot,
837 const AllocaInst *Alloca = nullptr,
838 uint8_t ID = 0);
839
840 /// Create a new statically sized stack object that represents a spill slot,
841 /// returning a nonnegative identifier to represent it.
842 LLVM_ABI int
845
846 /// Remove or mark dead a statically sized stack object.
847 void RemoveStackObject(int ObjectIdx) {
848 // Mark it dead.
849 Objects[ObjectIdx + NumFixedObjects].isDead = true;
850 }
851
852 /// Notify the MachineFrameInfo object that a variable sized object has been
853 /// created. This must be created whenever a variable sized object is
854 /// created, whether or not the index returned is actually used.
856 const AllocaInst *Alloca);
857
858 /// Returns a reference to call saved info vector for the current function.
859 const std::vector<CalleeSavedInfo> &getCalleeSavedInfo() const {
860 return CSInfo;
861 }
862 /// \copydoc getCalleeSavedInfo()
863 std::vector<CalleeSavedInfo> &getCalleeSavedInfo() { return CSInfo; }
864
865 /// Used by prolog/epilog inserter to set the function's callee saved
866 /// information.
867 void setCalleeSavedInfo(std::vector<CalleeSavedInfo> CSI) {
868 CSInfo = std::move(CSI);
869 }
870
871 /// Has the callee saved info been calculated yet?
872 bool isCalleeSavedInfoValid() const { return CSIValid; }
873
874 void setCalleeSavedInfoValid(bool v) { CSIValid = v; }
875
876 const SaveRestorePoints &getRestorePoints() const { return RestorePoints; }
877
878 const SaveRestorePoints &getSavePoints() const { return SavePoints; }
879
880 void setSavePoints(SaveRestorePoints NewSavePoints) {
881 SavePoints = std::move(NewSavePoints);
882 }
883
884 void setRestorePoints(SaveRestorePoints NewRestorePoints) {
885 RestorePoints = std::move(NewRestorePoints);
886 }
887
888 void clearSavePoints() { SavePoints.clear(); }
889 void clearRestorePoints() { RestorePoints.clear(); }
890
891 uint64_t getUnsafeStackSize() const { return UnsafeStackSize; }
892 void setUnsafeStackSize(uint64_t Size) { UnsafeStackSize = Size; }
893
894 /// Return a set of physical registers that are pristine.
895 ///
896 /// Pristine registers hold a value that is useless to the current function,
897 /// but that must be preserved - they are callee saved registers that are not
898 /// saved.
899 ///
900 /// Before the PrologueEpilogueInserter has placed the CSR spill code, this
901 /// method always returns an empty set.
903
904 /// Used by the MachineFunction printer to print information about
905 /// stack objects. Implemented in MachineFunction.cpp.
906 LLVM_ABI void print(const MachineFunction &MF, raw_ostream &OS) const;
907
908 /// dump - Print the function to stderr.
909 LLVM_ABI void dump(const MachineFunction &MF) const;
910};
911
912} // End llvm namespace
913
914#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
unsigned uint64_t
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
#define LLVM_ABI
Definition Compiler.h:215
#define I(x, y, z)
Definition MD5.cpp:57
#define T
bool isDead(const MachineInstr &MI, const MachineRegisterInfo &MRI)
This file defines the SmallVector class.
an instruction to allocate memory on the stack
CalleeSavedInfo(MCRegister R, int FI=0)
void setReg(MCRegister R)
MCRegister getReg() const
MCRegister getDstReg() const
void setDstReg(MCRegister SpillReg)
Wrapper class representing physical registers. Should be passed by value.
Definition MCRegister.h:41
constexpr unsigned id() const
Definition MCRegister.h:82
bool needsSplitStackProlog() const
Return true if this function requires a split stack prolog, even if it uses no stack space.
void setMaxCallFrameSize(uint64_t S)
LLVM_ABI int CreateFixedObject(uint64_t Size, int64_t SPOffset, bool IsImmutable, bool isAliased=false)
Create a new object at a fixed location on the stack.
bool hasVarSizedObjects() const
This method may be called any time after instruction selection is complete to determine if the stack ...
void clearObjectAllocation(int ObjectIdx)
Remove the underlying Alloca of the specified stack object if it exists.
void setObjectZExt(int ObjectIdx, bool IsZExt)
void setIsImmutableObjectIndex(int ObjectIdx, bool IsImmutable)
Marks the immutability of an object.
SSPLayoutKind getObjectSSPLayout(int ObjectIdx) const
void setMaxAlign(Align Alignment)
Overwrite alignment of this function's frame.
bool isObjectPreAllocated(int ObjectIdx) const
Return true if the object was pre-allocated into the local block.
LLVM_ABI void computeMaxCallFrameSize(MachineFunction &MF, std::vector< MachineBasicBlock::iterator > *FrameSDOps=nullptr)
Computes the maximum size of a callframe.
uint64_t getStackSize() const
Return the number of bytes that must be allocated to hold all of the fixed size frame objects.
const AllocaInst * getObjectAllocation(int ObjectIdx) const
Return the underlying Alloca of the specified stack object if it exists.
bool adjustsStack() const
Return true if this function adjusts the stack – e.g., when calling another function.
LLVM_ABI int CreateStackObject(uint64_t Size, Align Alignment, bool isSpillSlot, const AllocaInst *Alloca=nullptr, uint8_t ID=0)
Create a new statically sized stack object, returning a nonnegative identifier to represent it.
LLVM_ABI void ensureMaxAlignment(Align Alignment)
Make sure the function's frame is at least Align bytes aligned.
bool isReturnAddressTaken() const
This method may be called any time after instruction selection is complete to determine if there is a...
MachineFrameInfo(Align StackAlignment, bool StackRealignable, bool ForcedRealign)
int64_t getLocalFrameObjectCount() const
Return the number of objects allocated into the local object block.
void setHasPatchPoint(bool s=true)
bool hasCalls() const
Return true if the current function has any function calls.
bool isFrameAddressTaken() const
This method may be called any time after instruction selection is complete to determine if there is a...
std::vector< CalleeSavedInfo > & getCalleeSavedInfo()
bool isScalableStackID(uint8_t StackID) const
FramePointerKind getFramePointerPolicy() const
void setUseLocalStackAllocationBlock(bool v)
setUseLocalStackAllocationBlock - Set whether the local allocation blob should be allocated together ...
Align getMaxAlign() const
Return alignment of this function's frame.
Align getLocalFrameMaxAlign() const
Return the required alignment of the local object blob.
void setLocalFrameSize(int64_t sz)
Set the size of the local object blob.
void setObjectOffset(int ObjectIdx, int64_t SPOffset)
Set the stack frame offset of the specified object.
SSPLayoutKind
Stack Smashing Protection (SSP) rules require that vulnerable stack allocations are located close the...
@ SSPLK_SmallArray
Array or nested array < SSP-buffer-size.
@ SSPLK_LargeArray
Array or nested array >= SSP-buffer-size.
@ SSPLK_AddrOf
The address of this allocation is exposed and triggered protection.
@ SSPLK_None
Did not trigger a stack protector.
bool isCalleeSavedObjectIndex(int ObjectIdx) const
void markAsStatepointSpillSlotObjectIndex(int ObjectIdx)
std::pair< int, int64_t > getLocalFrameObjectMap(int i) const
Get the local offset mapping for a for an object.
bool contributesToMaxAlignment(uint8_t StackID)
Should this stack ID be considered in MaxAlignment.
void setFrameAddressIsTaken(bool T)
uint64_t getMaxCallFrameSize() const
Return the maximum size of a call frame that must be allocated for an outgoing function call.
bool shouldRealignStack() const
Return true if stack realignment is forced by function attributes or if the stack alignment.
bool hasPatchPoint() const
This method may be called any time after instruction selection is complete to determine if there is a...
void setHasStackMap(bool s=true)
bool hasOpaqueSPAdjustment() const
Returns true if the function contains opaque dynamic stack adjustments.
void setSavePoints(SaveRestorePoints NewSavePoints)
bool hasScalableStackID(int ObjectIdx) const
void setFramePointerPolicy(FramePointerKind Kind)
void setObjectSExt(int ObjectIdx, bool IsSExt)
void setObjectSSPLayout(int ObjectIdx, SSPLayoutKind Kind)
bool getUseLocalStackAllocationBlock() const
Get whether the local allocation blob should be allocated together or let PEI allocate the locals in ...
void setLocalFrameMaxAlign(Align Alignment)
Required alignment of the local object blob, which is the strictest alignment of any object in it.
bool isImmutableObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to an immutable object.
void setCVBytesOfCalleeSavedRegisters(unsigned S)
int getStackProtectorIndex() const
Return the index for the stack protector object.
int64_t getOffsetAdjustment() const
Return the correction for frame offsets.
void setObjectSize(int ObjectIdx, int64_t Size)
Change the size of the specified stack object.
LLVM_ABI uint64_t estimateStackSize(const MachineFunction &MF) const
Estimate and return the size of the stack frame.
void setStackID(int ObjectIdx, uint8_t ID)
void setHasTailCall(bool V=true)
bool hasTailCall() const
Returns true if the function contains a tail call.
bool hasMustTailInVarArgFunc() const
Returns true if the function is variadic and contains a musttail call.
void setIsAliasedObjectIndex(int ObjectIdx, bool IsAliased)
Set "maybe pointed to by an LLVM IR value" for an object.
void setCalleeSavedInfoValid(bool v)
bool isStatepointSpillSlotObjectIndex(int ObjectIdx) const
bool isCalleeSavedInfoValid() const
Has the callee saved info been calculated yet?
void setReturnAddressIsTaken(bool s)
Align getObjectAlign(int ObjectIdx) const
Return the alignment of the specified stack object.
bool isObjectZExt(int ObjectIdx) const
void mapLocalFrameObject(int ObjectIndex, int64_t Offset)
Map a frame index into the local object block.
bool isSpillSlotObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a spill slot.
int64_t getObjectSize(int ObjectIdx) const
Return the size of the specified object.
bool isMaxCallFrameSizeComputed() const
void setHasOpaqueSPAdjustment(bool B)
int64_t getLocalFrameSize() const
Get the size of the local object blob.
bool isObjectSExt(int ObjectIdx) const
LLVM_ABI BitVector getPristineRegs(const MachineFunction &MF) const
Return a set of physical registers that are pristine.
bool hasStackMap() const
This method may be called any time after instruction selection is complete to determine if there is a...
LLVM_ABI int CreateSpillStackObject(uint64_t Size, Align Alignment, TargetStackID::Value StackID=TargetStackID::Default)
Create a new statically sized stack object that represents a spill slot, returning a nonnegative iden...
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
void RemoveStackObject(int ObjectIdx)
Remove or mark dead a statically sized stack object.
void setCalleeSavedInfo(std::vector< CalleeSavedInfo > CSI)
Used by prolog/epilog inserter to set the function's callee saved information.
void setHasCopyImplyingStackAdjustment(bool B)
LLVM_ABI void print(const MachineFunction &MF, raw_ostream &OS) const
Used by the MachineFunction printer to print information about stack objects.
unsigned getNumObjects() const
Return the number of objects.
bool hasVAStart() const
Returns true if the function calls the llvm.va_start intrinsic.
unsigned getCVBytesOfCalleeSavedRegisters() const
Returns how many bytes of callee-saved registers the target pushed in the prologue.
bool isVariableSizedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a variable sized object.
LLVM_ABI int CreateVariableSizedObject(Align Alignment, const AllocaInst *Alloca)
Notify the MachineFrameInfo object that a variable sized object has been created.
uint64_t getUnsafeStackSize() const
LLVM_ABI void dump(const MachineFunction &MF) const
dump - Print the function to stderr.
int getObjectIndexEnd() const
Return one past the maximum frame object index.
bool hasStackProtectorIndex() const
void setRestorePoints(SaveRestorePoints NewRestorePoints)
bool hasCopyImplyingStackAdjustment() const
Returns true if the function contains operations which will lower down to instructions which manipula...
bool hasStackObjects() const
Return true if there are any stack objects in this function.
LLVM_ABI int CreateFixedSpillStackObject(uint64_t Size, int64_t SPOffset, bool IsImmutable=false)
Create a spill slot at a fixed location on the stack.
MachineFrameInfo(const MachineFrameInfo &)=delete
uint8_t getStackID(int ObjectIdx) const
const SaveRestorePoints & getRestorePoints() const
unsigned getNumFixedObjects() const
Return the number of fixed objects.
void setIsCalleeSavedObjectIndex(int ObjectIdx, bool IsCalleeSaved)
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
bool hasFunctionContextIndex() const
void setStackSize(uint64_t Size)
Set the size of the stack.
bool isFixedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a fixed stack object.
int getObjectIndexBegin() const
Return the minimum frame object index.
const SaveRestorePoints & getSavePoints() const
void setUnsafeStackSize(uint64_t Size)
void setHasMustTailInVarArgFunc(bool B)
void setObjectAlignment(int ObjectIdx, Align Alignment)
setObjectAlignment - Change the alignment of the specified stack object.
bool isDeadObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a dead object.
void setOffsetAdjustment(int64_t Adj)
Set the correction for frame offsets.
int getFunctionContextIndex() const
Return the index for the function context object.
bool isAliasedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to an object that might be pointed to by an LLVM IR v...
void setFunctionContextIndex(int I)
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition raw_ostream.h:53
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
This is an optimization pass for GlobalISel generic memory operations.
@ Offset
Definition DWP.cpp:577
FramePointerKind
Definition CodeGen.h:185
DenseMap< MachineBasicBlock *, std::vector< CalleeSavedInfo > > SaveRestorePoints
class LLVM_GSL_OWNER SmallVector
Forward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference s...
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition Alignment.h:39