LLVM 19.0.0git
|
#include "SPIRV.h"
#include "SPIRVSubtarget.h"
#include "SPIRVUtils.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/IntrinsicsSPIRV.h"
#include "llvm/Target/TargetIntrinsicInfo.h"
Go to the source code of this file.
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. | |
Macros | |
#define | DEBUG_TYPE "spirv-prelegalizer" |
#define DEBUG_TYPE "spirv-prelegalizer" |
Definition at line 26 of file SPIRVPreLegalizer.cpp.
|
static |
Definition at line 41 of file SPIRVPreLegalizer.cpp.
References llvm::SPIRVGlobalRegistry::add(), assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::contains(), llvm::SPIRVGlobalRegistry::find(), llvm::MachineFunction::getRegInfo(), llvm::isSpvIntrinsic(), llvm::Register::isValid(), MBB, MI, MRI, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
static |
Definition at line 250 of file SPIRVPreLegalizer.cpp.
References assert(), llvm::LLT::fixed_vector(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::SPIRVGlobalRegistry::getPointerSize(), llvm::MachineOperand::getReg(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), MRI, llvm::LLT::pointer(), and llvm::LLT::scalar().
Referenced by llvm::processInstr().
|
static |
Definition at line 105 of file SPIRVPreLegalizer.cpp.
References assert(), llvm::MachineOperand::CreateImm(), llvm::MachineOperand::getCImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::ConstantInt::getZExtValue(), llvm::isSpvIntrinsic(), MBB, MI, MRI, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
static |
Definition at line 362 of file SPIRVPreLegalizer.cpp.
References llvm::addressSpaceToStorageClass(), assert(), llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::empty(), llvm::MachineBasicBlock::end(), llvm::MachineOperand::getCImm(), llvm::MachineOperand::getFPImm(), llvm::SPIRVSubtarget::getInstrInfo(), llvm::getMDOperandAsType(), llvm::MachineIRBuilder::getMF(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVType(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::Value::getType(), llvm::insertAssignInstr(), llvm::isSpvIntrinsic(), llvm_unreachable, MBB, MI, MRI, llvm::post_order(), propagateSPIRVType(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MachineIRBuilder::setInsertPt(), and UseMI.
|
static |
Definition at line 130 of file SPIRVPreLegalizer.cpp.
References llvm::addressSpaceToStorageClass(), assert(), llvm::SPIRVGlobalRegistry::assignSPIRVTypeToVReg(), llvm::MachineIRBuilder::buildBitcast(), llvm::SPIRVSubtarget::getInstrInfo(), llvm::getMDOperandAsType(), llvm::MachineIRBuilder::getMF(), llvm::MachineIRBuilder::getMRI(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVPointerType(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVType(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), llvm::MachineFunction::getSubtarget(), llvm::isSpvIntrinsic(), MBB, MI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MachineRegisterInfo::replaceRegWith(), and llvm::MachineIRBuilder::setInsertPt().
|
static |
Definition at line 572 of file SPIRVPreLegalizer.cpp.
References llvm::MachineBasicBlock::canFallThrough(), llvm::MachineBasicBlock::empty(), llvm::isSpvIntrinsic(), MBB, llvm::MachineBasicBlock::rbegin(), and llvm::MachineBasicBlock::rend().
Referenced by removeImplicitFallthroughs().
Definition at line 53 of file SPIRVLegalizerInfo.cpp.
Referenced by processInstrsWithTypeFolding().
|
static |
Definition at line 462 of file SPIRVPreLegalizer.cpp.
References llvm::SPIRVGlobalRegistry::getPointerSize(), llvm::MachineFunction::getRegInfo(), isTypeFoldingSupported(), MBB, MI, MRI, llvm::LLT::pointer(), llvm::processInstr(), llvm::LLT::scalar(), and UseMI.
|
static |
Definition at line 503 of file SPIRVPreLegalizer.cpp.
References assert(), llvm::MachineOperand::CreateCImm(), llvm::MachineOperand::CreateMBB(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::MachineBasicBlock::getBasicBlock(), llvm::MachineOperand::getBlockAddress(), llvm::getDefInstrMaybeConstant(), llvm::MachineInstr::getOpcode(), getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineFunction::getRegInfo(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::MachineOperand::isBlockAddress(), llvm::isSpvIntrinsic(), MBB, MI, MRI, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::report_fatal_error().
|
static |
Definition at line 184 of file SPIRVPreLegalizer.cpp.
References assert(), llvm::SPIRVGlobalRegistry::assignSPIRVTypeToVReg(), llvm::TypedPointerType::get(), llvm::SPIRVGlobalRegistry::getDeducedGlobalValueType(), llvm::MachineIRBuilder::getMF(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVIntegerType(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVType(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVVectorType(), llvm::SPIRVGlobalRegistry::getScalarOrVectorBitWidth(), llvm::SPIRVGlobalRegistry::getScalarOrVectorComponentCount(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), llvm::Global, MI, MRI, propagateSPIRVType(), and llvm::MachineIRBuilder::setInsertPt().
Referenced by generateAssignInstrs(), and propagateSPIRVType().
|
static |
Definition at line 591 of file SPIRVPreLegalizer.cpp.
References assert(), llvm::MachineIRBuilder::buildBr(), llvm::MachineBasicBlock::end(), isImplicitFallthrough(), MBB, llvm::MachineIRBuilder::setInsertPt(), and llvm::MachineBasicBlock::successors().