LLVM 22.0.0git
llvm::MCOperandInfo Class Reference

This holds information about one operand of a machine instruction, indicating the register class for register operands, etc. More...

#include "llvm/MC/MCInstrDesc.h"

Public Member Functions

bool isLookupRegClassByHwMode () const
 Set if this operand is a value that requires the current hwmode to look up its register class.
bool isPredicate () const
 Set if this is one of the operands that made up of the predicate operand that controls an isPredicable() instruction.
bool isOptionalDef () const
 Set if this operand is a optional def.
bool isBranchTarget () const
 Set if this operand is a branch target.
bool isGenericType () const
unsigned getGenericTypeIndex () const
bool isGenericImm () const
unsigned getGenericImmIndex () const

Public Attributes

int16_t RegClass
 This specifies the register class enumeration of the operand if the operand is a register.
uint8_t Flags
 These are flags from the MCOI::OperandFlags enum.
uint8_t OperandType
 Information about the type of the operand.
uint16_t Constraints
 Operand constraints (see OperandConstraint enum).

Detailed Description

This holds information about one operand of a machine instruction, indicating the register class for register operands, etc.

Definition at line 86 of file MCInstrDesc.h.

Member Function Documentation

◆ getGenericImmIndex()

unsigned llvm::MCOperandInfo::getGenericImmIndex ( ) const
inline

◆ getGenericTypeIndex()

unsigned llvm::MCOperandInfo::getGenericTypeIndex ( ) const
inline

◆ isBranchTarget()

bool llvm::MCOperandInfo::isBranchTarget ( ) const
inline

Set if this operand is a branch target.

Definition at line 117 of file MCInstrDesc.h.

References llvm::MCOI::BranchTarget, and Flags.

◆ isGenericImm()

bool llvm::MCOperandInfo::isGenericImm ( ) const
inline

◆ isGenericType()

bool llvm::MCOperandInfo::isGenericType ( ) const
inline

◆ isLookupRegClassByHwMode()

bool llvm::MCOperandInfo::isLookupRegClassByHwMode ( ) const
inline

Set if this operand is a value that requires the current hwmode to look up its register class.

Definition at line 105 of file MCInstrDesc.h.

References Flags, and llvm::MCOI::LookupRegClassByHwMode.

◆ isOptionalDef()

bool llvm::MCOperandInfo::isOptionalDef ( ) const
inline

Set if this operand is a optional def.

Definition at line 114 of file MCInstrDesc.h.

References Flags, and llvm::MCOI::OptionalDef.

◆ isPredicate()

bool llvm::MCOperandInfo::isPredicate ( ) const
inline

Set if this is one of the operands that made up of the predicate operand that controls an isPredicable() instruction.

Definition at line 111 of file MCInstrDesc.h.

References Flags, and llvm::MCOI::Predicate.

Member Data Documentation

◆ Constraints

uint16_t llvm::MCOperandInfo::Constraints

Operand constraints (see OperandConstraint enum).

Definition at line 101 of file MCInstrDesc.h.

◆ Flags

uint8_t llvm::MCOperandInfo::Flags

These are flags from the MCOI::OperandFlags enum.

Definition at line 95 of file MCInstrDesc.h.

Referenced by isBranchTarget(), isLookupRegClassByHwMode(), isOptionalDef(), and isPredicate().

◆ OperandType

◆ RegClass

int16_t llvm::MCOperandInfo::RegClass

This specifies the register class enumeration of the operand if the operand is a register.

If LookupRegClassByHwMode is set, then this is an index into a table in TargetInstrInfo or MCInstrInfo which contains the real register class ID.

Definition at line 92 of file MCInstrDesc.h.

Referenced by llvm::SIInstrInfo::isLegalToSwap().


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