15#ifndef LLVM_MC_MCINST_H
16#define LLVM_MC_MCINST_H
37 enum MachineOperandType :
unsigned char {
46 MachineOperandType Kind = kInvalid;
60 bool isValid()
const {
return Kind != kInvalid; }
61 bool isReg()
const {
return Kind == kRegister; }
62 bool isImm()
const {
return Kind == kImmediate; }
63 bool isSFPImm()
const {
return Kind == kSFPImmediate; }
64 bool isDFPImm()
const {
return Kind == kDFPImmediate; }
65 bool isExpr()
const {
return Kind == kExpr; }
66 bool isInst()
const {
return Kind == kInst; }
70 assert(
isReg() &&
"This is not a register operand!");
76 assert(
isReg() &&
"This is not a register operand!");
143 Op.Kind = kImmediate;
150 Op.Kind = kSFPImmediate;
157 Op.Kind = kDFPImmediate;
dxil pretty DXIL Metadata Pretty Printer
mir Rename Register Operands
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
This file implements the C++20 <bit> header.
This class represents an Operation in the Expression.
Base class for the full range of assembler expressions which are needed for parsing.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
Instances of this class represent a single low-level machine instruction.
void dump_pretty(raw_ostream &OS, const MCInstPrinter *Printer=nullptr, StringRef Separator=" ", const MCRegisterInfo *RegInfo=nullptr) const
Dump the MCInst as prettily as possible using the additional MC structures, if given.
const_iterator end() const
MCOperand & getOperand(unsigned i)
unsigned getNumOperands() const
void print(raw_ostream &OS, const MCRegisterInfo *RegInfo=nullptr) const
SmallVectorImpl< MCOperand >::iterator iterator
unsigned getFlags() const
unsigned getOpcode() const
void erase(iterator First, iterator Last)
const_iterator begin() const
iterator insert(iterator I, const MCOperand &Op)
void setFlags(unsigned F)
void addOperand(const MCOperand Op)
SmallVectorImpl< MCOperand >::const_iterator const_iterator
void setOpcode(unsigned Op)
const MCOperand & getOperand(unsigned i) const
Instances of this class represent operands of the MCInst class.
static MCOperand createReg(unsigned Reg)
static MCOperand createExpr(const MCExpr *Val)
bool isBareSymbolRef() const
static MCOperand createSFPImm(uint32_t Val)
void setReg(unsigned Reg)
Set the register number.
void setExpr(const MCExpr *Val)
static MCOperand createImm(int64_t Val)
unsigned getReg() const
Returns the register number.
void setInst(const MCInst *Val)
void setSFPImm(uint32_t Val)
bool evaluateAsConstantImm(int64_t &Imm) const
const MCInst * getInst() const
void print(raw_ostream &OS, const MCRegisterInfo *RegInfo=nullptr) const
void setDFPImm(uint64_t Val)
const MCExpr * getExpr() const
void setFPImm(double Val)
uint32_t getSFPImm() const
static MCOperand createDFPImm(uint64_t Val)
uint64_t getDFPImm() const
static MCOperand createInst(const MCInst *Val)
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
virtual void print(raw_ostream &OS, const Module *M) const
print - Print out the internal state of the pass.
Represents a location in source code.
typename SuperClass::const_iterator const_iterator
typename SuperClass::iterator iterator
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
@ First
Helpers to iterate all locations in the MemoryEffectsBase class.
DWARFExpression::Operation Op
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)