LLVM  13.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  /// HasStackFrame - True if this function has a stack frame. Set by
58  /// determineCalleeSaves().
59  bool HasStackFrame = false;
60 
61  /// Amount of stack frame size, not including callee-saved registers.
62  uint64_t LocalStackSize = 0;
63 
64  /// The start and end frame indices for the SVE callee saves.
65  int MinSVECSFrameIndex = 0;
66  int MaxSVECSFrameIndex = 0;
67 
68  /// Amount of stack frame size used for saving callee-saved registers.
69  unsigned CalleeSavedStackSize = 0;
70  unsigned SVECalleeSavedStackSize = 0;
71  bool HasCalleeSavedStackSize = false;
72 
73  /// Number of TLS accesses using the special (combinable)
74  /// _TLS_MODULE_BASE_ symbol.
75  unsigned NumLocalDynamicTLSAccesses = 0;
76 
77  /// FrameIndex for start of varargs area for arguments passed on the
78  /// stack.
79  int VarArgsStackIndex = 0;
80 
81  /// FrameIndex for start of varargs area for arguments passed in
82  /// general purpose registers.
83  int VarArgsGPRIndex = 0;
84 
85  /// Size of the varargs area for arguments passed in general purpose
86  /// registers.
87  unsigned VarArgsGPRSize = 0;
88 
89  /// FrameIndex for start of varargs area for arguments passed in
90  /// floating-point registers.
91  int VarArgsFPRIndex = 0;
92 
93  /// Size of the varargs area for arguments passed in floating-point
94  /// registers.
95  unsigned VarArgsFPRSize = 0;
96 
97  /// True if this function has a subset of CSRs that is handled explicitly via
98  /// copies.
99  bool IsSplitCSR = false;
100 
101  /// True when the stack gets realigned dynamically because the size of stack
102  /// frame is unknown at compile time. e.g., in case of VLAs.
103  bool StackRealigned = false;
104 
105  /// True when the callee-save stack area has unused gaps that may be used for
106  /// other stack allocations.
107  bool CalleeSaveStackHasFreeSpace = false;
108 
109  /// SRetReturnReg - sret lowering includes returning the value of the
110  /// returned struct in a register. This field holds the virtual register into
111  /// which the sret argument is passed.
112  unsigned SRetReturnReg = 0;
113  /// SVE stack size (for predicates and data vectors) are maintained here
114  /// rather than in FrameInfo, as the placement and Stack IDs are target
115  /// specific.
116  uint64_t StackSizeSVE = 0;
117 
118  /// HasCalculatedStackSizeSVE indicates whether StackSizeSVE is valid.
119  bool HasCalculatedStackSizeSVE = false;
120 
121  /// Has a value when it is known whether or not the function uses a
122  /// redzone, and no value otherwise.
123  /// Initialized during frame lowering, unless the function has the noredzone
124  /// attribute, in which case it is set to false at construction.
125  Optional<bool> HasRedZone;
126 
127  /// ForwardedMustTailRegParms - A list of virtual and physical registers
128  /// that must be forwarded to every musttail call.
129  SmallVector<ForwardedRegister, 1> ForwardedMustTailRegParms;
130 
131  /// FrameIndex for the tagged base pointer.
132  Optional<int> TaggedBasePointerIndex;
133 
134  /// Offset from SP-at-entry to the tagged base pointer.
135  /// Tagged base pointer is set up to point to the first (lowest address)
136  /// tagged stack slot.
137  unsigned TaggedBasePointerOffset;
138 
139  /// OutliningStyle denotes, if a function was outined, how it was outlined,
140  /// e.g. Tail Call, Thunk, or Function if none apply.
141  Optional<std::string> OutliningStyle;
142 
143  // Offset from SP-after-callee-saved-spills (i.e. SP-at-entry minus
144  // CalleeSavedStackSize) to the address of the frame record.
145  int CalleeSaveBaseToFrameRecordOffset = 0;
146 
147  /// SignReturnAddress is true if PAC-RET is enabled for the function with
148  /// defaults being sign non-leaf functions only, with the B key.
149  bool SignReturnAddress = false;
150 
151  /// SignReturnAddressAll modifies the default PAC-RET mode to signing leaf
152  /// functions as well.
153  bool SignReturnAddressAll = false;
154 
155  /// SignWithBKey modifies the default PAC-RET mode to signing with the B key.
156  bool SignWithBKey = false;
157 
158  /// BranchTargetEnforcement enables placing BTI instructions at potential
159  /// indirect branch destinations.
160  bool BranchTargetEnforcement = false;
161 
162  /// Whether this function has an extended frame record [Ctx, FP, LR]. If so,
163  /// bit 60 of the in-memory FP will be 1 to enable other tools to detect the
164  /// extended record.
165  bool HasSwiftAsyncContext = false;
166 
167  /// The stack slot where the Swift asynchronous context is stored.
168  int SwiftAsyncContextFrameIdx = std::numeric_limits<int>::max();
169 
170 public:
171  explicit AArch64FunctionInfo(MachineFunction &MF);
172 
174 
175  unsigned getBytesInStackArgArea() const { return BytesInStackArgArea; }
176  void setBytesInStackArgArea(unsigned bytes) { BytesInStackArgArea = bytes; }
177 
178  unsigned getArgumentStackToRestore() const { return ArgumentStackToRestore; }
179  void setArgumentStackToRestore(unsigned bytes) {
180  ArgumentStackToRestore = bytes;
181  }
182 
183  bool hasCalculatedStackSizeSVE() const { return HasCalculatedStackSizeSVE; }
184 
185  void setStackSizeSVE(uint64_t S) {
186  HasCalculatedStackSizeSVE = true;
187  StackSizeSVE = S;
188  }
189 
190  uint64_t getStackSizeSVE() const { return StackSizeSVE; }
191 
192  bool hasStackFrame() const { return HasStackFrame; }
193  void setHasStackFrame(bool s) { HasStackFrame = s; }
194 
195  bool isStackRealigned() const { return StackRealigned; }
196  void setStackRealigned(bool s) { StackRealigned = s; }
197 
199  return CalleeSaveStackHasFreeSpace;
200  }
202  CalleeSaveStackHasFreeSpace = s;
203  }
204  bool isSplitCSR() const { return IsSplitCSR; }
205  void setIsSplitCSR(bool s) { IsSplitCSR = s; }
206 
207  void setLocalStackSize(uint64_t Size) { LocalStackSize = Size; }
208  uint64_t getLocalStackSize() const { return LocalStackSize; }
209 
210  void setOutliningStyle(std::string Style) { OutliningStyle = Style; }
211  Optional<std::string> getOutliningStyle() const { return OutliningStyle; }
212 
213  void setCalleeSavedStackSize(unsigned Size) {
214  CalleeSavedStackSize = Size;
215  HasCalleeSavedStackSize = true;
216  }
217 
218  // When CalleeSavedStackSize has not been set (for example when
219  // some MachineIR pass is run in isolation), then recalculate
220  // the CalleeSavedStackSize directly from the CalleeSavedInfo.
221  // Note: This information can only be recalculated after PEI
222  // has assigned offsets to the callee save objects.
223  unsigned getCalleeSavedStackSize(const MachineFrameInfo &MFI) const {
224  bool ValidateCalleeSavedStackSize = false;
225 
226 #ifndef NDEBUG
227  // Make sure the calculated size derived from the CalleeSavedInfo
228  // equals the cached size that was calculated elsewhere (e.g. in
229  // determineCalleeSaves).
230  ValidateCalleeSavedStackSize = HasCalleeSavedStackSize;
231 #endif
232 
233  if (!HasCalleeSavedStackSize || ValidateCalleeSavedStackSize) {
234  assert(MFI.isCalleeSavedInfoValid() && "CalleeSavedInfo not calculated");
235  if (MFI.getCalleeSavedInfo().empty())
236  return 0;
237 
238  int64_t MinOffset = std::numeric_limits<int64_t>::max();
239  int64_t MaxOffset = std::numeric_limits<int64_t>::min();
240  for (const auto &Info : MFI.getCalleeSavedInfo()) {
241  int FrameIdx = Info.getFrameIdx();
242  if (MFI.getStackID(FrameIdx) != TargetStackID::Default)
243  continue;
244  int64_t Offset = MFI.getObjectOffset(FrameIdx);
245  int64_t ObjSize = MFI.getObjectSize(FrameIdx);
246  MinOffset = std::min<int64_t>(Offset, MinOffset);
247  MaxOffset = std::max<int64_t>(Offset + ObjSize, MaxOffset);
248  }
249 
250  if (SwiftAsyncContextFrameIdx != std::numeric_limits<int>::max()) {
252  int64_t ObjSize = MFI.getObjectSize(getSwiftAsyncContextFrameIdx());
253  MinOffset = std::min<int64_t>(Offset, MinOffset);
254  MaxOffset = std::max<int64_t>(Offset + ObjSize, MaxOffset);
255  }
256 
257  unsigned Size = alignTo(MaxOffset - MinOffset, 16);
258  assert((!HasCalleeSavedStackSize || getCalleeSavedStackSize() == Size) &&
259  "Invalid size calculated for callee saves");
260  return Size;
261  }
262 
263  return getCalleeSavedStackSize();
264  }
265 
266  unsigned getCalleeSavedStackSize() const {
267  assert(HasCalleeSavedStackSize &&
268  "CalleeSavedStackSize has not been calculated");
269  return CalleeSavedStackSize;
270  }
271 
272  // Saves the CalleeSavedStackSize for SVE vectors in 'scalable bytes'
274  SVECalleeSavedStackSize = Size;
275  }
276  unsigned getSVECalleeSavedStackSize() const {
277  return SVECalleeSavedStackSize;
278  }
279 
280  void setMinMaxSVECSFrameIndex(int Min, int Max) {
281  MinSVECSFrameIndex = Min;
282  MaxSVECSFrameIndex = Max;
283  }
284 
285  int getMinSVECSFrameIndex() const { return MinSVECSFrameIndex; }
286  int getMaxSVECSFrameIndex() const { return MaxSVECSFrameIndex; }
287 
288  void incNumLocalDynamicTLSAccesses() { ++NumLocalDynamicTLSAccesses; }
289  unsigned getNumLocalDynamicTLSAccesses() const {
290  return NumLocalDynamicTLSAccesses;
291  }
292 
293  Optional<bool> hasRedZone() const { return HasRedZone; }
294  void setHasRedZone(bool s) { HasRedZone = s; }
295 
296  int getVarArgsStackIndex() const { return VarArgsStackIndex; }
297  void setVarArgsStackIndex(int Index) { VarArgsStackIndex = Index; }
298 
299  int getVarArgsGPRIndex() const { return VarArgsGPRIndex; }
300  void setVarArgsGPRIndex(int Index) { VarArgsGPRIndex = Index; }
301 
302  unsigned getVarArgsGPRSize() const { return VarArgsGPRSize; }
303  void setVarArgsGPRSize(unsigned Size) { VarArgsGPRSize = Size; }
304 
305  int getVarArgsFPRIndex() const { return VarArgsFPRIndex; }
306  void setVarArgsFPRIndex(int Index) { VarArgsFPRIndex = Index; }
307 
308  unsigned getVarArgsFPRSize() const { return VarArgsFPRSize; }
309  void setVarArgsFPRSize(unsigned Size) { VarArgsFPRSize = Size; }
310 
311  unsigned getSRetReturnReg() const { return SRetReturnReg; }
312  void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; }
313 
314  unsigned getJumpTableEntrySize(int Idx) const {
315  return JumpTableEntryInfo[Idx].first;
316  }
318  return JumpTableEntryInfo[Idx].second;
319  }
320  void setJumpTableEntryInfo(int Idx, unsigned Size, MCSymbol *PCRelSym) {
321  if ((unsigned)Idx >= JumpTableEntryInfo.size())
322  JumpTableEntryInfo.resize(Idx+1);
323  JumpTableEntryInfo[Idx] = std::make_pair(Size, PCRelSym);
324  }
325 
327 
328  const SetOfInstructions &getLOHRelated() const { return LOHRelated; }
329 
330  // Shortcuts for LOH related types.
332  MCLOHType Kind;
333 
334  /// Arguments of this directive. Order matters.
336 
337  public:
339 
341  : Kind(Kind), Args(Args.begin(), Args.end()) {
342  assert(isValidMCLOHType(Kind) && "Invalid LOH directive type!");
343  }
344 
345  MCLOHType getKind() const { return Kind; }
346  LOHArgs getArgs() const { return Args; }
347  };
348 
351 
352  const MILOHContainer &getLOHContainer() const { return LOHContainerSet; }
353 
354  /// Add a LOH directive of this @p Kind and this @p Args.
356  LOHContainerSet.push_back(MILOHDirective(Kind, Args));
357  LOHRelated.insert(Args.begin(), Args.end());
358  }
359 
361  return ForwardedMustTailRegParms;
362  }
363 
365  return TaggedBasePointerIndex;
366  }
367  void setTaggedBasePointerIndex(int Index) { TaggedBasePointerIndex = Index; }
368 
369  unsigned getTaggedBasePointerOffset() const {
370  return TaggedBasePointerOffset;
371  }
373  TaggedBasePointerOffset = Offset;
374  }
375 
377  return CalleeSaveBaseToFrameRecordOffset;
378  }
380  CalleeSaveBaseToFrameRecordOffset = Offset;
381  }
382 
383  bool shouldSignReturnAddress() const;
384  bool shouldSignReturnAddress(bool SpillsLR) const;
385 
386  bool shouldSignWithBKey() const { return SignWithBKey; }
387 
388  bool branchTargetEnforcement() const { return BranchTargetEnforcement; }
389 
390  void setHasSwiftAsyncContext(bool HasContext) {
391  HasSwiftAsyncContext = HasContext;
392  }
393  bool hasSwiftAsyncContext() const { return HasSwiftAsyncContext; }
394 
396  SwiftAsyncContextFrameIdx = FI;
397  }
398  int getSwiftAsyncContextFrameIdx() const { return SwiftAsyncContextFrameIdx; }
399 
400 private:
401  // Hold the lists of LOHs.
402  MILOHContainer LOHContainerSet;
403  SetOfInstructions LOHRelated;
404 
405  SmallVector<std::pair<unsigned, MCSymbol *>, 2> JumpTableEntryInfo;
406 };
407 
408 namespace yaml {
411 
412  AArch64FunctionInfo() = default;
414 
415  void mappingImpl(yaml::IO &YamlIO) override;
416  ~AArch64FunctionInfo() = default;
417 };
418 
419 template <> struct MappingTraits<AArch64FunctionInfo> {
420  static void mapping(IO &YamlIO, AArch64FunctionInfo &MFI) {
421  YamlIO.mapOptional("hasRedZone", MFI.HasRedZone);
422  }
423 };
424 
425 } // end namespace yaml
426 
427 } // end namespace llvm
428 
429 #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:179
llvm::yaml::AArch64FunctionInfo::~AArch64FunctionInfo
~AArch64FunctionInfo()=default
llvm
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:305
llvm::AArch64FunctionInfo::getJumpTableEntryPCRelSymbol
MCSymbol * getJumpTableEntryPCRelSymbol(int Idx) const
Definition: AArch64MachineFunctionInfo.h:317
Optional.h
llvm::AArch64FunctionInfo::hasRedZone
Optional< bool > hasRedZone() const
Definition: AArch64MachineFunctionInfo.h:293
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:331
llvm::yaml::MachineFunctionInfo
Targets should override this in a way that mirrors the implementation of llvm::MachineFunctionInfo.
Definition: MIRYamlMapping.h:670
llvm::AArch64FunctionInfo::getMaxSVECSFrameIndex
int getMaxSVECSFrameIndex() const
Definition: AArch64MachineFunctionInfo.h:286
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:364
llvm::AArch64FunctionInfo::setSwiftAsyncContextFrameIdx
void setSwiftAsyncContextFrameIdx(int FI)
Definition: AArch64MachineFunctionInfo.h:395
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:1167
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:367
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:50
llvm::AArch64FunctionInfo::setVarArgsStackIndex
void setVarArgsStackIndex(int Index)
Definition: AArch64MachineFunctionInfo.h:297
llvm::AArch64FunctionInfo::setTaggedBasePointerOffset
void setTaggedBasePointerOffset(unsigned Offset)
Definition: AArch64MachineFunctionInfo.h:372
llvm::AArch64FunctionInfo::getLOHRelated
const SetOfInstructions & getLOHRelated() const
Definition: AArch64MachineFunctionInfo.h:328
llvm::AArch64FunctionInfo::getJumpTableEntrySize
unsigned getJumpTableEntrySize(int Idx) const
Definition: AArch64MachineFunctionInfo.h:314
llvm::AArch64FunctionInfo::setHasSwiftAsyncContext
void setHasSwiftAsyncContext(bool HasContext)
Definition: AArch64MachineFunctionInfo.h:390
llvm::yaml::MappingTraits< AArch64FunctionInfo >::mapping
static void mapping(IO &YamlIO, AArch64FunctionInfo &MFI)
Definition: AArch64MachineFunctionInfo.h:420
llvm::AArch64FunctionInfo::MILOHContainer
SmallVector< MILOHDirective, 32 > MILOHContainer
Definition: AArch64MachineFunctionInfo.h:350
MIRYamlMapping.h
llvm::AArch64FunctionInfo::getBytesInStackArgArea
unsigned getBytesInStackArgArea() const
Definition: AArch64MachineFunctionInfo.h:175
llvm::AArch64FunctionInfo::isStackRealigned
bool isStackRealigned() const
Definition: AArch64MachineFunctionInfo.h:195
llvm::AArch64FunctionInfo::setVarArgsFPRSize
void setVarArgsFPRSize(unsigned Size)
Definition: AArch64MachineFunctionInfo.h:309
llvm::AArch64FunctionInfo::setHasRedZone
void setHasRedZone(bool s)
Definition: AArch64MachineFunctionInfo.h:294
llvm::AArch64FunctionInfo::setBytesInStackArgArea
void setBytesInStackArgArea(unsigned bytes)
Definition: AArch64MachineFunctionInfo.h:176
llvm::AArch64FunctionInfo::getNumLocalDynamicTLSAccesses
unsigned getNumLocalDynamicTLSAccesses() const
Definition: AArch64MachineFunctionInfo.h:289
llvm::isValidMCLOHType
static bool isValidMCLOHType(unsigned Kind)
Definition: MCLinkerOptimizationHint.h:48
llvm::MachineFrameInfo::getStackID
uint8_t getStackID(int ObjectIdx) const
Definition: MachineFrameInfo.h:697
llvm::AArch64FunctionInfo::incNumLocalDynamicTLSAccesses
void incNumLocalDynamicTLSAccesses()
Definition: AArch64MachineFunctionInfo.h:288
llvm::AArch64FunctionInfo::shouldSignReturnAddress
bool shouldSignReturnAddress() const
Definition: AArch64MachineFunctionInfo.cpp:110
llvm::AArch64FunctionInfo::setSRetReturnReg
void setSRetReturnReg(unsigned Reg)
Definition: AArch64MachineFunctionInfo.h:312
llvm::AArch64FunctionInfo::getVarArgsStackIndex
int getVarArgsStackIndex() const
Definition: AArch64MachineFunctionInfo.h:296
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:492
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:192
llvm::AArch64FunctionInfo::MILOHDirective::getArgs
LOHArgs getArgs() const
Definition: AArch64MachineFunctionInfo.h:346
llvm::MachineFrameInfo::isCalleeSavedInfoValid
bool isCalleeSavedInfoValid() const
Has the callee saved info been calculated yet?
Definition: MachineFrameInfo.h:766
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::AArch64FunctionInfo::shouldSignWithBKey
bool shouldSignWithBKey() const
Definition: AArch64MachineFunctionInfo.h:386
llvm::AArch64FunctionInfo::setOutliningStyle
void setOutliningStyle(std::string Style)
Definition: AArch64MachineFunctionInfo.h:210
llvm::AArch64FunctionInfo::setVarArgsFPRIndex
void setVarArgsFPRIndex(int Index)
Definition: AArch64MachineFunctionInfo.h:306
llvm::AArch64FunctionInfo::isSplitCSR
bool isSplitCSR() const
Definition: AArch64MachineFunctionInfo.h:204
llvm::AArch64FunctionInfo::getCalleeSaveBaseToFrameRecordOffset
int getCalleeSaveBaseToFrameRecordOffset() const
Definition: AArch64MachineFunctionInfo.h:376
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
llvm::AArch64FunctionInfo::SetOfInstructions
SmallPtrSet< const MachineInstr *, 16 > SetOfInstructions
Definition: AArch64MachineFunctionInfo.h:326
llvm::MachineFrameInfo::getObjectSize
int64_t getObjectSize(int ObjectIdx) const
Return the size of the specified object.
Definition: MachineFrameInfo.h:451
llvm::AArch64FunctionInfo::getTaggedBasePointerOffset
unsigned getTaggedBasePointerOffset() const
Definition: AArch64MachineFunctionInfo.h:369
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:345
llvm::AArch64FunctionInfo::setCalleeSaveBaseToFrameRecordOffset
void setCalleeSaveBaseToFrameRecordOffset(int Offset)
Definition: AArch64MachineFunctionInfo.h:379
llvm::AArch64FunctionInfo::getVarArgsGPRIndex
int getVarArgsGPRIndex() const
Definition: AArch64MachineFunctionInfo.h:299
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:338
ArrayRef.h
llvm::HexStyle::Style
Style
Definition: MCInstPrinter.h:32
llvm::AArch64FunctionInfo::setCalleeSaveStackHasFreeSpace
void setCalleeSaveStackHasFreeSpace(bool s)
Definition: AArch64MachineFunctionInfo.h:201
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::AArch64FunctionInfo::getLocalStackSize
uint64_t getLocalStackSize() const
Definition: AArch64MachineFunctionInfo.h:208
llvm::AArch64FunctionInfo::setStackRealigned
void setStackRealigned(bool s)
Definition: AArch64MachineFunctionInfo.h:196
llvm::AArch64FunctionInfo::branchTargetEnforcement
bool branchTargetEnforcement() const
Definition: AArch64MachineFunctionInfo.h:388
llvm::AArch64FunctionInfo::setSVECalleeSavedStackSize
void setSVECalleeSavedStackSize(unsigned Size)
Definition: AArch64MachineFunctionInfo.h:273
llvm::AArch64FunctionInfo::getVarArgsGPRSize
unsigned getVarArgsGPRSize() const
Definition: AArch64MachineFunctionInfo.h:302
llvm::AArch64FunctionInfo::getVarArgsFPRSize
unsigned getVarArgsFPRSize() const
Definition: AArch64MachineFunctionInfo.h:308
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:753
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:398
llvm::AArch64FunctionInfo::hasCalculatedStackSizeSVE
bool hasCalculatedStackSizeSVE() const
Definition: AArch64MachineFunctionInfo.h:183
llvm::AArch64FunctionInfo::getLOHContainer
const MILOHContainer & getLOHContainer() const
Definition: AArch64MachineFunctionInfo.h:352
llvm::AArch64FunctionInfo::setVarArgsGPRIndex
void setVarArgsGPRIndex(int Index)
Definition: AArch64MachineFunctionInfo.h:300
llvm::AArch64FunctionInfo::getForwardedMustTailRegParms
SmallVectorImpl< ForwardedRegister > & getForwardedMustTailRegParms()
Definition: AArch64MachineFunctionInfo.h:360
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::setMinMaxSVECSFrameIndex
void setMinMaxSVECSFrameIndex(int Min, int Max)
Definition: AArch64MachineFunctionInfo.h:280
llvm::AArch64FunctionInfo::hasCalleeSaveStackFreeSpace
bool hasCalleeSaveStackFreeSpace() const
Definition: AArch64MachineFunctionInfo.h:198
llvm::AArch64FunctionInfo::MILOHDirective::MILOHDirective
MILOHDirective(MCLOHType Kind, LOHArgs Args)
Definition: AArch64MachineFunctionInfo.h:340
llvm::AArch64FunctionInfo::getStackSizeSVE
uint64_t getStackSizeSVE() const
Definition: AArch64MachineFunctionInfo.h:190
CallingConvLower.h
llvm::AArch64FunctionInfo::initializeBaseYamlFields
void initializeBaseYamlFields(const yaml::AArch64FunctionInfo &YamlMFI)
Definition: AArch64MachineFunctionInfo.cpp:31
llvm::AArch64FunctionInfo::getCalleeSavedStackSize
unsigned getCalleeSavedStackSize() const
Definition: AArch64MachineFunctionInfo.h:266
llvm::AArch64FunctionInfo::getMinSVECSFrameIndex
int getMinSVECSFrameIndex() const
Definition: AArch64MachineFunctionInfo.h:285
Function.h
llvm::AArch64FunctionInfo::setLocalStackSize
void setLocalStackSize(uint64_t Size)
Definition: AArch64MachineFunctionInfo.h:207
llvm::AArch64FunctionInfo::setJumpTableEntryInfo
void setJumpTableEntryInfo(int Idx, unsigned Size, MCSymbol *PCRelSym)
Definition: AArch64MachineFunctionInfo.h:320
llvm::TargetStackID::Default
@ Default
Definition: TargetFrameLowering.h:28
llvm::AArch64FunctionInfo::getSVECalleeSavedStackSize
unsigned getSVECalleeSavedStackSize() const
Definition: AArch64MachineFunctionInfo.h:276
MCLinkerOptimizationHint.h
llvm::AArch64FunctionInfo::getArgumentStackToRestore
unsigned getArgumentStackToRestore() const
Definition: AArch64MachineFunctionInfo.h:178
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:311
SmallVector.h
llvm::AArch64FunctionInfo::hasSwiftAsyncContext
bool hasSwiftAsyncContext() const
Definition: AArch64MachineFunctionInfo.h:393
llvm::yaml::AArch64FunctionInfo::HasRedZone
Optional< bool > HasRedZone
Definition: AArch64MachineFunctionInfo.h:410
llvm::AArch64FunctionInfo::getOutliningStyle
Optional< std::string > getOutliningStyle() const
Definition: AArch64MachineFunctionInfo.h:211
llvm::max
Align max(MaybeAlign Lhs, Align Rhs)
Definition: Alignment.h:340
llvm::AArch64FunctionInfo::setHasStackFrame
void setHasStackFrame(bool s)
Definition: AArch64MachineFunctionInfo.h:193
llvm::AArch64FunctionInfo::getCalleeSavedStackSize
unsigned getCalleeSavedStackSize(const MachineFrameInfo &MFI) const
Definition: AArch64MachineFunctionInfo.h:223
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:213
llvm::AArch64FunctionInfo::setIsSplitCSR
void setIsSplitCSR(bool s)
Definition: AArch64MachineFunctionInfo.h:205
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:355
llvm::yaml::AArch64FunctionInfo
Definition: AArch64MachineFunctionInfo.h:409
llvm::AArch64FunctionInfo::setStackSizeSVE
void setStackSizeSVE(uint64_t S)
Definition: AArch64MachineFunctionInfo.h:185
llvm::AArch64FunctionInfo::setVarArgsGPRSize
void setVarArgsGPRSize(unsigned Size)
Definition: AArch64MachineFunctionInfo.h:303
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