9 #ifndef LLVM_CODEGEN_STACKMAPS_H 10 #define LLVM_CODEGEN_STACKMAPS_H 29 class TargetRegisterInfo;
85 unsigned getMetaIdx(
unsigned Pos = 0)
const {
86 assert(Pos < MetaEnd &&
"Meta operand index out of range.");
87 return (HasDef ? 1 : 0) + Pos;
98 bool hasDef()
const {
return HasDef; }
101 uint64_t
getID()
const {
return getMetaOper(
IDPos).getImm(); }
110 return getMetaOper(TargetPos);
115 return getMetaOper(CCPos).getImm();
118 unsigned getArgIdx()
const {
return getMetaIdx() + MetaEnd; }
128 return getMetaIdx() + MetaEnd + getNumCallArgs();
140 unsigned getNextScratchIdx(
unsigned StartIdx = 0)
const;
166 enum { CCOffset = 1, FlagsOffset = 3, NumDeoptOperandsOffset = 5 };
173 return MI->getOperand(NCallArgsPos).getImm() + MetaEnd;
186 return MI->getOperand(CallTargetPos);
211 : Type(Type), Size(Size), Reg(Reg), Offset(Offset) {}
216 unsigned short DwarfRegNum = 0;
222 : Reg(Reg), DwarfRegNum(DwarfRegNum), Size(Size) {}
228 using OpType =
enum { DirectMemRefOp, IndirectMemRefOp, ConstantOp };
243 uint64_t StackSize = 0;
244 uint64_t RecordCount = 1;
259 : CSOffsetExpr(CSOffsetExpr), ID(ID), Locations(
std::move(Locations)),
260 LiveOuts(
std::move(LiveOuts)) {}
269 void recordStackMap(
const MCSymbol &L,
273 void recordPatchPoint(
const MCSymbol &L,
277 void recordStatepoint(
const MCSymbol &L,
283 void serializeToStackMapSection();
292 static const char *WSMP;
319 void recordStackMapOpers(
const MCSymbol &L,
323 bool recordResult =
false);
329 void emitFunctionFrameRecords(
MCStreamer &OS);
343 #endif // LLVM_CODEGEN_STACKMAPS_H
This class represents lattice values for constants.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
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