36PISAMCInstLower::getGlobalAddressSymbol(
const MachineOperand &MO)
const {
43 for (
unsigned OpNo = 0, E =
MI->getNumOperands(); OpNo != E; ++OpNo) {
68 unsigned int FrameIndex = MO.
getIndex();
74 MCOp = lowerSymbolOperand(MO, getGlobalAddressSymbol(MO));
83 unsigned EncodedVal = CurReg;
86 MI->getParent()->getParent()->getRegInfo();
88 unsigned NumElts = TRI.getNumEltsFromRegClass(RC);
89 unsigned EltSize = TRI.getBitSizeFromRegClass(RC);
91 EncodedVal = RegMgr.encodeVirtualRegister(Bank, CurReg);
95 bool IsMov =
MI->isMoveImmediate() ||
MI->isMoveReg();
97 if (IsMov && !SubReg && CurReg.
isVirtual()) {
100 MI->getParent()->getParent()->getRegInfo();
102 unsigned NumElts = TRI.getNumEltsFromRegClass(RC);
105 else if (NumElts == 4)
108 assert((NumElts == 1) &&
"unknown swizzle value");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
This file declares PISA-specific MC expressions for floating-point immediates.
This file declares lowering from PISA MachineInstrs to MCInsts.
This file declares management of PISA virtual registers.
This file declares the PISA subtarget.
This file declares utility functions for the PISA backend.
This file declares the top-level interfaces for the PISA target.
MachineRegisterInfo & MRI
APInt bitcastToAPInt() const
uint64_t getZExtValue() const
Get zero extended value.
const APFloat & getValueAPF() const
Instances of this class represent a single low-level machine instruction.
void addOperand(const MCOperand Op)
void setOpcode(unsigned Op)
Instances of this class represent operands of the MCInst class.
static MCOperand createExpr(const MCExpr *Val)
static MCOperand createSFPImm(uint32_t Val)
static MCOperand createReg(MCRegister Reg)
static MCOperand createImm(int64_t Val)
static MCOperand createDFPImm(uint64_t Val)
static MCOperand createHFPImm(uint16_t Val)
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
LLVM_ABI MCSymbol * getSymbol() const
Return the MCSymbol for this basic block.
Representation of each machine instruction.
MachineOperand class - Representation of each machine instruction operand.
unsigned getSubReg() const
const GlobalValue * getGlobal() const
MachineBasicBlock * getMBB() const
bool isGlobal() const
isGlobal - Tests if this is a MO_GlobalAddress operand.
MachineOperandType getType() const
getType - Returns the MachineOperandType for this operand.
const char * getSymbolName() const
Register getReg() const
getReg - Returns the register number.
const ConstantFP * getFPImm() const
@ MO_Immediate
Immediate operand.
@ MO_GlobalAddress
Address of a global value.
@ MO_MachineBasicBlock
MachineBasicBlock reference.
@ MO_FrameIndex
Abstract Stack Frame Index.
@ MO_Register
Register operand.
@ MO_ExternalSymbol
Name of external global symbol.
@ MO_Metadata
Metadata reference (for debug info)
@ MO_FPImmediate
Floating-point immediate operand.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
static const PISAGlobalAddressMCExpr * create(const MCSymbol &Symbol, MCContext &Ctx)
static void setSwizzle(MCInst &MI, unsigned OpNo, PISA::Swizzle Swizzle)
void lower(const MachineInstr *MI, MCInst &OutMI) const
static void setVariableRef(MCInst &MI, unsigned OpNo)
Wrapper class representing virtual and physical registers.
constexpr bool isVirtual() const
Return true if the specified register number is in the virtual register namespace.
bool isFloatTy() const
Return true if this is 'float', a 32-bit IEEE fp type.
bool isBFloatTy() const
Return true if this is 'bfloat', a 16-bit bfloat type.
bool isHalfTy() const
Return true if this is 'half', a 16-bit IEEE fp type.
bool isDoubleTy() const
Return true if this is 'double', a 64-bit IEEE fp type.
Type * getType() const
All values are typed, get the type of this value.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
MCRegisterClass TargetRegisterClass