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 127 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 110 of file SPIRVISelLowering.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addUse(), llvm::MachineIRBuilder::buildInstr(), llvm::MachineInstrBuilder::constrainAllUses(), llvm::createVirtualRegister(), llvm::SPIRVSubtarget::getInstrInfo(), llvm::MachineIRBuilder::getMF(), llvm::SPIRVSubtarget::getRegBankInfo(), llvm::SPIRVSubtarget::getRegisterInfo(), llvm::SPIRVGlobalRegistry::getSPIRVTypeID(), I, MRI, and llvm::report_fatal_error().
Referenced by validateGroupWaitEventsPtr(), validateLifetimeStart(), validatePtrTypes(), and validatePtrUnwrapStructField().
|
inline |
Definition at line 103 of file SPIRVISelLowering.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and MRI.
Referenced by validateGroupWaitEventsPtr(), validateLifetimeStart(), validatePtrTypes(), and validatePtrUnwrapStructField().
void validateAccessChain | ( | const SPIRVSubtarget & | STI, |
MachineRegisterInfo * | MRI, | ||
SPIRVGlobalRegistry & | GR, | ||
MachineInstr & | I | ||
) |
Definition at line 331 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 318 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 301 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 265 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 178 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 200 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 144 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().
|
static |
Definition at line 224 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().