LLVM  9.0.0svn
Public Member Functions | List of all members
llvm::PerTargetMIParsingState Struct Reference

#include "llvm/CodeGen/MIRParser/MIParser.h"

Public Member Functions

bool parseInstrName (StringRef InstrName, unsigned &OpCode)
 Try to convert an instruction name to an opcode. More...
 
bool getRegisterByName (StringRef RegName, unsigned &Reg)
 Try to convert a register name to a register number. More...
 
const uint32_tgetRegMask (StringRef Identifier)
 Check if the given identifier is a name of a register mask. More...
 
unsigned getSubRegIndex (StringRef Name)
 Check if the given identifier is a name of a subregister index. More...
 
bool getTargetIndex (StringRef Name, int &Index)
 Try to convert a name of target index to the corresponding target index. More...
 
bool getDirectTargetFlag (StringRef Name, unsigned &Flag)
 Try to convert a name of a direct target flag to the corresponding target flag. More...
 
bool getBitmaskTargetFlag (StringRef Name, unsigned &Flag)
 Try to convert a name of a bitmask target flag to the corresponding target flag. More...
 
bool getMMOTargetFlag (StringRef Name, MachineMemOperand::Flags &Flag)
 Try to convert a name of a MachineMemOperand target flag to the corresponding target flag. More...
 
const TargetRegisterClassgetRegClass (StringRef Name)
 Check if the given identifier is a name of a register class. More...
 
const RegisterBankgetRegBank (StringRef Name)
 Check if the given identifier is a name of a register bank. More...
 
 PerTargetMIParsingState (const TargetSubtargetInfo &STI)
 
 ~PerTargetMIParsingState ()=default
 
void setTarget (const TargetSubtargetInfo &NewSubtarget)
 

Detailed Description

Definition at line 50 of file MIParser.h.

Constructor & Destructor Documentation

◆ PerTargetMIParsingState()

llvm::PerTargetMIParsingState::PerTargetMIParsingState ( const TargetSubtargetInfo STI)
inline

Definition at line 148 of file MIParser.h.

◆ ~PerTargetMIParsingState()

llvm::PerTargetMIParsingState::~PerTargetMIParsingState ( )
default

Member Function Documentation

◆ getBitmaskTargetFlag()

bool PerTargetMIParsingState::getBitmaskTargetFlag ( StringRef  Name,
unsigned Flag 
)

Try to convert a name of a bitmask target flag to the corresponding target flag.

Return true if the name isn't a name of a bitmask target flag.

Definition at line 243 of file MIParser.cpp.

References assert(), llvm::StringMapImpl::empty(), llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::find(), llvm::TargetSubtargetInfo::getInstrInfo(), I, llvm::StringMap< ValueTy, AllocatorTy >::insert(), and TII.

Referenced by verifyAddrSpace().

◆ getDirectTargetFlag()

bool PerTargetMIParsingState::getDirectTargetFlag ( StringRef  Name,
unsigned Flag 
)

◆ getMMOTargetFlag()

bool PerTargetMIParsingState::getMMOTargetFlag ( StringRef  Name,
MachineMemOperand::Flags Flag 
)

◆ getRegBank()

const RegisterBank * PerTargetMIParsingState::getRegBank ( StringRef  Name)

Check if the given identifier is a name of a register bank.

Return null if the name isn't a register bank.

Definition at line 311 of file MIParser.cpp.

References llvm::StringMap< ValueTy, AllocatorTy >::end(), and llvm::StringMap< ValueTy, AllocatorTy >::find().

Referenced by isImplicitOperandIn().

◆ getRegClass()

const TargetRegisterClass * PerTargetMIParsingState::getRegClass ( StringRef  Name)

Check if the given identifier is a name of a register class.

Return null if the name isn't a register class.

Definition at line 304 of file MIParser.cpp.

References llvm::StringMap< ValueTy, AllocatorTy >::end(), and llvm::StringMap< ValueTy, AllocatorTy >::find().

Referenced by isImplicitOperandIn().

◆ getRegisterByName()

bool PerTargetMIParsingState::getRegisterByName ( StringRef  RegName,
unsigned Reg 
)

Try to convert a register name to a register number.

Return true if the register name is invalid.

Definition at line 123 of file MIParser.cpp.

References assert(), E, llvm::StringMapImpl::empty(), llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::find(), llvm::TargetSubtargetInfo::getInstrInfo(), I, llvm::StringMap< ValueTy, AllocatorTy >::insert(), and TII.

Referenced by isImplicitOperandIn().

◆ getRegMask()

const uint32_t * PerTargetMIParsingState::getRegMask ( StringRef  Identifier)

◆ getSubRegIndex()

unsigned PerTargetMIParsingState::getSubRegIndex ( StringRef  Name)

Check if the given identifier is a name of a subregister index.

Return 0 if the name isn't a subregister index class.

Definition at line 182 of file MIParser.cpp.

References assert(), llvm::StringMapImpl::empty(), llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::find(), llvm::TargetSubtargetInfo::getInstrInfo(), I, llvm::StringMap< ValueTy, AllocatorTy >::insert(), and TII.

Referenced by isImplicitOperandIn(), and verifyAddrSpace().

◆ getTargetIndex()

bool PerTargetMIParsingState::getTargetIndex ( StringRef  Name,
int &  Index 
)

◆ parseInstrName()

bool PerTargetMIParsingState::parseInstrName ( StringRef  InstrName,
unsigned OpCode 
)

◆ setTarget()

void PerTargetMIParsingState::setTarget ( const TargetSubtargetInfo NewSubtarget)

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