LLVM  14.0.0git
AArch64MachineFunctionInfo.h
Go to the documentation of this file.
1 //=- AArch64MachineFunctionInfo.h - AArch64 machine function info -*- 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 // This file declares AArch64-specific per-machine-function information.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_AARCH64_AARCH64MACHINEFUNCTIONINFO_H
14 #define LLVM_LIB_TARGET_AARCH64_AARCH64MACHINEFUNCTIONINFO_H
15 
16 #include "llvm/ADT/ArrayRef.h"
17 #include "llvm/ADT/Optional.h"
18 #include "llvm/ADT/SmallPtrSet.h"
19 #include "llvm/ADT/SmallVector.h"
23 #include "llvm/IR/Function.h"
25 #include <cassert>
26 
27 namespace llvm {
28 
29 namespace yaml {
30 struct AArch64FunctionInfo;
31 } // end namespace yaml
32 
33 class MachineInstr;
34 
35 /// AArch64FunctionInfo - This class is derived from MachineFunctionInfo and
36 /// contains private AArch64-specific information for each MachineFunction.
38  /// Backreference to the machine function.
39  MachineFunction &MF;
40 
41  /// Number of bytes of arguments this function has on the stack. If the callee
42  /// is expected to restore the argument stack this should be a multiple of 16,
43  /// all usable during a tail call.
44  ///
45  /// The alternative would forbid tail call optimisation in some cases: if we
46  /// want to transfer control from a function with 8-bytes of stack-argument
47  /// space to a function with 16-bytes then misalignment of this value would
48  /// make a stack adjustment necessary, which could not be undone by the
49  /// callee.
50  unsigned BytesInStackArgArea = 0;
51 
52  /// The number of bytes to restore to deallocate space for incoming
53  /// arguments. Canonically 0 in the C calling convention, but non-zero when
54  /// callee is expected to pop the args.
55  unsigned ArgumentStackToRestore = 0;
56 
57  /// Space just below incoming stack pointer reserved for arguments being
58  /// passed on the stack during a tail call. This will be the difference
59  /// between the largest tail call argument space needed in this function and
60  /// what's already available by reusing space of incoming arguments.
61  unsigned TailCallReservedStack = 0;
62 
63  /// HasStackFrame - True if this function has a stack frame. Set by
64  /// determineCalleeSaves().
65  bool HasStackFrame = false;
66 
67  /// Amount of stack frame size, not including callee-saved registers.
68  uint64_t LocalStackSize = 0;
69 
70  /// The start and end frame indices for the SVE callee saves.
71  int MinSVECSFrameIndex = 0;
72  int MaxSVECSFrameIndex = 0;
73 
74  /// Amount of stack frame size used for saving callee-saved registers.
75  unsigned CalleeSavedStackSize = 0;
76  unsigned SVECalleeSavedStackSize = 0;
77  bool HasCalleeSavedStackSize = false;
78 
79  /// Number of TLS accesses using the special (combinable)
80  /// _TLS_MODULE_BASE_ symbol.
81  unsigned NumLocalDynamicTLSAccesses = 0;
82 
83  /// FrameIndex for start of varargs area for arguments passed on the
84  /// stack.
85  int VarArgsStackIndex = 0;
86 
87  /// FrameIndex for start of varargs area for arguments passed in
88  /// general purpose registers.
89  int VarArgsGPRIndex = 0;
90 
91  /// Size of the varargs area for arguments passed in general purpose
92  /// registers.
93  unsigned VarArgsGPRSize = 0;
94 
95  /// FrameIndex for start of varargs area for arguments passed in
96  /// floating-point registers.
97  int VarArgsFPRIndex = 0;
98 
99  /// Size of the varargs area for arguments passed in floating-point
100  /// registers.
101  unsigned VarArgsFPRSize = 0;
102 
103  /// True if this function has a subset of CSRs that is handled explicitly via
104  /// copies.
105  bool IsSplitCSR = false;
106 
107  /// True when the stack gets realigned dynamically because the size of stack
108  /// frame is unknown at compile time. e.g., in case of VLAs.
109  bool StackRealigned = false;
110 
111  /// True when the callee-save stack area has unused gaps that may be used for
112  /// other stack allocations.
113  bool CalleeSaveStackHasFreeSpace = false;
114 
115  /// SRetReturnReg - sret lowering includes returning the value of the
116  /// returned struct in a register. This field holds the virtual register into
117  /// which the sret argument is passed.
118  unsigned SRetReturnReg = 0;
119  /// SVE stack size (for predicates and data vectors) are maintained here
120  /// rather than in FrameInfo, as the placement and Stack IDs are target
121  /// specific.
122  uint64_t StackSizeSVE = 0;
123 
124  /// HasCalculatedStackSizeSVE indicates whether StackSizeSVE is valid.
125  bool HasCalculatedStackSizeSVE = false;
126 
127  /// Has a value when it is known whether or not the function uses a
128  /// redzone, and no value otherwise.
129  /// Initialized during frame lowering, unless the function has the noredzone
130  /// attribute, in which case it is set to false at construction.
131  Optional<bool> HasRedZone;
132 
133  /// ForwardedMustTailRegParms - A list of virtual and physical registers
134  /// that must be forwarded to every musttail call.
135  SmallVector<ForwardedRegister, 1> ForwardedMustTailRegParms;
136 
137  /// FrameIndex for the tagged base pointer.
138  Optional<int> TaggedBasePointerIndex;
139 
140  /// Offset from SP-at-entry to the tagged base pointer.
141  /// Tagged base pointer is set up to point to the first (lowest address)
142  /// tagged stack slot.
143  unsigned TaggedBasePointerOffset;
144 
145  /// OutliningStyle denotes, if a function was outined, how it was outlined,
146  /// e.g. Tail Call, Thunk, or Function if none apply.
147  Optional<std::string> OutliningStyle;
148 
149  // Offset from SP-after-callee-saved-spills (i.e. SP-at-entry minus
150  // CalleeSavedStackSize) to the address of the frame record.
151  int CalleeSaveBaseToFrameRecordOffset = 0;
152 
153  /// SignReturnAddress is true if PAC-RET is enabled for the function with
154  /// defaults being sign non-leaf functions only, with the B key.
155  bool SignReturnAddress = false;
156 
157  /// SignReturnAddressAll modifies the default PAC-RET mode to signing leaf
158  /// functions as well.
159  bool SignReturnAddressAll = false;
160 
161  /// SignWithBKey modifies the default PAC-RET mode to signing with the B key.
162  bool SignWithBKey = false;
163 
164  /// BranchTargetEnforcement enables placing BTI instructions at potential
165  /// indirect branch destinations.
166  bool BranchTargetEnforcement = false;
167 
168  /// Whether this function has an extended frame record [Ctx, FP, LR]. If so,
169  /// bit 60 of the in-memory FP will be 1 to enable other tools to detect the
170  /// extended record.
171  bool HasSwiftAsyncContext = false;
172 
173  /// The stack slot where the Swift asynchronous context is stored.
174  int SwiftAsyncContextFrameIdx = std::numeric_limits<int>::max();
175 
176 public:
177  explicit AArch64FunctionInfo(MachineFunction &MF);
178 
180 
181  unsigned getBytesInStackArgArea() const { return BytesInStackArgArea; }
182  void setBytesInStackArgArea(unsigned bytes) { BytesInStackArgArea = bytes; }
183 
184  unsigned getArgumentStackToRestore() const { return ArgumentStackToRestore; }
185  void setArgumentStackToRestore(unsigned bytes) {
186  ArgumentStackToRestore = bytes;
187  }
188 
189  unsigned getTailCallReservedStack() const { return TailCallReservedStack; }
190  void setTailCallReservedStack(unsigned bytes) {
191  TailCallReservedStack = bytes;
192  }
193 
194  bool hasCalculatedStackSizeSVE() const { return HasCalculatedStackSizeSVE; }
195 
197  HasCalculatedStackSizeSVE = true;
198  StackSizeSVE = S;
199  }
200 
201  uint64_t getStackSizeSVE() const { return StackSizeSVE; }
202 
203  bool hasStackFrame() const { return HasStackFrame; }
204  void setHasStackFrame(bool s) { HasStackFrame = s; }
205 
206  bool isStackRealigned() const { return StackRealigned; }
207  void setStackRealigned(bool s) { StackRealigned = s; }
208 
210  return CalleeSaveStackHasFreeSpace;
211  }
213  CalleeSaveStackHasFreeSpace = s;
214  }
215  bool isSplitCSR() const { return IsSplitCSR; }
216  void setIsSplitCSR(bool s) { IsSplitCSR = s; }
217 
218  void setLocalStackSize(uint64_t Size) { LocalStackSize = Size; }
219  uint64_t getLocalStackSize() const { return LocalStackSize; }
220 
221  void setOutliningStyle(std::string Style) { OutliningStyle = Style; }
222  Optional<std::string> getOutliningStyle() const { return OutliningStyle; }
223 
224  void setCalleeSavedStackSize(unsigned Size) {
225  CalleeSavedStackSize = Size;
226  HasCalleeSavedStackSize = true;
227  }
228 
229  // When CalleeSavedStackSize has not been set (for example when
230  // some MachineIR pass is run in isolation), then recalculate
231  // the CalleeSavedStackSize directly from the CalleeSavedInfo.
232  // Note: This information can only be recalculated after PEI
233  // has assigned offsets to the callee save objects.
234  unsigned getCalleeSavedStackSize(const MachineFrameInfo &MFI) const {
235  bool ValidateCalleeSavedStackSize = false;
236 
237 #ifndef NDEBUG
238  // Make sure the calculated size derived from the CalleeSavedInfo
239  // equals the cached size that was calculated elsewhere (e.g. in
240  // determineCalleeSaves).
241  ValidateCalleeSavedStackSize = HasCalleeSavedStackSize;
242 #endif
243 
244  if (!HasCalleeSavedStackSize || ValidateCalleeSavedStackSize) {
245  assert(MFI.isCalleeSavedInfoValid() && "CalleeSavedInfo not calculated");
246  if (MFI.getCalleeSavedInfo().empty())
247  return 0;
248 
249  int64_t MinOffset = std::numeric_limits<int64_t>::max();
250  int64_t MaxOffset = std::numeric_limits<int64_t>::min();
251  for (const auto &Info : MFI.getCalleeSavedInfo()) {
252  int FrameIdx = Info.getFrameIdx();
253  if (MFI.getStackID(FrameIdx) != TargetStackID::Default)
254  continue;
255  int64_t Offset = MFI.getObjectOffset(FrameIdx);
256  int64_t ObjSize = MFI.getObjectSize(FrameIdx);
257  MinOffset = std::min<int64_t>(Offset, MinOffset);
258  MaxOffset = std::max<int64_t>(Offset + ObjSize, MaxOffset);
259  }
260 
261  if (SwiftAsyncContextFrameIdx != std::numeric_limits<int>::max()) {
263  int64_t ObjSize = MFI.getObjectSize(getSwiftAsyncContextFrameIdx());
264  MinOffset = std::min<int64_t>(Offset, MinOffset);
265  MaxOffset = std::max<int64_t>(Offset + ObjSize, MaxOffset);
266  }
267 
268  unsigned Size = alignTo(MaxOffset - MinOffset, 16);
269  assert((!HasCalleeSavedStackSize || getCalleeSavedStackSize() == Size) &&
270  "Invalid size calculated for callee saves");
271  return Size;
272  }
273 
274  return getCalleeSavedStackSize();
275  }
276 
277  unsigned getCalleeSavedStackSize() const {
278  assert(HasCalleeSavedStackSize &&
279  "CalleeSavedStackSize has not been calculated");
280  return CalleeSavedStackSize;
281  }
282 
283  // Saves the CalleeSavedStackSize for SVE vectors in 'scalable bytes'
285  SVECalleeSavedStackSize = Size;
286  }
287  unsigned getSVECalleeSavedStackSize() const {
288  return SVECalleeSavedStackSize;
289  }
290 
291  void setMinMaxSVECSFrameIndex(int Min, int Max) {
292  MinSVECSFrameIndex = Min;
293  MaxSVECSFrameIndex = Max;
294  }
295 
296  int getMinSVECSFrameIndex() const { return MinSVECSFrameIndex; }
297  int getMaxSVECSFrameIndex() const { return MaxSVECSFrameIndex; }
298 
299  void incNumLocalDynamicTLSAccesses() { ++NumLocalDynamicTLSAccesses; }
300  unsigned getNumLocalDynamicTLSAccesses() const {
301  return NumLocalDynamicTLSAccesses;
302  }
303 
304  Optional<bool> hasRedZone() const { return HasRedZone; }
305  void setHasRedZone(bool s) { HasRedZone = s; }
306 
307  int getVarArgsStackIndex() const { return VarArgsStackIndex; }
308  void setVarArgsStackIndex(int Index) { VarArgsStackIndex = Index; }
309 
310  int getVarArgsGPRIndex() const { return VarArgsGPRIndex; }
311  void setVarArgsGPRIndex(int Index) { VarArgsGPRIndex = Index; }
312 
313  unsigned getVarArgsGPRSize() const { return VarArgsGPRSize; }
314  void setVarArgsGPRSize(unsigned Size) { VarArgsGPRSize = Size; }
315 
316  int getVarArgsFPRIndex() const { return VarArgsFPRIndex; }
317  void setVarArgsFPRIndex(int Index) { VarArgsFPRIndex = Index; }
318 
319  unsigned getVarArgsFPRSize() const { return VarArgsFPRSize; }
320  void setVarArgsFPRSize(unsigned Size) { VarArgsFPRSize = Size; }
321 
322  unsigned getSRetReturnReg() const { return SRetReturnReg; }
323  void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; }
324 
325  unsigned getJumpTableEntrySize(int Idx) const {
326  return JumpTableEntryInfo[Idx].first;
327  }
329  return JumpTableEntryInfo[Idx].second;
330  }
331  void setJumpTableEntryInfo(int Idx, unsigned Size, MCSymbol *PCRelSym) {
332  if ((unsigned)Idx >= JumpTableEntryInfo.size())
333  JumpTableEntryInfo.resize(Idx+1);
334  JumpTableEntryInfo[Idx] = std::make_pair(Size, PCRelSym);
335  }
336 
338 
339  const SetOfInstructions &getLOHRelated() const { return LOHRelated; }
340 
341  // Shortcuts for LOH related types.
343  MCLOHType Kind;
344 
345  /// Arguments of this directive. Order matters.
347 
348  public:
350 
352  : Kind(Kind), Args(Args.begin(), Args.end()) {
353  assert(isValidMCLOHType(Kind) && "Invalid LOH directive type!");
354  }
355 
356  MCLOHType getKind() const { return Kind; }
357  LOHArgs getArgs() const { return Args; }
358  };
359 
362 
363  const MILOHContainer &getLOHContainer() const { return LOHContainerSet; }
364 
365  /// Add a LOH directive of this @p Kind and this @p Args.
367  LOHContainerSet.push_back(MILOHDirective(Kind, Args));
368  LOHRelated.insert(Args.begin(), Args.end());
369  }
370 
372  return ForwardedMustTailRegParms;
373  }
374 
376  return TaggedBasePointerIndex;
377  }
378  void setTaggedBasePointerIndex(int Index) { TaggedBasePointerIndex = Index; }
379 
380  unsigned getTaggedBasePointerOffset() const {
381  return TaggedBasePointerOffset;
382  }
384  TaggedBasePointerOffset = Offset;
385  }
386 
388  return CalleeSaveBaseToFrameRecordOffset;
389  }
391  CalleeSaveBaseToFrameRecordOffset = Offset;
392  }
393 
394  bool shouldSignReturnAddress() const;
395  bool shouldSignReturnAddress(bool SpillsLR) const;
396 
397  bool shouldSignWithBKey() const { return SignWithBKey; }
398 
399  bool branchTargetEnforcement() const { return BranchTargetEnforcement; }
400 
401  void setHasSwiftAsyncContext(bool HasContext) {
402  HasSwiftAsyncContext = HasContext;
403  }
404  bool hasSwiftAsyncContext() const { return HasSwiftAsyncContext; }
405 
407  SwiftAsyncContextFrameIdx = FI;
408  }
409  int getSwiftAsyncContextFrameIdx() const { return SwiftAsyncContextFrameIdx; }
410 
411 private:
412  // Hold the lists of LOHs.
413  MILOHContainer LOHContainerSet;
414  SetOfInstructions LOHRelated;
415 
416  SmallVector<std::pair<unsigned, MCSymbol *>, 2> JumpTableEntryInfo;
417 };
418 
419 namespace yaml {
422 
423  AArch64FunctionInfo() = default;
425 
426  void mappingImpl(yaml::IO &YamlIO) override;
427  ~AArch64FunctionInfo() = default;
428 };
429 
430 template <> struct MappingTraits<AArch64FunctionInfo> {
431  static void mapping(IO &YamlIO, AArch64FunctionInfo &MFI) {
432  YamlIO.mapOptional("hasRedZone", MFI.HasRedZone);
433  }
434 };
435 
436 } // end namespace yaml
437 
438 } // end namespace llvm
439 
440 #endif // LLVM_LIB_TARGET_AARCH64_AARCH64MACHINEFUNCTIONINFO_H
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
llvm::alignTo
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
Definition: Alignment.h:148
llvm::AArch64FunctionInfo::setArgumentStackToRestore
void setArgumentStackToRestore(unsigned bytes)
Definition: AArch64MachineFunctionInfo.h:185
llvm::yaml::AArch64FunctionInfo::~AArch64FunctionInfo
~AArch64FunctionInfo()=default
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
Reg
unsigned Reg
Definition: MachineSink.cpp:1566
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::AArch64FunctionInfo::getVarArgsFPRIndex
int getVarArgsFPRIndex() const
Definition: AArch64MachineFunctionInfo.h:316
llvm::AArch64FunctionInfo::getJumpTableEntryPCRelSymbol
MCSymbol * getJumpTableEntryPCRelSymbol(int Idx) const
Definition: AArch64MachineFunctionInfo.h:328
Optional.h
llvm::AArch64FunctionInfo::hasRedZone
Optional< bool > hasRedZone() const
Definition: AArch64MachineFunctionInfo.h:304
llvm::yaml::AArch64FunctionInfo::mappingImpl
void mappingImpl(yaml::IO &YamlIO) override
Definition: AArch64MachineFunctionInfo.cpp:27
llvm::MCLOHType
MCLOHType
Linker Optimization Hint Type.
Definition: MCLinkerOptimizationHint.h:33
llvm::AArch64FunctionInfo::MILOHDirective
Definition: AArch64MachineFunctionInfo.h:342
llvm::yaml::MachineFunctionInfo
Targets should override this in a way that mirrors the implementation of llvm::MachineFunctionInfo.
Definition: MIRYamlMapping.h:673
llvm::AArch64FunctionInfo::getMaxSVECSFrameIndex
int getMaxSVECSFrameIndex() const
Definition: AArch64MachineFunctionInfo.h:297
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1168
llvm::AArch64FunctionInfo::getTaggedBasePointerIndex
Optional< int > getTaggedBasePointerIndex() const
Definition: AArch64MachineFunctionInfo.h:375
llvm::AArch64FunctionInfo::setSwiftAsyncContextFrameIdx
void setSwiftAsyncContextFrameIdx(int FI)
Definition: AArch64MachineFunctionInfo.h:406
llvm::sys::path::end
const_iterator end(StringRef path)
Get end iterator over path.
Definition: Path.cpp:233
llvm::sys::path::begin
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
Definition: Path.cpp:224
YamlIO
IO & YamlIO
Definition: ELFYAML.cpp:1171
llvm::Optional< bool >
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::SmallPtrSet< const MachineInstr *, 16 >
llvm::AArch64FunctionInfo::setTaggedBasePointerIndex
void setTaggedBasePointerIndex(int Index)
Definition: AArch64MachineFunctionInfo.h:378
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:52
llvm::AArch64FunctionInfo::setVarArgsStackIndex
void setVarArgsStackIndex(int Index)
Definition: AArch64MachineFunctionInfo.h:308
llvm::AArch64FunctionInfo::setTaggedBasePointerOffset
void setTaggedBasePointerOffset(unsigned Offset)
Definition: AArch64MachineFunctionInfo.h:383
llvm::AArch64FunctionInfo::getLOHRelated
const SetOfInstructions & getLOHRelated() const
Definition: AArch64MachineFunctionInfo.h:339
llvm::AArch64FunctionInfo::getJumpTableEntrySize
unsigned getJumpTableEntrySize(int Idx) const
Definition: AArch64MachineFunctionInfo.h:325
llvm::AArch64FunctionInfo::setHasSwiftAsyncContext
void setHasSwiftAsyncContext(bool HasContext)
Definition: AArch64MachineFunctionInfo.h:401
llvm::yaml::MappingTraits< AArch64FunctionInfo >::mapping
static void mapping(IO &YamlIO, AArch64FunctionInfo &MFI)
Definition: AArch64MachineFunctionInfo.h:431
llvm::AArch64FunctionInfo::MILOHContainer
SmallVector< MILOHDirective, 32 > MILOHContainer
Definition: AArch64MachineFunctionInfo.h:361
MIRYamlMapping.h
llvm::AArch64FunctionInfo::getBytesInStackArgArea
unsigned getBytesInStackArgArea() const
Definition: AArch64MachineFunctionInfo.h:181
llvm::AArch64FunctionInfo::isStackRealigned
bool isStackRealigned() const
Definition: AArch64MachineFunctionInfo.h:206
llvm::AArch64FunctionInfo::setVarArgsFPRSize
void setVarArgsFPRSize(unsigned Size)
Definition: AArch64MachineFunctionInfo.h:320
llvm::AArch64FunctionInfo::setHasRedZone
void setHasRedZone(bool s)
Definition: AArch64MachineFunctionInfo.h:305
llvm::AArch64FunctionInfo::setBytesInStackArgArea
void setBytesInStackArgArea(unsigned bytes)
Definition: AArch64MachineFunctionInfo.h:182
llvm::AArch64FunctionInfo::getNumLocalDynamicTLSAccesses
unsigned getNumLocalDynamicTLSAccesses() const
Definition: AArch64MachineFunctionInfo.h:300
llvm::isValidMCLOHType
static bool isValidMCLOHType(unsigned Kind)
Definition: MCLinkerOptimizationHint.h:48
llvm::MachineFrameInfo::getStackID
uint8_t getStackID(int ObjectIdx) const
Definition: MachineFrameInfo.h:699
llvm::AArch64FunctionInfo::incNumLocalDynamicTLSAccesses
void incNumLocalDynamicTLSAccesses()
Definition: AArch64MachineFunctionInfo.h:299
llvm::AArch64FunctionInfo::shouldSignReturnAddress
bool shouldSignReturnAddress() const
Definition: AArch64MachineFunctionInfo.cpp:112
llvm::AArch64FunctionInfo::setSRetReturnReg
void setSRetReturnReg(unsigned Reg)
Definition: AArch64MachineFunctionInfo.h:323
llvm::AArch64FunctionInfo::getVarArgsStackIndex
int getVarArgsStackIndex() const
Definition: AArch64MachineFunctionInfo.h:307
SmallPtrSet.h
llvm::MachineFrameInfo::getObjectOffset
int64_t getObjectOffset(int ObjectIdx) const
Return the assigned stack offset of the specified object from the incoming stack pointer.
Definition: MachineFrameInfo.h:494
Info
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
llvm::AArch64FunctionInfo::AArch64FunctionInfo
AArch64FunctionInfo(MachineFunction &MF)
Definition: AArch64MachineFunctionInfo.cpp:80
llvm::AArch64FunctionInfo::hasStackFrame
bool hasStackFrame() const
Definition: AArch64MachineFunctionInfo.h:203
llvm::AArch64FunctionInfo::MILOHDirective::getArgs
LOHArgs getArgs() const
Definition: AArch64MachineFunctionInfo.h:357
llvm::MachineFrameInfo::isCalleeSavedInfoValid
bool isCalleeSavedInfoValid() const
Has the callee saved info been calculated yet?
Definition: MachineFrameInfo.h:768
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::AArch64FunctionInfo::shouldSignWithBKey
bool shouldSignWithBKey() const
Definition: AArch64MachineFunctionInfo.h:397
llvm::AArch64FunctionInfo::setOutliningStyle
void setOutliningStyle(std::string Style)
Definition: AArch64MachineFunctionInfo.h:221
llvm::AArch64FunctionInfo::setVarArgsFPRIndex
void setVarArgsFPRIndex(int Index)
Definition: AArch64MachineFunctionInfo.h:317
llvm::AArch64FunctionInfo::isSplitCSR
bool isSplitCSR() const
Definition: AArch64MachineFunctionInfo.h:215
llvm::AArch64FunctionInfo::getCalleeSaveBaseToFrameRecordOffset
int getCalleeSaveBaseToFrameRecordOffset() const
Definition: AArch64MachineFunctionInfo.h:387
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
llvm::AArch64FunctionInfo::SetOfInstructions
SmallPtrSet< const MachineInstr *, 16 > SetOfInstructions
Definition: AArch64MachineFunctionInfo.h:337
uint64_t
llvm::MachineFrameInfo::getObjectSize
int64_t getObjectSize(int ObjectIdx) const
Return the size of the specified object.
Definition: MachineFrameInfo.h:453
llvm::AArch64FunctionInfo::getTaggedBasePointerOffset
unsigned getTaggedBasePointerOffset() const
Definition: AArch64MachineFunctionInfo.h:380
s
multiplies can be turned into SHL s
Definition: README.txt:370
llvm::yaml::AArch64FunctionInfo::AArch64FunctionInfo
AArch64FunctionInfo()=default
llvm::AArch64FunctionInfo::MILOHDirective::getKind
MCLOHType getKind() const
Definition: AArch64MachineFunctionInfo.h:356
llvm::AArch64FunctionInfo::setCalleeSaveBaseToFrameRecordOffset
void setCalleeSaveBaseToFrameRecordOffset(int Offset)
Definition: AArch64MachineFunctionInfo.h:390
llvm::AArch64FunctionInfo::getVarArgsGPRIndex
int getVarArgsGPRIndex() const
Definition: AArch64MachineFunctionInfo.h:310
llvm::AArch64FunctionInfo
AArch64FunctionInfo - This class is derived from MachineFunctionInfo and contains private AArch64-spe...
Definition: AArch64MachineFunctionInfo.h:37
llvm::AArch64FunctionInfo::MILOHDirective::LOHArgs
ArrayRef< const MachineInstr * > LOHArgs
Definition: AArch64MachineFunctionInfo.h:349
ArrayRef.h
llvm::HexStyle::Style
Style
Definition: MCInstPrinter.h:32
llvm::AArch64FunctionInfo::setCalleeSaveStackHasFreeSpace
void setCalleeSaveStackHasFreeSpace(bool s)
Definition: AArch64MachineFunctionInfo.h:212
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::AArch64FunctionInfo::getLocalStackSize
uint64_t getLocalStackSize() const
Definition: AArch64MachineFunctionInfo.h:219
llvm::AArch64FunctionInfo::setStackRealigned
void setStackRealigned(bool s)
Definition: AArch64MachineFunctionInfo.h:207
llvm::AArch64FunctionInfo::branchTargetEnforcement
bool branchTargetEnforcement() const
Definition: AArch64MachineFunctionInfo.h:399
llvm::AArch64FunctionInfo::setSVECalleeSavedStackSize
void setSVECalleeSavedStackSize(unsigned Size)
Definition: AArch64MachineFunctionInfo.h:284
llvm::AArch64FunctionInfo::getVarArgsGPRSize
unsigned getVarArgsGPRSize() const
Definition: AArch64MachineFunctionInfo.h:313
llvm::AArch64FunctionInfo::getVarArgsFPRSize
unsigned getVarArgsFPRSize() const
Definition: AArch64MachineFunctionInfo.h:319
llvm::MachineFunction
Definition: MachineFunction.h:230
llvm::MachineFrameInfo::getCalleeSavedInfo
const std::vector< CalleeSavedInfo > & getCalleeSavedInfo() const
Returns a reference to call saved info vector for the current function.
Definition: MachineFrameInfo.h:755
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::min
Expected< ExpressionValue > min(const ExpressionValue &Lhs, const ExpressionValue &Rhs)
Definition: FileCheck.cpp:357
llvm::AArch64FunctionInfo::getSwiftAsyncContextFrameIdx
int getSwiftAsyncContextFrameIdx() const
Definition: AArch64MachineFunctionInfo.h:409
llvm::AArch64FunctionInfo::hasCalculatedStackSizeSVE
bool hasCalculatedStackSizeSVE() const
Definition: AArch64MachineFunctionInfo.h:194
llvm::AArch64FunctionInfo::getLOHContainer
const MILOHContainer & getLOHContainer() const
Definition: AArch64MachineFunctionInfo.h:363
llvm::AArch64FunctionInfo::setVarArgsGPRIndex
void setVarArgsGPRIndex(int Index)
Definition: AArch64MachineFunctionInfo.h:311
llvm::AArch64FunctionInfo::getForwardedMustTailRegParms
SmallVectorImpl< ForwardedRegister > & getForwardedMustTailRegParms()
Definition: AArch64MachineFunctionInfo.h:371
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::AArch64FunctionInfo::getTailCallReservedStack
unsigned getTailCallReservedStack() const
Definition: AArch64MachineFunctionInfo.h:189
llvm::AArch64FunctionInfo::setMinMaxSVECSFrameIndex
void setMinMaxSVECSFrameIndex(int Min, int Max)
Definition: AArch64MachineFunctionInfo.h:291
llvm::AArch64FunctionInfo::hasCalleeSaveStackFreeSpace
bool hasCalleeSaveStackFreeSpace() const
Definition: AArch64MachineFunctionInfo.h:209
llvm::AArch64FunctionInfo::MILOHDirective::MILOHDirective
MILOHDirective(MCLOHType Kind, LOHArgs Args)
Definition: AArch64MachineFunctionInfo.h:351
llvm::AArch64FunctionInfo::getStackSizeSVE
uint64_t getStackSizeSVE() const
Definition: AArch64MachineFunctionInfo.h:201
CallingConvLower.h
llvm::AArch64FunctionInfo::initializeBaseYamlFields
void initializeBaseYamlFields(const yaml::AArch64FunctionInfo &YamlMFI)
Definition: AArch64MachineFunctionInfo.cpp:31
llvm::AArch64FunctionInfo::getCalleeSavedStackSize
unsigned getCalleeSavedStackSize() const
Definition: AArch64MachineFunctionInfo.h:277
llvm::AArch64FunctionInfo::getMinSVECSFrameIndex
int getMinSVECSFrameIndex() const
Definition: AArch64MachineFunctionInfo.h:296
Function.h
llvm::AArch64FunctionInfo::setLocalStackSize
void setLocalStackSize(uint64_t Size)
Definition: AArch64MachineFunctionInfo.h:218
llvm::AArch64FunctionInfo::setJumpTableEntryInfo
void setJumpTableEntryInfo(int Idx, unsigned Size, MCSymbol *PCRelSym)
Definition: AArch64MachineFunctionInfo.h:331
llvm::TargetStackID::Default
@ Default
Definition: TargetFrameLowering.h:28
llvm::AArch64FunctionInfo::getSVECalleeSavedStackSize
unsigned getSVECalleeSavedStackSize() const
Definition: AArch64MachineFunctionInfo.h:287
MCLinkerOptimizationHint.h
llvm::AArch64FunctionInfo::getArgumentStackToRestore
unsigned getArgumentStackToRestore() const
Definition: AArch64MachineFunctionInfo.h:184
llvm::MachineFrameInfo
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
Definition: MachineFrameInfo.h:107
llvm::AArch64FunctionInfo::getSRetReturnReg
unsigned getSRetReturnReg() const
Definition: AArch64MachineFunctionInfo.h:322
SmallVector.h
llvm::AArch64FunctionInfo::hasSwiftAsyncContext
bool hasSwiftAsyncContext() const
Definition: AArch64MachineFunctionInfo.h:404
llvm::yaml::AArch64FunctionInfo::HasRedZone
Optional< bool > HasRedZone
Definition: AArch64MachineFunctionInfo.h:421
llvm::AArch64FunctionInfo::getOutliningStyle
Optional< std::string > getOutliningStyle() const
Definition: AArch64MachineFunctionInfo.h:222
llvm::max
Align max(MaybeAlign Lhs, Align Rhs)
Definition: Alignment.h:340
llvm::AArch64FunctionInfo::setHasStackFrame
void setHasStackFrame(bool s)
Definition: AArch64MachineFunctionInfo.h:204
llvm::AArch64FunctionInfo::getCalleeSavedStackSize
unsigned getCalleeSavedStackSize(const MachineFrameInfo &MFI) const
Definition: AArch64MachineFunctionInfo.h:234
llvm::SmallVectorImpl
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:43
llvm::AArch64FunctionInfo::setCalleeSavedStackSize
void setCalleeSavedStackSize(unsigned Size)
Definition: AArch64MachineFunctionInfo.h:224
llvm::AArch64FunctionInfo::setIsSplitCSR
void setIsSplitCSR(bool s)
Definition: AArch64MachineFunctionInfo.h:216
llvm::AMDGPU::HSAMD::Kernel::Key::Args
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
Definition: AMDGPUMetadata.h:389
MachineFunction.h
llvm::MachineFunctionInfo
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
Definition: MachineFunction.h:95
llvm::AArch64FunctionInfo::addLOHDirective
void addLOHDirective(MCLOHType Kind, MILOHArgs Args)
Add a LOH directive of this Kind and this Args.
Definition: AArch64MachineFunctionInfo.h:366
llvm::AArch64FunctionInfo::setTailCallReservedStack
void setTailCallReservedStack(unsigned bytes)
Definition: AArch64MachineFunctionInfo.h:190
llvm::yaml::AArch64FunctionInfo
Definition: AArch64MachineFunctionInfo.h:420
llvm::AArch64FunctionInfo::setStackSizeSVE
void setStackSizeSVE(uint64_t S)
Definition: AArch64MachineFunctionInfo.h:196
llvm::AArch64FunctionInfo::setVarArgsGPRSize
void setVarArgsGPRSize(unsigned Size)
Definition: AArch64MachineFunctionInfo.h:314
llvm::SmallPtrSetImpl::insert
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
Definition: SmallPtrSet.h:364