LLVM 23.0.0git
llvm::AMDGPUMIRFormatter Class Referencefinal

#include "Target/AMDGPU/AMDGPUMIRFormatter.h"

Inheritance diagram for llvm::AMDGPUMIRFormatter:
[legend]

Public Member Functions

 AMDGPUMIRFormatter (const MCSubtargetInfo &STI)
 ~AMDGPUMIRFormatter () override=default
void printImm (raw_ostream &OS, const MachineInstr &MI, std::optional< unsigned > OpIdx, int64_t Imm) const override
 Implement target specific printing for machine operand immediate value, so that we can have more meaningful mnemonic than a 64-bit integer.
bool parseImmMnemonic (const unsigned OpCode, const unsigned OpIdx, StringRef Src, int64_t &Imm, ErrorCallbackType ErrorCallback) const override
 Implement target specific parsing of immediate mnemonics.
bool parseCustomPseudoSourceValue (StringRef Src, MachineFunction &MF, PerFunctionMIParsingState &PFS, const PseudoSourceValue *&PSV, ErrorCallbackType ErrorCallback) const override
 Implement target specific parsing of target custom pseudo source value.
Public Member Functions inherited from llvm::MIRFormatter
 MIRFormatter ()=default
virtual ~MIRFormatter ()=default
virtual void printCustomPseudoSourceValue (raw_ostream &OS, ModuleSlotTracker &MST, const PseudoSourceValue &PSV) const
 Implement target specific printing of target custom pseudo source value.

Additional Inherited Members

Public Types inherited from llvm::MIRFormatter
typedef function_ref< bool(StringRef::iterator Loc, const Twine &)> ErrorCallbackType
Static Public Member Functions inherited from llvm::MIRFormatter
static LLVM_ABI void printIRValue (raw_ostream &OS, const Value &V, ModuleSlotTracker &MST)
 Helper functions to print IR value as MIR serialization format which will be useful for target specific printer, e.g.
static LLVM_ABI bool parseIRValue (StringRef Src, MachineFunction &MF, PerFunctionMIParsingState &PFS, const Value *&V, ErrorCallbackType ErrorCallback)
 Helper functions to parse IR value from MIR serialization format which will be useful for target specific parser, e.g.

Detailed Description

Definition at line 27 of file AMDGPUMIRFormatter.h.

Constructor & Destructor Documentation

◆ AMDGPUMIRFormatter()

llvm::AMDGPUMIRFormatter::AMDGPUMIRFormatter ( const MCSubtargetInfo & STI)
inlineexplicit

Definition at line 29 of file AMDGPUMIRFormatter.h.

◆ ~AMDGPUMIRFormatter()

llvm::AMDGPUMIRFormatter::~AMDGPUMIRFormatter ( )
overridedefault

References MI, and OpIdx.

Member Function Documentation

◆ parseCustomPseudoSourceValue()

bool AMDGPUMIRFormatter::parseCustomPseudoSourceValue ( StringRef Src,
MachineFunction & MF,
PerFunctionMIParsingState & PFS,
const PseudoSourceValue *& PSV,
ErrorCallbackType ErrorCallback ) const
overridevirtual

Implement target specific parsing of target custom pseudo source value.

Reimplemented from llvm::MIRFormatter.

Definition at line 303 of file AMDGPUMIRFormatter.cpp.

References llvm::SIMachineFunctionInfo::getGWSPSV(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getTarget(), and llvm_unreachable.

◆ parseImmMnemonic()

bool AMDGPUMIRFormatter::parseImmMnemonic ( const unsigned OpCode,
const unsigned OpIdx,
StringRef Src,
int64_t & Imm,
ErrorCallbackType ErrorCallback ) const
overridevirtual

Implement target specific parsing of immediate mnemonics.

The mnemonic is a string with a leading dot.

Reimplemented from llvm::MIRFormatter.

Definition at line 83 of file AMDGPUMIRFormatter.cpp.

References OpIdx.

◆ printImm()

void AMDGPUMIRFormatter::printImm ( raw_ostream & OS,
const MachineInstr & MI,
std::optional< unsigned > OpIdx,
int64_t Imm ) const
overridevirtual

Implement target specific printing for machine operand immediate value, so that we can have more meaningful mnemonic than a 64-bit integer.

Passing None to OpIdx means the index is unknown.

Reimplemented from llvm::MIRFormatter.

Definition at line 64 of file AMDGPUMIRFormatter.cpp.

References assert(), MI, OpIdx, and llvm::MIRFormatter::printImm().


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