LLVM 19.0.0git
Public Types | Public Member Functions | List of all members
llvm::PatchPointOpers Class Reference

MI-level patchpoint operands. More...

#include "llvm/CodeGen/StackMaps.h"

Public Types

enum  {
  IDPos , NBytesPos , TargetPos , NArgPos ,
  CCPos , MetaEnd
 Enumerate the meta operands. More...

Public Member Functions

 PatchPointOpers (const MachineInstr *MI)
bool isAnyReg () const
bool hasDef () const
uint64_t getID () const
 Return the ID for the given patchpoint.
uint32_t getNumPatchBytes () const
 Return the number of patchable bytes the given patchpoint should emit.
const MachineOperandgetCallTarget () const
 Returns the target of the underlying call.
CallingConv::ID getCallingConv () const
 Returns the calling convention.
unsigned getArgIdx () const
uint32_t getNumCallArgs () const
 Return the number of call arguments.
unsigned getVarIdx () const
 Get the operand index of the variable list of non-argument operands.
unsigned getStackMapStartIdx () const
 Get the index at which stack map locations will be recorded.
unsigned getNextScratchIdx (unsigned StartIdx=0) const
 Get the next scratch register operand index.

Detailed Description

MI-level patchpoint operands.

MI patchpoint operations take the form: [<def>], <id>, <numBytes>, <target>, <numArgs>, <cc>, ...

IR patchpoint intrinsics do not have the <cc> operand because calling convention is part of the subclass data.

SD patchpoint nodes do not have a def operand because it is part of the SDValue.

Patchpoints following the anyregcc convention are handled specially. For these, the stack map also records the location of the return value and arguments.

Definition at line 76 of file StackMaps.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Enumerate the meta operands.


Definition at line 79 of file StackMaps.h.

Constructor & Destructor Documentation

◆ PatchPointOpers()

PatchPointOpers::PatchPointOpers ( const MachineInstr MI)

Definition at line 62 of file StackMaps.cpp.

References assert(), isReg(), and MI.

Member Function Documentation

◆ getArgIdx()

unsigned llvm::PatchPointOpers::getArgIdx ( ) const

Definition at line 118 of file StackMaps.h.

References MetaEnd.

Referenced by getStackMapStartIdx().

◆ getCallingConv()

CallingConv::ID llvm::PatchPointOpers::getCallingConv ( ) const

Returns the calling convention.

Definition at line 114 of file StackMaps.h.

References CCPos, and llvm::MachineOperand::getImm().

Referenced by isAnyReg().

◆ getCallTarget()

const MachineOperand & llvm::PatchPointOpers::getCallTarget ( ) const

Returns the target of the underlying call.

Definition at line 109 of file StackMaps.h.

References TargetPos.

◆ getID()

uint64_t llvm::PatchPointOpers::getID ( ) const

Return the ID for the given patchpoint.

Definition at line 101 of file StackMaps.h.

References llvm::MachineOperand::getImm(), and IDPos.

Referenced by llvm::StackMaps::recordPatchPoint().

◆ getNextScratchIdx()

unsigned PatchPointOpers::getNextScratchIdx ( unsigned  StartIdx = 0) const

◆ getNumCallArgs()

uint32_t llvm::PatchPointOpers::getNumCallArgs ( ) const

Return the number of call arguments.

Definition at line 121 of file StackMaps.h.

References MI, and NArgPos.

Referenced by getVarIdx(), and llvm::StackMaps::recordPatchPoint().

◆ getNumPatchBytes()

uint32_t llvm::PatchPointOpers::getNumPatchBytes ( ) const

◆ getStackMapStartIdx()

unsigned llvm::PatchPointOpers::getStackMapStartIdx ( ) const

Get the index at which stack map locations will be recorded.

Arguments are not recorded unless the anyregcc convention is used.

Definition at line 133 of file StackMaps.h.

References getArgIdx(), getVarIdx(), and isAnyReg().

Referenced by llvm::StackMaps::recordPatchPoint().

◆ getVarIdx()

unsigned llvm::PatchPointOpers::getVarIdx ( ) const

Get the operand index of the variable list of non-argument operands.

These hold the "live state".

Definition at line 127 of file StackMaps.h.

References getNumCallArgs(), and MetaEnd.

Referenced by getNextScratchIdx(), and getStackMapStartIdx().

◆ hasDef()

bool llvm::PatchPointOpers::hasDef ( ) const

Definition at line 98 of file StackMaps.h.

Referenced by llvm::StackMaps::recordPatchPoint().

◆ isAnyReg()

bool llvm::PatchPointOpers::isAnyReg ( ) const

The documentation for this class was generated from the following files: