LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
llvm::SPIRVSubtarget Class Reference

#include "Target/SPIRV/SPIRVSubtarget.h"

Inheritance diagram for llvm::SPIRVSubtarget:
Inheritance graph
[legend]

Public Member Functions

 SPIRVSubtarget (const Triple &TT, const std::string &CPU, const std::string &FS, const SPIRVTargetMachine &TM)
 
SPIRVSubtargetinitSubtargetDependencies (StringRef CPU, StringRef FS)
 
void ParseSubtargetFeatures (StringRef CPU, StringRef TuneCPU, StringRef FS)
 
unsigned getPointerSize () const
 
unsigned getBound () const
 
bool canDirectlyComparePointers () const
 
bool isOpenCLEnv () const
 
bool isVulkanEnv () const
 
const std::string & getTargetTripleAsStr () const
 
VersionTuple getSPIRVVersion () const
 
bool isAtLeastSPIRVVer (VersionTuple VerToCompareTo) const
 
bool isAtLeastOpenCLVer (VersionTuple VerToCompareTo) const
 
bool hasOpenCLFullProfile () const
 
bool hasOpenCLImageSupport () const
 
const SmallSet< SPIRV::Extension::Extension, 4 > & getAllAvailableExtensions () const
 
bool canUseExtension (SPIRV::Extension::Extension E) const
 
bool canUseExtInstSet (SPIRV::InstructionSet::InstructionSet E) const
 
SPIRVGlobalRegistrygetSPIRVGlobalRegistry () const
 
const CallLoweringgetCallLowering () const override
 
const RegisterBankInfogetRegBankInfo () const override
 
const LegalizerInfogetLegalizerInfo () const override
 
InstructionSelectorgetInstructionSelector () const override
 
const InlineAsmLoweringgetInlineAsmLowering () const override
 
const SPIRVInstrInfogetInstrInfo () const override
 
const SPIRVFrameLoweringgetFrameLowering () const override
 
const SPIRVTargetLoweringgetTargetLowering () const override
 
const SPIRVRegisterInfogetRegisterInfo () const override
 

Static Public Member Functions

static bool classof (const TargetSubtargetInfo *ST)
 
static void addExtensionsToClOpt (const std::set< SPIRV::Extension::Extension > &AllowList)
 

Static Public Attributes

static constexpr unsigned MaxLegalAddressSpace = 6
 

Detailed Description

Definition at line 38 of file SPIRVSubtarget.h.

Constructor & Destructor Documentation

◆ SPIRVSubtarget()

SPIRVSubtarget::SPIRVSubtarget ( const Triple TT,
const std::string &  CPU,
const std::string &  FS,
const SPIRVTargetMachine TM 
)

Member Function Documentation

◆ addExtensionsToClOpt()

void SPIRVSubtarget::addExtensionsToClOpt ( const std::set< SPIRV::Extension::Extension > &  AllowList)
static

Definition at line 43 of file SPIRVSubtarget.cpp.

References Extensions.

Referenced by llvm::SPIRVTranslateModule().

◆ canDirectlyComparePointers()

bool SPIRVSubtarget::canDirectlyComparePointers ( ) const

Definition at line 126 of file SPIRVSubtarget.cpp.

References isAtLeastVer(), and SPVTranslatorCompat.

Referenced by llvm::SPIRVLegalizerInfo::legalizeCustom().

◆ canUseExtension()

bool SPIRVSubtarget::canUseExtension ( SPIRV::Extension::Extension  E) const

◆ canUseExtInstSet()

bool SPIRVSubtarget::canUseExtInstSet ( SPIRV::InstructionSet::InstructionSet  E) const

Definition at line 109 of file SPIRVSubtarget.cpp.

References llvm::SmallSet< T, N, C >::contains().

◆ classof()

static bool llvm::SPIRVSubtarget::classof ( const TargetSubtargetInfo ST)
inlinestatic

Definition at line 128 of file SPIRVSubtarget.h.

◆ getAllAvailableExtensions()

const SmallSet< SPIRV::Extension::Extension, 4 > & llvm::SPIRVSubtarget::getAllAvailableExtensions ( ) const
inline

Definition at line 94 of file SPIRVSubtarget.h.

◆ getBound()

unsigned llvm::SPIRVSubtarget::getBound ( ) const
inline

Definition at line 76 of file SPIRVSubtarget.h.

◆ getCallLowering()

const CallLowering * llvm::SPIRVSubtarget::getCallLowering ( ) const
inlineoverride

Definition at line 102 of file SPIRVSubtarget.h.

◆ getFrameLowering()

const SPIRVFrameLowering * llvm::SPIRVSubtarget::getFrameLowering ( ) const
inlineoverride

