LLVM 22.0.0git
llvm::MCInstrInfo Class Reference

Interface to description of machine instruction set. More...

#include "llvm/MC/MCInstrInfo.h"

Inheritance diagram for llvm::MCInstrInfo:
[legend]

Public Types

using ComplexDeprecationPredicate

Public Member Functions

void InitMCInstrInfo (const MCInstrDesc *D, const unsigned *NI, const char *ND, const uint8_t *DF, const ComplexDeprecationPredicate *CDI, unsigned NO, const int16_t *RCHWTables=nullptr, int16_t NumRegClassByHwMode=0)
 Initialize MCInstrInfo, called by TableGen auto-generated routines.
unsigned getNumOpcodes () const
const int16_t * getRegClassByHwModeTable (unsigned ModeId) const
int16_t getOpRegClassID (const MCOperandInfo &OpInfo, unsigned HwModeId) const
 Return the ID of the register class to use for OpInfo, for the active HwMode HwModeId.
const MCInstrDescget (unsigned Opcode) const
 Return the machine instruction descriptor that corresponds to the specified instruction opcode.
StringRef getName (unsigned Opcode) const
 Returns the name for the instructions with the given opcode.
LLVM_ABI bool getDeprecatedInfo (MCInst &MI, const MCSubtargetInfo &STI, std::string &Info) const
 Returns true if a certain instruction is deprecated and if so returns the reason in Info.

Protected Attributes

const int16_t * RegClassByHwModeTables
int16_t NumRegClassByHwModes

Detailed Description

Interface to description of machine instruction set.

Definition at line 27 of file MCInstrInfo.h.

Member Typedef Documentation

◆ ComplexDeprecationPredicate

Initial value:
bool (*)(MCInst &,
const MCSubtargetInfo &,
std::string &)
Instances of this class represent a single low-level machine instruction.
Definition MCInst.h:188
Generic base class for all target subtargets.

Definition at line 29 of file MCInstrInfo.h.

Member Function Documentation

◆ get()

◆ getDeprecatedInfo()

bool MCInstrInfo::getDeprecatedInfo ( MCInst & MI,
const MCSubtargetInfo & STI,
std::string & Info ) const

Returns true if a certain instruction is deprecated and if so returns the reason in Info.

Definition at line 15 of file MCInstrInfo.cpp.

References llvm::MCSubtargetInfo::getFeatureBits(), and MI.

◆ getName()

StringRef llvm::MCInstrInfo::getName ( unsigned Opcode) const
inline

Returns the name for the instructions with the given opcode.

Definition at line 97 of file MCInstrInfo.h.

References assert().

Referenced by createAtomicLibcall(), llvm::createMemLibcall(), llvm::fuseInstructionPair(), getInstructionID(), llvm::HexagonMCInstrInfo::getName(), and llvm::LegalizerInfo::verify().

◆ getNumOpcodes()

unsigned llvm::MCInstrInfo::getNumOpcodes ( ) const
inline

Definition at line 69 of file MCInstrInfo.h.

◆ getOpRegClassID()

int16_t llvm::MCInstrInfo::getOpRegClassID ( const MCOperandInfo & OpInfo,
unsigned HwModeId ) const
inline

Return the ID of the register class to use for OpInfo, for the active HwMode HwModeId.

In general TargetInstrInfo's version which is already specialized to the subtarget should be used.

Definition at line 80 of file MCInstrInfo.h.

References getRegClassByHwModeTable().

◆ getRegClassByHwModeTable()

const int16_t * llvm::MCInstrInfo::getRegClassByHwModeTable ( unsigned ModeId) const
inline

Definition at line 71 of file MCInstrInfo.h.

References assert(), NumRegClassByHwModes, and RegClassByHwModeTables.

Referenced by getOpRegClassID().

◆ InitMCInstrInfo()

void llvm::MCInstrInfo::InitMCInstrInfo ( const MCInstrDesc * D,
const unsigned * NI,
const char * ND,
const uint8_t * DF,
const ComplexDeprecationPredicate * CDI,
unsigned NO,
const int16_t * RCHWTables = nullptr,
int16_t NumRegClassByHwMode = 0 )
inline

Initialize MCInstrInfo, called by TableGen auto-generated routines.

DO NOT USE.

Definition at line 54 of file MCInstrInfo.h.

References D(), DF, NumRegClassByHwModes, and RegClassByHwModeTables.

Member Data Documentation

◆ NumRegClassByHwModes

int16_t llvm::MCInstrInfo::NumRegClassByHwModes
protected

Definition at line 49 of file MCInstrInfo.h.

Referenced by getRegClassByHwModeTable(), and InitMCInstrInfo().

◆ RegClassByHwModeTables

const int16_t* llvm::MCInstrInfo::RegClassByHwModeTables
protected

Definition at line 48 of file MCInstrInfo.h.

Referenced by getRegClassByHwModeTable(), and InitMCInstrInfo().


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