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 the alignment of the stack in this function.
370 Align getStackAlign() const { return StackAlignment; }
371
372 /// Return true if there are any stack objects in this function.
373 bool hasStackObjects() const { return !Objects.empty(); }
374
375 /// This method may be called any time after instruction
376 /// selection is complete to determine if the stack frame for this function
377 /// contains any variable sized objects.
378 bool hasVarSizedObjects() const { return HasVarSizedObjects; }
379
380 /// Return the index for the stack protector object.
381 int getStackProtectorIndex() const { return StackProtectorIdx; }
382 void setStackProtectorIndex(int I) { StackProtectorIdx = I; }
383 bool hasStackProtectorIndex() const { return StackProtectorIdx != -1; }
384
385 /// Return the index for the function context object.
386 /// This object is used for SjLj exceptions.
387 int getFunctionContextIndex() const { return FunctionContextIdx; }
388 void setFunctionContextIndex(int I) { FunctionContextIdx = I; }
389 bool hasFunctionContextIndex() const { return FunctionContextIdx != -1; }
390
391 /// This method may be called any time after instruction
392 /// selection is complete to determine if there is a call to
393 /// \@llvm.frameaddress in this function.
394 bool isFrameAddressTaken() const { return FrameAddressTaken; }
395 void setFrameAddressIsTaken(bool T) { FrameAddressTaken = T; }
396
397 /// This method may be called any time after
398 /// instruction selection is complete to determine if there is a call to
399 /// \@llvm.returnaddress in this function.
400 bool isReturnAddressTaken() const { return ReturnAddressTaken; }
401 void setReturnAddressIsTaken(bool s) { ReturnAddressTaken = s; }
402
403 /// This method may be called any time after instruction
404 /// selection is complete to determine if there is a call to builtin
405 /// \@llvm.experimental.stackmap.
406 bool hasStackMap() const { return HasStackMap; }
407 void setHasStackMap(bool s = true) { HasStackMap = s; }
408
409 /// This method may be called any time after instruction
410 /// selection is complete to determine if there is a call to builtin
411 /// \@llvm.experimental.patchpoint.
412 bool hasPatchPoint() const { return HasPatchPoint; }
413 void setHasPatchPoint(bool s = true) { HasPatchPoint = s; }
414
415 /// Return true if this function requires a split stack prolog, even if it
416 /// uses no stack space. This is only meaningful for functions where
417 /// MachineFunction::shouldSplitStack() returns true.
418 //
419 // For non-leaf functions we have to allow for the possibility that the call
420 // is to a non-split function, as in PR37807. This function could also take
421 // the address of a non-split function. When the linker tries to adjust its
422 // non-existent prologue, it would fail with an error. Mark the object file so
423 // that such failures are not errors. See this Go language bug-report
424 // https://go-review.googlesource.com/c/go/+/148819/
426 return getStackSize() != 0 || hasTailCall();
427 }
428
429 /// Return the minimum frame object index.
430 int getObjectIndexBegin() const { return -NumFixedObjects; }
431
432 /// Return one past the maximum frame object index.
433 int getObjectIndexEnd() const { return (int)Objects.size()-NumFixedObjects; }
434
435 /// Return the number of fixed objects.
436 unsigned getNumFixedObjects() const { return NumFixedObjects; }
437
438 /// Return the number of objects.
439 unsigned getNumObjects() const { return Objects.size(); }
440
441 /// Map a frame index into the local object block
442 void mapLocalFrameObject(int ObjectIndex, int64_t Offset) {
443 LocalFrameObjects.push_back(std::pair<int, int64_t>(ObjectIndex, Offset));
444 Objects[ObjectIndex + NumFixedObjects].PreAllocated = true;
445 }
446
447 /// Get the local offset mapping for a for an object.
448 std::pair<int, int64_t> getLocalFrameObjectMap(int i) const {
449 assert (i >= 0 && (unsigned)i < LocalFrameObjects.size() &&
450 "Invalid local object reference!");
451 return LocalFrameObjects[i];
452 }
453
454 /// Return the number of objects allocated into the local object block.
455 int64_t getLocalFrameObjectCount() const { return LocalFrameObjects.size(); }
456
457 /// Set the size of the local object blob.
458 void setLocalFrameSize(int64_t sz) { LocalFrameSize = sz; }
459
460 /// Get the size of the local object blob.
461 int64_t getLocalFrameSize() const { return LocalFrameSize; }
462
463 /// Required alignment of the local object blob,
464 /// which is the strictest alignment of any object in it.
465 void setLocalFrameMaxAlign(Align Alignment) {
466 LocalFrameMaxAlign = Alignment;
467 }
468
469 /// Return the required alignment of the local object blob.
470 Align getLocalFrameMaxAlign() const { return LocalFrameMaxAlign; }
471
472 /// Get whether the local allocation blob should be allocated together or
473 /// let PEI allocate the locals in it directly.
475 return UseLocalStackAllocationBlock;
476 }
477
478 /// setUseLocalStackAllocationBlock - Set whether the local allocation blob
479 /// should be allocated together or let PEI allocate the locals in it
480 /// directly.
482 UseLocalStackAllocationBlock = v;
483 }
484
485 /// Return true if the object was pre-allocated into the local block.
486 bool isObjectPreAllocated(int ObjectIdx) const {
487 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
488 "Invalid Object Idx!");
489 return Objects[ObjectIdx+NumFixedObjects].PreAllocated;
490 }
491
492 /// Return the size of the specified object.
493 int64_t getObjectSize(int ObjectIdx) const {
494 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
495 "Invalid Object Idx!");
496 return Objects[ObjectIdx+NumFixedObjects].Size;
497 }
498
499 /// Change the size of the specified stack object.
500 void setObjectSize(int ObjectIdx, int64_t Size) {
501 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
502 "Invalid Object Idx!");
503 Objects[ObjectIdx+NumFixedObjects].Size = Size;
504 }
505
506 /// Return the alignment of the specified stack object.
507 Align getObjectAlign(int ObjectIdx) const {
508 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
509 "Invalid Object Idx!");
510 return Objects[ObjectIdx + NumFixedObjects].Alignment;
511 }
512
513 /// Should this stack ID be considered in MaxAlignment.
515 return StackID == TargetStackID::Default ||
518 }
519
520 bool hasScalableStackID(int ObjectIdx) const {
521 uint8_t StackID = getStackID(ObjectIdx);
522 return isScalableStackID(StackID);
523 }
524
525 bool isScalableStackID(uint8_t StackID) const {
526 return StackID == TargetStackID::ScalableVector ||
528 }
529
530 /// setObjectAlignment - Change the alignment of the specified stack object.
531 void setObjectAlignment(int ObjectIdx, Align Alignment) {
532 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
533 "Invalid Object Idx!");
534 Objects[ObjectIdx + NumFixedObjects].Alignment = Alignment;
535
536 // Only ensure max alignment for the default and scalable vector stack.
537 uint8_t StackID = getStackID(ObjectIdx);
538 if (contributesToMaxAlignment(StackID))
539 ensureMaxAlignment(Alignment);
540 }
541
542 /// Return the underlying Alloca of the specified
543 /// stack object if it exists. Returns 0 if none exists.
544 const AllocaInst* getObjectAllocation(int ObjectIdx) const {
545 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
546 "Invalid Object Idx!");
547 return Objects[ObjectIdx+NumFixedObjects].Alloca;
548 }
549
550 /// Remove the underlying Alloca of the specified stack object if it
551 /// exists. This generally should not be used and is for reduction tooling.
552 void clearObjectAllocation(int ObjectIdx) {
553 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
554 "Invalid Object Idx!");
555 Objects[ObjectIdx + NumFixedObjects].Alloca = nullptr;
556 }
557
558 /// Return the assigned stack offset of the specified object
559 /// from the incoming stack pointer.
560 int64_t getObjectOffset(int ObjectIdx) const {
561 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
562 "Invalid Object Idx!");
563 assert(!isDeadObjectIndex(ObjectIdx) &&
564 "Getting frame offset for a dead object?");
565 return Objects[ObjectIdx+NumFixedObjects].SPOffset;
566 }
567
568 bool isObjectZExt(int ObjectIdx) const {
569 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
570 "Invalid Object Idx!");
571 return Objects[ObjectIdx+NumFixedObjects].isZExt;
572 }
573
574 void setObjectZExt(int ObjectIdx, bool IsZExt) {
575 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
576 "Invalid Object Idx!");
577 Objects[ObjectIdx+NumFixedObjects].isZExt = IsZExt;
578 }
579
580 bool isObjectSExt(int ObjectIdx) const {
581 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
582 "Invalid Object Idx!");
583 return Objects[ObjectIdx+NumFixedObjects].isSExt;
584 }
585
586 void setObjectSExt(int ObjectIdx, bool IsSExt) {
587 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
588 "Invalid Object Idx!");
589 Objects[ObjectIdx+NumFixedObjects].isSExt = IsSExt;
590 }
591
592 /// Set the stack frame offset of the specified object. The
593 /// offset is relative to the stack pointer on entry to the function.
594 void setObjectOffset(int ObjectIdx, int64_t SPOffset) {
595 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
596 "Invalid Object Idx!");
597 assert(!isDeadObjectIndex(ObjectIdx) &&
598 "Setting frame offset for a dead object?");
599 Objects[ObjectIdx+NumFixedObjects].SPOffset = SPOffset;
600 }
601
602 SSPLayoutKind getObjectSSPLayout(int ObjectIdx) const {
603 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
604 "Invalid Object Idx!");
605 return (SSPLayoutKind)Objects[ObjectIdx+NumFixedObjects].SSPLayout;
606 }
607
608 void setObjectSSPLayout(int ObjectIdx, SSPLayoutKind Kind) {
609 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
610 "Invalid Object Idx!");
611 assert(!isDeadObjectIndex(ObjectIdx) &&
612 "Setting SSP layout for a dead object?");
613 Objects[ObjectIdx+NumFixedObjects].SSPLayout = Kind;
614 }
615
616 /// Return the number of bytes that must be allocated to hold
617 /// all of the fixed size frame objects. This is only valid after
618 /// Prolog/Epilog code insertion has finalized the stack frame layout.
619 uint64_t getStackSize() const { return StackSize; }
620
621 /// Set the size of the stack.
622 void setStackSize(uint64_t Size) { StackSize = Size; }
623
624 /// Estimate and return the size of the stack frame.
626
627 /// Return the correction for frame offsets.
628 int64_t getOffsetAdjustment() const { return OffsetAdjustment; }
629
630 /// Set the correction for frame offsets.
631 void setOffsetAdjustment(int64_t Adj) { OffsetAdjustment = Adj; }
632
633 /// Return alignment of this function's frame.
634 Align getMaxAlign() const { return MaxAlignment; }
635
636 /// Overwrite alignment of this function's frame.
637 void setMaxAlign(Align Alignment) { MaxAlignment = Alignment; }
638
639 /// Make sure the function's frame is at least Align bytes aligned.
640 LLVM_ABI void ensureMaxAlignment(Align Alignment);
641
642 /// Return true if stack realignment is forced by function attributes or if
643 /// the stack alignment.
644 bool shouldRealignStack() const {
645 return ForcedRealign || MaxAlignment > StackAlignment;
646 }
647
648 /// Return true if this function adjusts the stack -- e.g.,
649 /// when calling another function. This is only valid during and after
650 /// prolog/epilog code insertion.
651 bool adjustsStack() const { return AdjustsStack; }
652 void setAdjustsStack(bool V) { AdjustsStack = V; }
653
654 /// Return true if the current function has any function calls.
655 bool hasCalls() const { return HasCalls; }
656 void setHasCalls(bool V) { HasCalls = V; }
657
658 FramePointerKind getFramePointerPolicy() const { return FramePointerPolicy; }
660 FramePointerPolicy = Kind;
661 }
662
663 /// Returns true if the function contains opaque dynamic stack adjustments.
664 bool hasOpaqueSPAdjustment() const { return HasOpaqueSPAdjustment; }
665 void setHasOpaqueSPAdjustment(bool B) { HasOpaqueSPAdjustment = B; }
666
667 /// Returns true if the function contains operations which will lower down to
668 /// instructions which manipulate the stack pointer.
670 return HasCopyImplyingStackAdjustment;
671 }
673 HasCopyImplyingStackAdjustment = B;
674 }
675
676 /// Returns true if the function calls the llvm.va_start intrinsic.
677 bool hasVAStart() const { return HasVAStart; }
678 void setHasVAStart(bool B) { HasVAStart = B; }
679
680 /// Returns true if the function is variadic and contains a musttail call.
681 bool hasMustTailInVarArgFunc() const { return HasMustTailInVarArgFunc; }
682 void setHasMustTailInVarArgFunc(bool B) { HasMustTailInVarArgFunc = B; }
683
684 /// Returns true if the function contains a tail call.
685 bool hasTailCall() const { return HasTailCall; }
686 void setHasTailCall(bool V = true) { HasTailCall = V; }
687
688 /// Computes the maximum size of a callframe.
689 /// This only works for targets defining
690 /// TargetInstrInfo::getCallFrameSetupOpcode(), getCallFrameDestroyOpcode(),
691 /// and getFrameSize().
692 /// This is usually computed by the prologue epilogue inserter but some
693 /// targets may call this to compute it earlier.
694 /// If FrameSDOps is passed, the frame instructions in the MF will be
695 /// inserted into it.
697 MachineFunction &MF,
698 std::vector<MachineBasicBlock::iterator> *FrameSDOps = nullptr);
699
700 /// Return the maximum size of a call frame that must be
701 /// allocated for an outgoing function call. This is only available if
702 /// CallFrameSetup/Destroy pseudo instructions are used by the target, and
703 /// then only during or after prolog/epilog code insertion.
704 ///
706 // TODO: Enable this assert when targets are fixed.
707 //assert(isMaxCallFrameSizeComputed() && "MaxCallFrameSize not computed yet");
709 return 0;
710 return MaxCallFrameSize;
711 }
713 return MaxCallFrameSize != ~UINT64_C(0);
714 }
715 void setMaxCallFrameSize(uint64_t S) { MaxCallFrameSize = S; }
716
717 /// Returns how many bytes of callee-saved registers the target pushed in the
718 /// prologue. Only used for debug info.
720 return CVBytesOfCalleeSavedRegisters;
721 }
723 CVBytesOfCalleeSavedRegisters = S;
724 }
725
726 /// Create a new object at a fixed location on the stack.
727 /// All fixed objects should be created before other objects are created for
728 /// efficiency. By default, fixed objects are not pointed to by LLVM IR
729 /// values. This returns an index with a negative value.
730 LLVM_ABI int CreateFixedObject(uint64_t Size, int64_t SPOffset,
731 bool IsImmutable, bool isAliased = false);
732
733 /// Create a spill slot at a fixed location on the stack.
734 /// Returns an index with a negative value.
736 bool IsImmutable = false);
737
738 /// Returns true if the specified index corresponds to a fixed stack object.
739 bool isFixedObjectIndex(int ObjectIdx) const {
740 return ObjectIdx < 0 && (ObjectIdx >= -(int)NumFixedObjects);
741 }
742
743 /// Returns true if the specified index corresponds
744 /// to an object that might be pointed to by an LLVM IR value.
745 bool isAliasedObjectIndex(int ObjectIdx) const {
746 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
747 "Invalid Object Idx!");
748 return Objects[ObjectIdx+NumFixedObjects].isAliased;
749 }
750
751 /// Set "maybe pointed to by an LLVM IR value" for an object.
752 void setIsAliasedObjectIndex(int ObjectIdx, bool IsAliased) {
753 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
754 "Invalid Object Idx!");
755 Objects[ObjectIdx+NumFixedObjects].isAliased = IsAliased;
756 }
757
758 /// Returns true if the specified index corresponds to an immutable object.
759 bool isImmutableObjectIndex(int ObjectIdx) const {
760 // Tail calling functions can clobber their function arguments.
761 if (HasTailCall)
762 return false;
763 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
764 "Invalid Object Idx!");
765 return Objects[ObjectIdx+NumFixedObjects].isImmutable;
766 }
767
768 /// Marks the immutability of an object.
769 void setIsImmutableObjectIndex(int ObjectIdx, bool IsImmutable) {
770 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
771 "Invalid Object Idx!");
772 Objects[ObjectIdx+NumFixedObjects].isImmutable = IsImmutable;
773 }
774
775 /// Returns true if the specified index corresponds to a spill slot.
776 bool isSpillSlotObjectIndex(int ObjectIdx) const {
777 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
778 "Invalid Object Idx!");
779 return Objects[ObjectIdx+NumFixedObjects].isSpillSlot;
780 }
781
782 bool isStatepointSpillSlotObjectIndex(int ObjectIdx) const {
783 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
784 "Invalid Object Idx!");
785 return Objects[ObjectIdx+NumFixedObjects].isStatepointSpillSlot;
786 }
787
788 bool isCalleeSavedObjectIndex(int ObjectIdx) const {
789 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
790 "Invalid Object Idx!");
791 return Objects[ObjectIdx + NumFixedObjects].isCalleeSaved;
792 }
793
794 void setIsCalleeSavedObjectIndex(int ObjectIdx, bool IsCalleeSaved) {
795 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
796 "Invalid Object Idx!");
797 Objects[ObjectIdx + NumFixedObjects].isCalleeSaved = IsCalleeSaved;
798 }
799
800 /// \see StackID
801 uint8_t getStackID(int ObjectIdx) const {
802 return Objects[ObjectIdx+NumFixedObjects].StackID;
803 }
804
805 /// \see StackID
806 void setStackID(int ObjectIdx, uint8_t ID) {
807 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
808 "Invalid Object Idx!");
809 Objects[ObjectIdx+NumFixedObjects].StackID = ID;
810 // If ID > 0, MaxAlignment may now be overly conservative.
811 // If ID == 0, MaxAlignment will need to be updated separately.
812 }
813
814 /// Returns true if the specified index corresponds to a dead object.
815 bool isDeadObjectIndex(int ObjectIdx) const {
816 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
817 "Invalid Object Idx!");
818 return Objects[ObjectIdx + NumFixedObjects].isDead;
819 }
820
821 /// Returns true if the specified index corresponds to a variable sized
822 /// object.
823 bool isVariableSizedObjectIndex(int ObjectIdx) const {
824 assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
825 "Invalid Object Idx!");
826 return Objects[ObjectIdx + NumFixedObjects].Size == 0;
827 }
828
830 assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() &&
831 "Invalid Object Idx!");
832 Objects[ObjectIdx+NumFixedObjects].isStatepointSpillSlot = true;
833 assert(isStatepointSpillSlotObjectIndex(ObjectIdx) && "inconsistent");
834 }
835
836 /// Create a new statically sized stack object, returning
837 /// a nonnegative identifier to represent it.
839 bool isSpillSlot,
840 const AllocaInst *Alloca = nullptr,
841 uint8_t ID = 0);
842
843 /// Create a new statically sized stack object that represents a spill slot,
844 /// returning a nonnegative identifier to represent it.
845 LLVM_ABI int
848
849 /// Remove or mark dead a statically sized stack object.
850 void RemoveStackObject(int ObjectIdx) {
851 // Mark it dead.
852 Objects[ObjectIdx + NumFixedObjects].isDead = true;
853 }
854
855 /// Notify the MachineFrameInfo object that a variable sized object has been
856 /// created. This must be created whenever a variable sized object is
857 /// created, whether or not the index returned is actually used.
859 const AllocaInst *Alloca);
860
861 /// Returns a reference to call saved info vector for the current function.
862 const std::vector<CalleeSavedInfo> &getCalleeSavedInfo() const {
863 return CSInfo;
864 }
865 /// \copydoc getCalleeSavedInfo()
866 std::vector<CalleeSavedInfo> &getCalleeSavedInfo() { return CSInfo; }
867
868 /// Used by prolog/epilog inserter to set the function's callee saved
869 /// information.
870 void setCalleeSavedInfo(std::vector<CalleeSavedInfo> CSI) {
871 CSInfo = std::move(CSI);
872 }
873
874 /// Has the callee saved info been calculated yet?
875 bool isCalleeSavedInfoValid() const { return CSIValid; }
876
877 void setCalleeSavedInfoValid(bool v) { CSIValid = v; }
878
879 const SaveRestorePoints &getRestorePoints() const { return RestorePoints; }
880
881 const SaveRestorePoints &getSavePoints() const { return SavePoints; }
882
883 void setSavePoints(SaveRestorePoints NewSavePoints) {
884 SavePoints = std::move(NewSavePoints);
885 }
886
887 void setRestorePoints(SaveRestorePoints NewRestorePoints) {
888 RestorePoints = std::move(NewRestorePoints);
889 }
890
891 void clearSavePoints() { SavePoints.clear(); }
892 void clearRestorePoints() { RestorePoints.clear(); }
893
894 uint64_t getUnsafeStackSize() const { return UnsafeStackSize; }
895 void setUnsafeStackSize(uint64_t Size) { UnsafeStackSize = Size; }
896
897 /// Return a set of physical registers that are pristine.
898 ///
899 /// Pristine registers hold a value that is useless to the current function,
900 /// but that must be preserved - they are callee saved registers that are not
901 /// saved.
902 ///
903 /// Before the PrologueEpilogueInserter has placed the CSR spill code, this
904 /// method always returns an empty set.
906
907 /// Used by the MachineFunction printer to print information about
908 /// stack objects. Implemented in MachineFunction.cpp.
909 LLVM_ABI void print(const MachineFunction &MF, raw_ostream &OS) const;
910
911 /// dump - Print the function to stderr.
912 LLVM_ABI void dump(const MachineFunction &MF) const;
913};
914
915} // End llvm namespace
916
917#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
uint64_t uint64_t
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
#define LLVM_ABI
Definition Compiler.h:211
#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 and target specific virtual registers.
Definition MCRegister.h:42
constexpr unsigned id() const
Definition MCRegister.h:85
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.
Align getStackAlign() const
Return the alignment of the stack in this function.
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:326
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