LLVM 20.0.0git
|
#include "SPIRVModuleAnalysis.h"
#include "MCTargetDesc/SPIRVBaseInfo.h"
#include "MCTargetDesc/SPIRVMCTargetDesc.h"
#include "SPIRV.h"
#include "SPIRVSubtarget.h"
#include "SPIRVTargetMachine.h"
#include "SPIRVUtils.h"
#include "TargetInfo/SPIRVTargetInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/TargetPassConfig.h"
Go to the source code of this file.
Classes | |
struct | AvoidCapabilitiesSet |
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. | |
namespace | llvm::SPIRV |
Macros | |
#define | DEBUG_TYPE "spirv-module-analysis" |
#define | ATOM_FLT_REQ_EXT_MSG(ExtName) |
Typedefs | |
using | InstrTraces = std::set< InstrSignature > |
Variables | |
static cl::opt< bool > | SPVDumpDeps ("spv-dump-deps", cl::desc("Dump MIR with SPIR-V dependencies info"), cl::Optional, cl::init(false)) |
static cl::list< SPIRV::Capability::Capability > | AvoidCapabilities ("avoid-spirv-capabilities", cl::desc("SPIR-V capabilities to avoid if there are " "other options enabling a feature"), cl::ZeroOrMore, cl::Hidden, cl::values(clEnumValN(SPIRV::Capability::Shader, "Shader", "SPIR-V Shader capability"))) |
unsigned | OpIndex |
unsigned unsigned | DefaultVal |
#define ATOM_FLT_REQ_EXT_MSG | ( | ExtName | ) |
Definition at line 773 of file SPIRVModuleAnalysis.cpp.
#define DEBUG_TYPE "spirv-module-analysis" |
Definition at line 31 of file SPIRVModuleAnalysis.cpp.
using InstrTraces = std::set<InstrSignature> |
Definition at line 373 of file SPIRVModuleAnalysis.cpp.
|
static |
Definition at line 776 of file SPIRVModuleAnalysis.cpp.
References llvm::SPIRV::RequirementHandler::addCapability(), llvm::SPIRV::RequirementHandler::addExtension(), assert(), ATOM_FLT_REQ_EXT_MSG, llvm::BitWidth, llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), MI, and llvm::report_fatal_error().
Referenced by addInstrRequirements().
|
static |
Definition at line 1312 of file SPIRVModuleAnalysis.cpp.
References F, llvm::MachineModuleInfo::getMachineFunction(), handleMIFlagDecoration(), MBB, MI, llvm::SPIRV::ModuleAnalysisInfo::Reqs, and TII.
Referenced by llvm::SPIRVModuleAnalysis::runOnModule().
void addInstrRequirements | ( | const MachineInstr & | MI, |
SPIRV::RequirementHandler & | Reqs, | ||
const SPIRVSubtarget & | ST | ||
) |
Definition at line 833 of file SPIRVModuleAnalysis.cpp.
References AddAtomicFloatRequirements(), llvm::SPIRV::RequirementHandler::addCapability(), llvm::SPIRV::RequirementHandler::addExtension(), addOpDecorateReqs(), addOpTypeImageReqs(), Addr, assert(), llvm::BitWidth, llvm::SPIRV::RequirementHandler::getAndAddRequirements(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isReg(), MI, MRI, llvm::SPIRV::RequirementHandler::removeCapabilityIf(), and llvm::report_fatal_error().
Referenced by collectReqs().
|
static |
Definition at line 687 of file SPIRVModuleAnalysis.cpp.
References llvm::SPIRV::RequirementHandler::addExtension(), llvm::SPIRV::RequirementHandler::addRequirements(), and MI.
Referenced by addInstrRequirements().
|
static |
Definition at line 719 of file SPIRVModuleAnalysis.cpp.
References llvm::SPIRV::RequirementHandler::addRequirements(), assert(), llvm::SPIRV::RequirementHandler::getAndAddRequirements(), and MI.
Referenced by addInstrRequirements().
|
static |
Definition at line 401 of file SPIRVModuleAnalysis.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorImpl< T >::insert(), instrToSignature(), MI, llvm::SPIRV::ModuleAnalysisInfo::MS, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SPIRV::ModuleAnalysisInfo::setSkipEmission().
|
static |
Definition at line 1191 of file SPIRVModuleAnalysis.cpp.
References llvm::SPIRV::RequirementHandler::addCapability(), llvm::SPIRV::RequirementHandler::addExtension(), addInstrRequirements(), llvm::CallingConv::C, F, llvm::SPIRV::RequirementHandler::getAndAddRequirements(), llvm::MachineModuleInfo::getMachineFunction(), llvm::MDNode::getOperand(), MBB, MI, and llvm::SPIRV::ModuleAnalysisInfo::Reqs.
Referenced by llvm::SPIRVModuleAnalysis::runOnModule().
|
static |
Definition at line 1269 of file SPIRVModuleAnalysis.cpp.
References llvm::MachineInstr::FmArcp, llvm::MachineInstr::FmNoInfs, llvm::MachineInstr::FmNoNans, llvm::MachineInstr::FmNsz, llvm::MachineInstr::FmReassoc, and I.
Referenced by CreateAdd(), CreateMul(), handleMIFlagDecoration(), and instCombineSVEVectorFuseMulAddSub().
|
static |
Definition at line 1284 of file SPIRVModuleAnalysis.cpp.
References llvm::buildOpDecorate(), getFastMathFlags(), I, llvm::MachineInstr::NoSWrap, llvm::MachineInstr::NoUWrap, and TII.
Referenced by addDecorations().
INITIALIZE_PASS | ( | SPIRVModuleAnalysis | , |
DEBUG_TYPE | , | ||
"SPIRV module analysis" | , | ||
true | , | ||
true | |||
) |
|
static |
Definition at line 379 of file SPIRVModuleAnalysis.cpp.
References llvm::MachineOperand::getReg(), llvm::SPIRV::ModuleAnalysisInfo::getRegisterAlias(), llvm::MachineOperand::getSubReg(), llvm::MachineOperand::getType(), llvm::hash_combine(), llvm::hash_value(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), and MI.
Referenced by collectOtherInstr().
|
static |
Referenced by AvoidCapabilitiesSet::AvoidCapabilitiesSet().
Definition at line 65 of file SPIRVModuleAnalysis.cpp.
unsigned OpIndex |
Definition at line 64 of file SPIRVModuleAnalysis.cpp.
Referenced by combineX86ShuffleChain(), llvm::DWARFDebugLine::Row::dump(), llvm::MipsELFStreamer::emitInstruction(), lowerV4X128Shuffle(), llvm::AArch64FrameLowering::orderFrameObjects(), and llvm::DWARFDebugLine::Row::reset().
|
static |