LLVM 20.0.0git
|
#include "MCTargetDesc/SPIRVBaseInfo.h"
#include "MCTargetDesc/SPIRVMCTargetDesc.h"
#include "SPIRV.h"
#include "SPIRVGlobalRegistry.h"
#include "SPIRVInstrInfo.h"
#include "SPIRVRegisterBankInfo.h"
#include "SPIRVRegisterInfo.h"
#include "SPIRVTargetMachine.h"
#include "SPIRVUtils.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h"
#include "llvm/CodeGen/GlobalISel/GenericMachineInstrs.h"
#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineModuleInfoImpls.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Register.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/IR/IntrinsicsSPIRV.h"
#include "llvm/Support/Debug.h"
#include "SPIRVGenGlobalISel.inc"
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-isel" |
#define | GET_GLOBALISEL_PREDICATE_BITSET |
#define | GET_GLOBALISEL_PREDICATES_DECL |
#define | GET_GLOBALISEL_TEMPORARIES_DECL |
#define | GET_GLOBALISEL_IMPL |
#define | GET_GLOBALISEL_PREDICATES_INIT |
#define | GET_GLOBALISEL_TEMPORARIES_INIT |
Typedefs | |
using | ExtInstList = std::vector< std::pair< SPIRV::InstructionSet::InstructionSet, uint32_t > > |
#define DEBUG_TYPE "spirv-isel" |
Definition at line 37 of file SPIRVInstructionSelector.cpp.
#define GET_GLOBALISEL_IMPL |
Definition at line 318 of file SPIRVInstructionSelector.cpp.
#define GET_GLOBALISEL_PREDICATE_BITSET |
Definition at line 48 of file SPIRVInstructionSelector.cpp.
#define GET_GLOBALISEL_PREDICATES_DECL |
Definition at line 77 of file SPIRVInstructionSelector.cpp.
#define GET_GLOBALISEL_PREDICATES_INIT |
#define GET_GLOBALISEL_TEMPORARIES_DECL |
Definition at line 81 of file SPIRVInstructionSelector.cpp.
#define GET_GLOBALISEL_TEMPORARIES_INIT |
using ExtInstList = std::vector<std::pair<SPIRV::InstructionSet::InstructionSet, uint32_t> > |
Definition at line 43 of file SPIRVInstructionSelector.cpp.
|
static |
Definition at line 988 of file SPIRVInstructionSelector.cpp.
References llvm::MachineInstrBuilder::addImm().
|
static |
Definition at line 1005 of file SPIRVInstructionSelector.cpp.
References llvm::MachineInstrBuilder::addImm().
|
static |
Definition at line 2600 of file SPIRVInstructionSelector.cpp.
References assert(), llvm::MachineOperand::getCImm(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::ConstantInt::getZExtValue(), and MRI.
|
static |
Definition at line 2112 of file SPIRVInstructionSelector.cpp.
References llvm::MachineOperand::getCImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::ConstantInt::getValue(), llvm::APInt::getZExtValue(), llvm::MachineOperand::isReg(), MRI, and N.
Definition at line 1629 of file SPIRVInstructionSelector.cpp.
References llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, and llvm_unreachable.
Definition at line 1553 of file SPIRVInstructionSelector.cpp.
References llvm::CmpInst::FCMP_OEQ, llvm::CmpInst::FCMP_OGE, llvm::CmpInst::FCMP_OGT, llvm::CmpInst::FCMP_OLE, llvm::CmpInst::FCMP_OLT, llvm::CmpInst::FCMP_ONE, llvm::CmpInst::FCMP_ORD, llvm::CmpInst::FCMP_UEQ, llvm::CmpInst::FCMP_UGE, llvm::CmpInst::FCMP_UGT, llvm::CmpInst::FCMP_ULE, llvm::CmpInst::FCMP_ULT, llvm::CmpInst::FCMP_UNE, llvm::CmpInst::FCMP_UNO, and llvm_unreachable.
Definition at line 1589 of file SPIRVInstructionSelector.cpp.
References llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SGT, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_SLT, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULE, llvm::CmpInst::ICMP_ULT, and llvm_unreachable.
Definition at line 1655 of file SPIRVInstructionSelector.cpp.
References llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::APFloat::getOne(), llvm::Type::getScalarType(), llvm::Type::getTypeID(), and llvm::Type::HalfTyID.
Definition at line 1617 of file SPIRVInstructionSelector.cpp.
References llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, and llvm_unreachable.
Definition at line 1641 of file SPIRVInstructionSelector.cpp.
References llvm::Type::DoubleTyID, llvm::Type::FloatTyID, llvm::Type::getScalarType(), llvm::Type::getTypeID(), llvm::APFloat::getZero(), and llvm::Type::HalfTyID.
|
static |
Definition at line 1399 of file SPIRVInstructionSelector.cpp.
References MRI.
|
static |
Definition at line 2170 of file SPIRVInstructionSelector.cpp.
References isConstReg(), and MRI.
|
static |
Definition at line 2130 of file SPIRVInstructionSelector.cpp.
References llvm::SmallPtrSetImpl< PtrType >::contains(), llvm::MachineInstr::getNumExplicitDefs(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::SmallPtrSetImpl< PtrType >::insert(), isConstReg(), llvm::MachineOperand::isReg(), and MRI.
Referenced by isConstReg().
bool isDead | ( | const MachineInstr & | MI, |
const MachineRegisterInfo & | MRI | ||
) |
Definition at line 386 of file SPIRVInstructionSelector.cpp.
Referenced by llvm::finalizeBundle(), llvm::MachineInstr::findRegisterDefOperand(), llvm::MachineInstr::findRegisterDefOperandIdx(), llvm::t1CondCodeOp(), and llvm::TailDuplicator::tailDuplicateAndUpdate().
|
static |
Definition at line 1377 of file SPIRVInstructionSelector.cpp.
|
static |
Definition at line 2589 of file SPIRVInstructionSelector.cpp.
References assert(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isReg(), and MRI.
Referenced by llvm::SIInstrInfo::insertBranch(), llvm::HexagonInstrInfo::insertBranch(), llvm::RISCVInstrInfo::insertBranch(), llvm::VEInstrInfo::insertBranch(), llvm::SIInstrInfo::insertVectorSelect(), IsMemoryAssignmentError(), isMergeableLdStUpdate(), llvm::MachineInstr::isOperandSubregIdx(), llvm::SIInstrInfo::reverseBranchCondition(), and llvm::HexagonInstrInfo::reverseBranchCondition().
Definition at line 60 of file SPIRVLegalizerInfo.cpp.
References TypeFoldingSupportingOpcs.
Referenced by llvm::SPIRVLegalizerInfo::legalizeCustom(), and mayApplyGenericSelection().
|
static |
Definition at line 1388 of file SPIRVInstructionSelector.cpp.
Definition at line 476 of file SPIRVInstructionSelector.cpp.
References isTypeFoldingSupported().