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