Definition at line 118 of file SPIRVSubtarget.h.

◆ getInlineAsmLowering()

const InlineAsmLowering * llvm::SPIRVSubtarget::getInlineAsmLowering ( ) const
inlineoverride

Definition at line 114 of file SPIRVSubtarget.h.

◆ getInstrInfo()

const SPIRVInstrInfo * llvm::SPIRVSubtarget::getInstrInfo ( ) const
inlineoverride

◆ getInstructionSelector()

InstructionSelector * llvm::SPIRVSubtarget::getInstructionSelector ( ) const
inlineoverride

Definition at line 111 of file SPIRVSubtarget.h.

◆ getLegalizerInfo()

const LegalizerInfo * llvm::SPIRVSubtarget::getLegalizerInfo ( ) const
inlineoverride

Definition at line 108 of file SPIRVSubtarget.h.

◆ getPointerSize()

unsigned llvm::SPIRVSubtarget::getPointerSize ( ) const
inline

Definition at line 75 of file SPIRVSubtarget.h.

Referenced by llvm::SPIRVLegalizerInfo::legalizeCustom().

◆ getRegBankInfo()

const RegisterBankInfo * llvm::SPIRVSubtarget::getRegBankInfo ( ) const
inlineoverride

Definition at line 105 of file SPIRVSubtarget.h.

Referenced by doInsertBitcast().

◆ getRegisterInfo()

const SPIRVRegisterInfo * llvm::SPIRVSubtarget::getRegisterInfo ( ) const
inlineoverride

Definition at line 124 of file SPIRVSubtarget.h.

References llvm::SPIRVInstrInfo::getRegisterInfo().

Referenced by doInsertBitcast().

◆ getSPIRVGlobalRegistry()

SPIRVGlobalRegistry * llvm::SPIRVSubtarget::getSPIRVGlobalRegistry ( ) const
inline

Definition at line 100 of file SPIRVSubtarget.h.

Referenced by llvm::SPIRVTargetLowering::finalizeLowering().

◆ getSPIRVVersion()

VersionTuple llvm::SPIRVSubtarget::getSPIRVVersion ( ) const
inline

Definition at line 87 of file SPIRVSubtarget.h.

◆ getTargetLowering()

const SPIRVTargetLowering * llvm::SPIRVSubtarget::getTargetLowering ( ) const
inlineoverride

Definition at line 121 of file SPIRVSubtarget.h.

◆ getTargetTripleAsStr()

const std::string & llvm::SPIRVSubtarget::getTargetTripleAsStr ( ) const
inline

Definition at line 86 of file SPIRVSubtarget.h.

References llvm::Triple::str().

◆ hasOpenCLFullProfile()

bool llvm::SPIRVSubtarget::hasOpenCLFullProfile ( ) const
inline

Definition at line 91 of file SPIRVSubtarget.h.

◆ hasOpenCLImageSupport()

bool llvm::SPIRVSubtarget::hasOpenCLImageSupport ( ) const
inline

Definition at line 92 of file SPIRVSubtarget.h.

◆ initSubtargetDependencies()

SPIRVSubtarget & SPIRVSubtarget::initSubtargetDependencies ( StringRef  CPU,
StringRef  FS 
)

Definition at line 99 of file SPIRVSubtarget.cpp.

References ParseSubtargetFeatures().

◆ isAtLeastOpenCLVer()

bool SPIRVSubtarget::isAtLeastOpenCLVer ( VersionTuple  VerToCompareTo) const

Definition at line 118 of file SPIRVSubtarget.cpp.

References isAtLeastVer(), and isOpenCLEnv().

◆ isAtLeastSPIRVVer()

bool SPIRVSubtarget::isAtLeastSPIRVVer ( VersionTuple  VerToCompareTo) const

Definition at line 114 of file SPIRVSubtarget.cpp.

References isAtLeastVer().

◆ isOpenCLEnv()

bool llvm::SPIRVSubtarget::isOpenCLEnv ( ) const
inline

◆ isVulkanEnv()

bool llvm::SPIRVSubtarget::isVulkanEnv ( ) const
inline

Definition at line 85 of file SPIRVSubtarget.h.

References llvm::Triple::getArch(), and llvm::Triple::spirv.

◆ ParseSubtargetFeatures()

void llvm::SPIRVSubtarget::ParseSubtargetFeatures ( StringRef  CPU,
StringRef  TuneCPU,
StringRef  FS 
)

Member Data Documentation

◆ MaxLegalAddressSpace

constexpr unsigned llvm::SPIRVSubtarget::MaxLegalAddressSpace = 6
staticconstexpr

Definition at line 132 of file SPIRVSubtarget.h.


The documentation for this class was generated from the following files: