15 #ifndef LLVM_MC_MCINST_H 16 #define LLVM_MC_MCINST_H 35 enum MachineOperandType :
unsigned char {
43 MachineOperandType Kind = kInvalid;
56 bool isValid()
const {
return Kind != kInvalid; }
57 bool isReg()
const {
return Kind == kRegister; }
58 bool isImm()
const {
return Kind == kImmediate; }
59 bool isFPImm()
const {
return Kind == kFPImmediate; }
60 bool isExpr()
const {
return Kind == kExpr; }
61 bool isInst()
const {
return Kind == kInst; }
65 assert(
isReg() &&
"This is not a register operand!");
71 assert(
isReg() &&
"This is not a register operand!");
124 Op.Kind = kImmediate;
131 Op.Kind = kFPImmediate;
199 return Operands.
insert(I, Op);
226 #endif // LLVM_MC_MCINST_H
This class represents lattice values for constants.
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
static MCOperand createExpr(const MCExpr *Val)
void setInst(const MCInst *Val)
void push_back(const T &Elt)
void print(raw_ostream &OS) const
print alias Alias Set Printer
MCOperand & getOperand(unsigned i)
bool isBareSymbolRef() const
static MCOperand createReg(unsigned Reg)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Base class for the full range of assembler expressions which are needed for parsing.
const_iterator begin() const
void erase(iterator First, iterator Last)
mir Rename Register Operands
void setFPImm(double Val)
unsigned getReg() const
Returns the register number.
const MCInst * getInst() const
const MCExpr * getExpr() const
iterator insert(iterator I, const MCOperand &Op)
Instances of this class represent a single low-level machine instruction.
unsigned getFlags() const
unsigned getNumOperands() const
SmallVectorImpl< MCOperand >::iterator iterator
void print(raw_ostream &OS) const
iterator erase(const_iterator CI)
void setFlags(unsigned F)
void setOpcode(unsigned Op)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
const MCOperand & getOperand(unsigned i) const
static MCOperand createFPImm(double Val)
const_iterator end() const
SmallVectorImpl< MCOperand >::const_iterator const_iterator
iterator insert(iterator I, T &&Elt)
static MCOperand createInst(const MCInst *Val)
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
bool evaluateAsConstantImm(int64_t &Imm) const
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
void setReg(unsigned Reg)
Set the register number.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...
void addOperand(const MCOperand &Op)
StringRef - Represent a constant reference to a string, i.e.
Represents a location in source code.
unsigned getOpcode() const
Instances of this class represent operands of the MCInst class.
static MCOperand createImm(int64_t Val)
void setExpr(const MCExpr *Val)