10 #ifndef LLVM_CODEGEN_STACKMAPS_H 11 #define LLVM_CODEGEN_STACKMAPS_H 30 class TargetRegisterInfo;
86 unsigned getMetaIdx(
unsigned Pos = 0)
const {
87 assert(Pos < MetaEnd &&
"Meta operand index out of range.");
88 return (HasDef ? 1 : 0) + Pos;
99 bool hasDef()
const {
return HasDef; }
102 uint64_t
getID()
const {
return getMetaOper(
IDPos).getImm(); }
111 return getMetaOper(TargetPos);
116 return getMetaOper(CCPos).getImm();
119 unsigned getArgIdx()
const {
return getMetaIdx() + MetaEnd; }
129 return getMetaIdx() + MetaEnd + getNumCallArgs();
141 unsigned getNextScratchIdx(
unsigned StartIdx = 0)
const;
167 enum { CCOffset = 1, FlagsOffset = 3, NumDeoptOperandsOffset = 5 };
174 return MI->getOperand(NCallArgsPos).getImm() + MetaEnd;
187 return MI->getOperand(CallTargetPos);
212 : Type(Type), Size(Size), Reg(Reg), Offset(Offset) {}
217 unsigned short DwarfRegNum = 0;
223 : Reg(Reg), DwarfRegNum(DwarfRegNum), Size(Size) {}
229 using OpType =
enum { DirectMemRefOp, IndirectMemRefOp, ConstantOp };
244 uint64_t StackSize = 0;
245 uint64_t RecordCount = 1;
260 : CSOffsetExpr(CSOffsetExpr), ID(ID), Locations(
std::move(Locations)),
261 LiveOuts(
std::move(LiveOuts)) {}
281 void serializeToStackMapSection();
290 static const char *WSMP;
318 bool recordResult =
false);
324 void emitFunctionFrameRecords(
MCStreamer &OS);
338 #endif // LLVM_CODEGEN_STACKMAPS_H
This class represents lattice values for constants.
StatepointOpers(const MachineInstr *MI)
unsigned const TargetRegisterInfo * TRI
Location(LocationType Type, unsigned Size, unsigned Reg, int64_t Offset)
unsigned getVarIdx() const
Get starting index of non call related arguments (calling convention, statepoint flags, vm state and gc state).
Base class for the full range of assembler expressions which are needed for parsing.
unsigned getStackMapStartIdx() const
Get the index at which stack map locations will be recorded.
CallsiteInfoList & getCSInfos()
Get call site info.
uint64_t getID() const
Return the ID for the given stackmap.
CallsiteInfo(const MCExpr *CSOffsetExpr, uint64_t ID, LocationVec &&Locations, LiveOutVec &&LiveOuts)
Streaming machine code generation interface.
const MachineOperand & getCallTarget() const
Returns the target of the underlying call.
The instances of the Type class are immutable: once they are created, they are never changed...
FnInfoMap & getFnInfos()
Get function info.
LiveOutReg(unsigned short Reg, unsigned short DwarfRegNum, unsigned short Size)
This class is intended to be used as a driving class for all asm writers.
unsigned getVarIdx() const
Get the operand index of the variable list of non-argument operands.
static void print(raw_ostream &Out, object::Archive::Kind Kind, T Val)
MI-level patchpoint operands.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
uint32_t getNumPatchBytes() const
Return the number of patchable bytes the given stackmap should emit.
StackMapOpers(const MachineInstr *MI)
MachineOperand class - Representation of each machine instruction operand.
unsigned getVarIdx() const
Get the operand index of the variable list of non-argument operands.
enum { DirectMemRefOp, IndirectMemRefOp, ConstantOp } OpType
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
FunctionInfo(uint64_t StackSize)
Representation of each machine instruction.
MI-level stackmap operands.
uint32_t getNumCallArgs() const
Return the number of call arguments.
MI-level Statepoint operands.
unsigned getArgIdx() const
uint32_t getNumPatchBytes() const
Return the number of patchable bytes the given patchpoint should emit.
uint64_t getID() const
Return the ID for the given patchpoint.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
uint32_t getNumPatchBytes() const
Return the number of patchable bytes the given statepoint should emit.
uint64_t getID() const
Return the ID for the given statepoint.
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
This class implements an extremely fast bulk output stream that can only output to a stream...
const MachineOperand & getCallTarget() const
Returns the target of the underlying call.
CallingConv::ID getCallingConv() const
Returns the calling convention.
const MachineOperand & getOperand(unsigned i) const
std::vector< CallsiteInfo > CallsiteInfoList