diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/lib/Target/AArch64/AArch64MachineFunctionInfo.h | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/Target/AArch64/AArch64MachineFunctionInfo.h')
-rw-r--r-- | contrib/libs/llvm12/lib/Target/AArch64/AArch64MachineFunctionInfo.h | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/contrib/libs/llvm12/lib/Target/AArch64/AArch64MachineFunctionInfo.h b/contrib/libs/llvm12/lib/Target/AArch64/AArch64MachineFunctionInfo.h index b3f35a46c7..f60e2b6c31 100644 --- a/contrib/libs/llvm12/lib/Target/AArch64/AArch64MachineFunctionInfo.h +++ b/contrib/libs/llvm12/lib/Target/AArch64/AArch64MachineFunctionInfo.h @@ -35,9 +35,9 @@ class MachineInstr; /// AArch64FunctionInfo - This class is derived from MachineFunctionInfo and /// contains private AArch64-specific information for each MachineFunction. class AArch64FunctionInfo final : public MachineFunctionInfo { - /// Backreference to the machine function. - MachineFunction &MF; - + /// Backreference to the machine function. + MachineFunction &MF; + /// Number of bytes of arguments this function has on the stack. If the callee /// is expected to restore the argument stack this should be a multiple of 16, /// all usable during a tail call. @@ -128,39 +128,39 @@ class AArch64FunctionInfo final : public MachineFunctionInfo { /// that must be forwarded to every musttail call. SmallVector<ForwardedRegister, 1> ForwardedMustTailRegParms; - /// FrameIndex for the tagged base pointer. - Optional<int> TaggedBasePointerIndex; + /// FrameIndex for the tagged base pointer. + Optional<int> TaggedBasePointerIndex; + + /// Offset from SP-at-entry to the tagged base pointer. + /// Tagged base pointer is set up to point to the first (lowest address) + /// tagged stack slot. + unsigned TaggedBasePointerOffset; - /// Offset from SP-at-entry to the tagged base pointer. - /// Tagged base pointer is set up to point to the first (lowest address) - /// tagged stack slot. - unsigned TaggedBasePointerOffset; - /// OutliningStyle denotes, if a function was outined, how it was outlined, /// e.g. Tail Call, Thunk, or Function if none apply. Optional<std::string> OutliningStyle; - // Offset from SP-after-callee-saved-spills (i.e. SP-at-entry minus - // CalleeSavedStackSize) to the address of the frame record. - int CalleeSaveBaseToFrameRecordOffset = 0; - - /// SignReturnAddress is true if PAC-RET is enabled for the function with - /// defaults being sign non-leaf functions only, with the B key. - bool SignReturnAddress = false; - - /// SignReturnAddressAll modifies the default PAC-RET mode to signing leaf - /// functions as well. - bool SignReturnAddressAll = false; - - /// SignWithBKey modifies the default PAC-RET mode to signing with the B key. - bool SignWithBKey = false; - - /// BranchTargetEnforcement enables placing BTI instructions at potential - /// indirect branch destinations. - bool BranchTargetEnforcement = false; - + // Offset from SP-after-callee-saved-spills (i.e. SP-at-entry minus + // CalleeSavedStackSize) to the address of the frame record. + int CalleeSaveBaseToFrameRecordOffset = 0; + + /// SignReturnAddress is true if PAC-RET is enabled for the function with + /// defaults being sign non-leaf functions only, with the B key. + bool SignReturnAddress = false; + + /// SignReturnAddressAll modifies the default PAC-RET mode to signing leaf + /// functions as well. + bool SignReturnAddressAll = false; + + /// SignWithBKey modifies the default PAC-RET mode to signing with the B key. + bool SignWithBKey = false; + + /// BranchTargetEnforcement enables placing BTI instructions at potential + /// indirect branch destinations. + bool BranchTargetEnforcement = false; + public: - explicit AArch64FunctionInfo(MachineFunction &MF); + explicit AArch64FunctionInfo(MachineFunction &MF); void initializeBaseYamlFields(const yaml::AArch64FunctionInfo &YamlMFI); @@ -297,14 +297,14 @@ public: void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; } unsigned getJumpTableEntrySize(int Idx) const { - return JumpTableEntryInfo[Idx].first; + return JumpTableEntryInfo[Idx].first; } MCSymbol *getJumpTableEntryPCRelSymbol(int Idx) const { - return JumpTableEntryInfo[Idx].second; + return JumpTableEntryInfo[Idx].second; } void setJumpTableEntryInfo(int Idx, unsigned Size, MCSymbol *PCRelSym) { - if ((unsigned)Idx >= JumpTableEntryInfo.size()) - JumpTableEntryInfo.resize(Idx+1); + if ((unsigned)Idx >= JumpTableEntryInfo.size()) + JumpTableEntryInfo.resize(Idx+1); JumpTableEntryInfo[Idx] = std::make_pair(Size, PCRelSym); } @@ -346,11 +346,11 @@ public: return ForwardedMustTailRegParms; } - Optional<int> getTaggedBasePointerIndex() const { - return TaggedBasePointerIndex; - } - void setTaggedBasePointerIndex(int Index) { TaggedBasePointerIndex = Index; } - + Optional<int> getTaggedBasePointerIndex() const { + return TaggedBasePointerIndex; + } + void setTaggedBasePointerIndex(int Index) { TaggedBasePointerIndex = Index; } + unsigned getTaggedBasePointerOffset() const { return TaggedBasePointerOffset; } @@ -358,26 +358,26 @@ public: TaggedBasePointerOffset = Offset; } - int getCalleeSaveBaseToFrameRecordOffset() const { - return CalleeSaveBaseToFrameRecordOffset; - } - void setCalleeSaveBaseToFrameRecordOffset(int Offset) { - CalleeSaveBaseToFrameRecordOffset = Offset; - } - - bool shouldSignReturnAddress() const; - bool shouldSignReturnAddress(bool SpillsLR) const; - - bool shouldSignWithBKey() const { return SignWithBKey; } - - bool branchTargetEnforcement() const { return BranchTargetEnforcement; } - + int getCalleeSaveBaseToFrameRecordOffset() const { + return CalleeSaveBaseToFrameRecordOffset; + } + void setCalleeSaveBaseToFrameRecordOffset(int Offset) { + CalleeSaveBaseToFrameRecordOffset = Offset; + } + + bool shouldSignReturnAddress() const; + bool shouldSignReturnAddress(bool SpillsLR) const; + + bool shouldSignWithBKey() const { return SignWithBKey; } + + bool branchTargetEnforcement() const { return BranchTargetEnforcement; } + private: // Hold the lists of LOHs. MILOHContainer LOHContainerSet; SetOfInstructions LOHRelated; - SmallVector<std::pair<unsigned, MCSymbol *>, 2> JumpTableEntryInfo; + SmallVector<std::pair<unsigned, MCSymbol *>, 2> JumpTableEntryInfo; }; namespace yaml { |