diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/include/llvm/CodeGen/StackMaps.h | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/CodeGen/StackMaps.h')
-rw-r--r-- | contrib/libs/llvm12/include/llvm/CodeGen/StackMaps.h | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/contrib/libs/llvm12/include/llvm/CodeGen/StackMaps.h b/contrib/libs/llvm12/include/llvm/CodeGen/StackMaps.h index 4f7c32e0a3..4453c25b1f 100644 --- a/contrib/libs/llvm12/include/llvm/CodeGen/StackMaps.h +++ b/contrib/libs/llvm12/include/llvm/CodeGen/StackMaps.h @@ -155,13 +155,13 @@ public: /// <StackMaps::ConstantOp>, <calling convention>, /// <StackMaps::ConstantOp>, <statepoint flags>, /// <StackMaps::ConstantOp>, <num deopt args>, [deopt args...], -/// <StackMaps::ConstantOp>, <num gc pointer args>, [gc pointer args...], -/// <StackMaps::ConstantOp>, <num gc allocas>, [gc allocas args...], -/// <StackMaps::ConstantOp>, <num entries in gc map>, [base/derived pairs] -/// base/derived pairs in gc map are logical indices into <gc pointer args> -/// section. -/// All gc pointers assigned to VRegs produce new value (in form of MI Def -/// operand) and are tied to it. +/// <StackMaps::ConstantOp>, <num gc pointer args>, [gc pointer args...], +/// <StackMaps::ConstantOp>, <num gc allocas>, [gc allocas args...], +/// <StackMaps::ConstantOp>, <num entries in gc map>, [base/derived pairs] +/// base/derived pairs in gc map are logical indices into <gc pointer args> +/// section. +/// All gc pointers assigned to VRegs produce new value (in form of MI Def +/// operand) and are tied to it. class StatepointOpers { // TODO:: we should change the STATEPOINT representation so that CC and // Flags should be part of meta operands, with args and deopt operands, and @@ -177,23 +177,23 @@ class StatepointOpers { enum { CCOffset = 1, FlagsOffset = 3, NumDeoptOperandsOffset = 5 }; public: - explicit StatepointOpers(const MachineInstr *MI) : MI(MI) { - NumDefs = MI->getNumDefs(); - } + explicit StatepointOpers(const MachineInstr *MI) : MI(MI) { + NumDefs = MI->getNumDefs(); + } /// Get index of statepoint ID operand. - unsigned getIDPos() const { return NumDefs + IDPos; } + unsigned getIDPos() const { return NumDefs + IDPos; } /// Get index of Num Patch Bytes operand. - unsigned getNBytesPos() const { return NumDefs + NBytesPos; } + unsigned getNBytesPos() const { return NumDefs + NBytesPos; } /// Get index of Num Call Arguments operand. - unsigned getNCallArgsPos() const { return NumDefs + NCallArgsPos; } + unsigned getNCallArgsPos() const { return NumDefs + NCallArgsPos; } /// Get starting index of non call related arguments /// (calling convention, statepoint flags, vm state and gc state). unsigned getVarIdx() const { - return MI->getOperand(NumDefs + NCallArgsPos).getImm() + MetaEnd + NumDefs; + return MI->getOperand(NumDefs + NCallArgsPos).getImm() + MetaEnd + NumDefs; } /// Get index of Calling Convention operand. @@ -208,16 +208,16 @@ public: } /// Return the ID for the given statepoint. - uint64_t getID() const { return MI->getOperand(NumDefs + IDPos).getImm(); } + uint64_t getID() const { return MI->getOperand(NumDefs + IDPos).getImm(); } /// Return the number of patchable bytes the given statepoint should emit. uint32_t getNumPatchBytes() const { - return MI->getOperand(NumDefs + NBytesPos).getImm(); + return MI->getOperand(NumDefs + NBytesPos).getImm(); } /// Return the target of the underlying call. const MachineOperand &getCallTarget() const { - return MI->getOperand(NumDefs + CallTargetPos); + return MI->getOperand(NumDefs + CallTargetPos); } /// Return the calling convention. @@ -228,31 +228,31 @@ public: /// Return the statepoint flags. uint64_t getFlags() const { return MI->getOperand(getFlagsIdx()).getImm(); } - uint64_t getNumDeoptArgs() const { - return MI->getOperand(getNumDeoptArgsIdx()).getImm(); - } - - /// Get index of number of gc map entries. - unsigned getNumGcMapEntriesIdx(); - - /// Get index of number of gc allocas. - unsigned getNumAllocaIdx(); - - /// Get index of number of GC pointers. - unsigned getNumGCPtrIdx(); - - /// Get index of first GC pointer operand of -1 if there are none. - int getFirstGCPtrIdx(); - - /// Get vector of base/derived pairs from statepoint. - /// Elements are indices into GC Pointer operand list (logical). - /// Returns number of elements in GCMap. - unsigned - getGCPointerMap(SmallVectorImpl<std::pair<unsigned, unsigned>> &GCMap); - + uint64_t getNumDeoptArgs() const { + return MI->getOperand(getNumDeoptArgsIdx()).getImm(); + } + + /// Get index of number of gc map entries. + unsigned getNumGcMapEntriesIdx(); + + /// Get index of number of gc allocas. + unsigned getNumAllocaIdx(); + + /// Get index of number of GC pointers. + unsigned getNumGCPtrIdx(); + + /// Get index of first GC pointer operand of -1 if there are none. + int getFirstGCPtrIdx(); + + /// Get vector of base/derived pairs from statepoint. + /// Elements are indices into GC Pointer operand list (logical). + /// Returns number of elements in GCMap. + unsigned + getGCPointerMap(SmallVectorImpl<std::pair<unsigned, unsigned>> &GCMap); + private: const MachineInstr *MI; - unsigned NumDefs; + unsigned NumDefs; }; class StackMaps { @@ -294,10 +294,10 @@ public: StackMaps(AsmPrinter &AP); - /// Get index of next meta operand. - /// Similar to parseOperand, but does not actually parses operand meaning. - static unsigned getNextMetaArgIdx(const MachineInstr *MI, unsigned CurIdx); - + /// Get index of next meta operand. + /// Similar to parseOperand, but does not actually parses operand meaning. + static unsigned getNextMetaArgIdx(const MachineInstr *MI, unsigned CurIdx); + void reset() { CSInfos.clear(); ConstPool.clear(); @@ -370,13 +370,13 @@ private: MachineInstr::const_mop_iterator MOE, LocationVec &Locs, LiveOutVec &LiveOuts) const; - /// Specialized parser of statepoint operands. - /// They do not directly correspond to StackMap record entries. - void parseStatepointOpers(const MachineInstr &MI, - MachineInstr::const_mop_iterator MOI, - MachineInstr::const_mop_iterator MOE, - LocationVec &Locations, LiveOutVec &LiveOuts); - + /// Specialized parser of statepoint operands. + /// They do not directly correspond to StackMap record entries. + void parseStatepointOpers(const MachineInstr &MI, + MachineInstr::const_mop_iterator MOI, + MachineInstr::const_mop_iterator MOE, + LocationVec &Locations, LiveOutVec &LiveOuts); + /// Create a live-out register record for the given register @p Reg. LiveOutReg createLiveOutReg(unsigned Reg, const TargetRegisterInfo *TRI) const; |