LLVM 20.0.0git
|
#include "Target/SPIRV/SPIRVLegalizerInfo.h"
Public Member Functions | |
bool | legalizeCustom (LegalizerHelper &Helper, MachineInstr &MI, LostDebugLocObserver &LocObserver) const override |
Called for instructions with the Custom LegalizationAction. | |
SPIRVLegalizerInfo (const SPIRVSubtarget &ST) | |
Public Member Functions inherited from llvm::LegalizerInfo | |
virtual | ~LegalizerInfo ()=default |
const LegacyLegalizerInfo & | getLegacyLegalizerInfo () const |
LegacyLegalizerInfo & | getLegacyLegalizerInfo () |
unsigned | getOpcodeIdxForOpcode (unsigned Opcode) const |
unsigned | getActionDefinitionsIdx (unsigned Opcode) const |
void | verify (const MCInstrInfo &MII) const |
Perform simple self-diagnostic and assert if there is anything obviously wrong with the actions set up. | |
const LegalizeRuleSet & | getActionDefinitions (unsigned Opcode) const |
Get the action definitions for the given opcode. | |
LegalizeRuleSet & | getActionDefinitionsBuilder (unsigned Opcode) |
Get the action definition builder for the given opcode. | |
LegalizeRuleSet & | getActionDefinitionsBuilder (std::initializer_list< unsigned > Opcodes) |
Get the action definition builder for the given set of opcodes. | |
void | aliasActionDefinitions (unsigned OpcodeTo, unsigned OpcodeFrom) |
LegalizeActionStep | getAction (const LegalityQuery &Query) const |
Determine what action should be taken to legalize the described instruction. | |
LegalizeActionStep | getAction (const MachineInstr &MI, const MachineRegisterInfo &MRI) const |
Determine what action should be taken to legalize the given generic instruction. | |
bool | isLegal (const LegalityQuery &Query) const |
bool | isLegalOrCustom (const LegalityQuery &Query) const |
bool | isLegal (const MachineInstr &MI, const MachineRegisterInfo &MRI) const |
bool | isLegalOrCustom (const MachineInstr &MI, const MachineRegisterInfo &MRI) const |
virtual bool | legalizeCustom (LegalizerHelper &Helper, MachineInstr &MI, LostDebugLocObserver &LocObserver) const |
Called for instructions with the Custom LegalizationAction. | |
virtual bool | legalizeIntrinsic (LegalizerHelper &Helper, MachineInstr &MI) const |
virtual unsigned | getExtOpcodeForWideningConstant (LLT SmallTy) const |
Return the opcode (SEXT/ZEXT/ANYEXT) that should be performed while widening a constant of type SmallTy which targets can override. | |
Definition at line 27 of file SPIRVLegalizerInfo.h.
SPIRVLegalizerInfo::SPIRVLegalizerInfo | ( | const SPIRVSubtarget & | ST | ) |
Definition at line 71 of file SPIRVLegalizerInfo.cpp.
References llvm::LegalityPredicates::all(), llvm::LegalizeRuleSet::alwaysLegal(), llvm::LegacyLegalizerInfo::computeTables(), llvm::LegalizeRuleSet::custom(), llvm::LegalizeRuleSet::customIf(), llvm::LLT::fixed_vector(), llvm::LegalizerInfo::getActionDefinitionsBuilder(), llvm::LegalizerInfo::getLegacyLegalizerInfo(), llvm::LLT::isPointerOrPointerVector(), llvm::LLT::isValid(), llvm::LegalizeRuleSet::legalFor(), llvm::LegalizeRuleSet::legalForCartesianProduct(), llvm::LegalizeRuleSet::legalIf(), llvm::LegalizeRuleSet::lower(), llvm::LLT::pointer(), llvm::LLT::scalar(), scalarize(), llvm::LegalizeRuleSet::scalarize(), TypeFoldingSupportingOpcs, llvm::LegalityPredicates::typeInSet(), typeOfExtendedScalars(), and verify.
|
overridevirtual |
Called for instructions with the Custom LegalizationAction.
Reimplemented from llvm::LegalizerInfo.
Definition at line 388 of file SPIRVLegalizerInfo.cpp.
References assert(), llvm::SPIRVSubtarget::canDirectlyComparePointers(), Cond, convertPtrToInt(), llvm::IntegerType::get(), llvm::SPIRVGlobalRegistry::getOrCreateSPIRVType(), llvm::SPIRVSubtarget::getPointerSize(), llvm::SPIRVGlobalRegistry::getSPIRVTypeForVReg(), llvm::CmpInst::ICMP_EQ, llvm::CmpInst::ICMP_NE, isTypeFoldingSupported(), MI, llvm::LegalizerHelper::MIRBuilder, MRI, and llvm::LLT::scalar().