LLVM 20.0.0git
|
#include "SPIRVISelLowering.h"
#include "SPIRV.h"
#include "SPIRVInstrInfo.h"
#include "SPIRVRegisterBankInfo.h"
#include "SPIRVRegisterInfo.h"
#include "SPIRVSubtarget.h"
#include "SPIRVTargetMachine.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/IR/IntrinsicsSPIRV.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "spirv-lower" |
#define DEBUG_TYPE "spirv-lower" |
Definition at line 24 of file SPIRVISelLowering.cpp.
|
static |
Definition at line 133 of file SPIRVISelLowering.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVType(), and I.
Referenced by validateGroupWaitEventsPtr(), and validatePtrTypes().
|
static |
Definition at line 114 of file SPIRVISelLowering.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addUse(), llvm::SPIRVGlobalRegistry::assignSPIRVTypeToVReg(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineInstrBuilder::constrainAllUses(), llvm::SPIRVSubtarget::getInstrInfo(), llvm::MachineIRBuilder::getMF(), llvm::SPIRVSubtarget::getRegBankInfo(), llvm::SPIRVSubtarget::getRegisterInfo(), llvm::SPIRVGlobalRegistry::getSPIRVTypeID(), I, MRI, llvm::report_fatal_error(), and llvm::LLT::scalar().
Referenced by validateGroupAsyncCopyPtr(), validateGroupWaitEventsPtr(), validateLifetimeStart(), and validatePtrTypes().
|
inline |
Definition at line 107 of file SPIRVISelLowering.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and MRI.
Referenced by validateGroupAsyncCopyPtr(), validateGroupWaitEventsPtr(), validateLifetimeStart(), and validatePtrTypes().
void validateAccessChain | ( | const SPIRVSubtarget & | STI, |
MachineRegisterInfo * | MRI, | ||
SPIRVGlobalRegistry & | GR, | ||
MachineInstr & | I | ||
) |
Definition at line 337 of file SPIRVISelLowering.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), I, MRI, and validatePtrTypes().
Referenced by llvm::SPIRVTargetLowering::finalizeLowering().
void validateForwardCalls | ( | const SPIRVSubtarget & | STI, |
MachineRegisterInfo * | DefMRI, | ||
SPIRVGlobalRegistry & | GR, | ||
MachineInstr & | FunDef | ||
) |
Definition at line 324 of file SPIRVISelLowering.cpp.
References F, llvm::SPIRVGlobalRegistry::getForwardCalls(), llvm::SPIRVGlobalRegistry::getFunctionByDefinition(), and validateFunCallMachineDef().
Referenced by llvm::SPIRVTargetLowering::finalizeLowering().
const Function * validateFunCall | ( | const SPIRVSubtarget & | STI, |
MachineRegisterInfo * | CallMRI, | ||
SPIRVGlobalRegistry & | GR, | ||
MachineInstr & | FunCall | ||
) |
Definition at line 307 of file SPIRVISelLowering.cpp.
References F, llvm::SPIRVGlobalRegistry::getFunctionDefinition(), llvm::MachineOperand::getGlobal(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineFunction::getRegInfo(), and validateFunCallMachineDef().
Referenced by llvm::SPIRVTargetLowering::finalizeLowering().
void validateFunCallMachineDef | ( | const SPIRVSubtarget & | STI, |
MachineRegisterInfo * | DefMRI, | ||
MachineRegisterInfo * | CallMRI, | ||
SPIRVGlobalRegistry & | GR, | ||
MachineInstr & | FunCall, | ||
MachineInstr * | FunDef | ||
) |
Definition at line 271 of file SPIRVISelLowering.cpp.
References llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), llvm::SPIRVGlobalRegistry::getTypeForSPIRVType(), llvm::MachineRegisterInfo::getVRegDef(), llvm::SPIRVGlobalRegistry::setCurrentFunc(), and validatePtrTypes().
Referenced by validateForwardCalls(), and validateFunCall().
|
static |
Definition at line 230 of file SPIRVISelLowering.cpp.
References doInsertBitcast(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(), llvm::MachineOperand::getReg(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), getTypeReg(), I, and MRI.
Referenced by llvm::SPIRVTargetLowering::finalizeLowering().
|
static |
Definition at line 184 of file SPIRVISelLowering.cpp.
References createNewPtrType(), doInsertBitcast(), llvm::TargetExtType::get(), llvm::Function::getContext(), llvm::MachineFunction::getFunction(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), getTypeReg(), I, and MRI.
Referenced by llvm::SPIRVTargetLowering::finalizeLowering().
|
static |
Definition at line 206 of file SPIRVISelLowering.cpp.
References doInsertBitcast(), llvm::Function::getContext(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getImm(), llvm::Type::getInt8Ty(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVType(), llvm::SPIRVGlobalRegistry::getPointeeType(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), getTypeReg(), I, and MRI.
Referenced by llvm::SPIRVTargetLowering::finalizeLowering().
|
static |
Definition at line 150 of file SPIRVISelLowering.cpp.
References createNewPtrType(), doInsertBitcast(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), llvm::SPIRVGlobalRegistry::getTypeForSPIRVType(), getTypeReg(), I, llvm::SPIRVGlobalRegistry::isBitcastCompatible(), MRI, and llvm::report_fatal_error().
Referenced by llvm::SPIRVTargetLowering::finalizeLowering(), validateAccessChain(), and validateFunCallMachineDef().