13#ifndef LLVM_LIB_TARGET_LANAI_LANAIALUCODE_H
14#define LLVM_LIB_TARGET_LANAI_LANAIALUCODE_H
49 unsigned const OP_ENCODING_MASK = 0x07;
50 return AluOp & OP_ENCODING_MASK;
53inline static unsigned getAluOp(
unsigned AluOp) {
54 unsigned const ALU_MASK = 0x3F;
55 return AluOp & ALU_MASK;
63 assert(!
isPostOp(AluOp) &&
"Operator can't be a post- and pre-op");
68 assert(!
isPreOp(AluOp) &&
"Operator can't be a post- and pre-op");
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
StringRef - Represent a constant reference to a string, i.e.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
NodeType
ISD::NodeType enum - This enum defines the target-independent operators for a SelectionDAG.
@ ADD
Simple integer binary arithmetic operators.
@ SHL
Shift and rotation operations.
@ AND
Bitwise operators - logical and, logical or, logical xor.
@ ADDE
Carry-using nodes for multiple precision addition and subtraction.
static bool isPreOp(unsigned AluOp)
static unsigned getAluOp(unsigned AluOp)
static const char * lanaiAluCodeToString(unsigned AluOp)
static unsigned makePostOp(unsigned AluOp)
static unsigned makePreOp(unsigned AluOp)
static unsigned encodeLanaiAluCode(unsigned AluOp)
static AluCode isdToLanaiAluCode(ISD::NodeType Node_type)
static AluCode stringToLanaiAluCode(StringRef S)
static bool isPostOp(unsigned AluOp)
static bool modifiesOp(unsigned AluOp)
This is an optimization pass for GlobalISel generic memory operations.