13#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVSUBTARGET_H
14#define LLVM_LIB_TARGET_SPIRV_SPIRVSUBTARGET_H
31#define GET_SUBTARGETINFO_HEADER
32#include "SPIRVGenSubtargetInfo.inc"
36class SPIRVTargetMachine;
40 const unsigned PointerSize;
46 std::unique_ptr<SPIRVGlobalRegistry> GR;
54 std::unique_ptr<CallLowering> CallLoweringInfo;
55 std::unique_ptr<RegisterBankInfo> RegBankInfo;
57 std::unique_ptr<InstructionSelector> InstSelector;
58 std::unique_ptr<InlineAsmLowering> InlineAsmInfo;
62 void initAvailableExtensions();
63 void initAvailableExtInstSets();
76 unsigned getBound()
const {
return GR->getBound(); }
95 return AvailableExtensions;
103 return CallLoweringInfo.get();
106 return RegBankInfo.get();
112 return InstSelector.get();
115 return InlineAsmInfo.get();
119 return &FrameLowering;
129 return ST->getTargetTriple().isSPIRV();
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file describes how to lower LLVM calls to machine code calls.
Interface for Targets to specify which operations they can successfully select and how the others sho...
This file defines the SmallSet class.
Holds all the information related to register banks.
const SPIRVRegisterInfo & getRegisterInfo() const
unsigned getPointerSize() const
bool hasOpenCLImageSupport() const
SPIRVSubtarget & initSubtargetDependencies(StringRef CPU, StringRef FS)
static void addExtensionsToClOpt(const std::set< SPIRV::Extension::Extension > &AllowList)
InstructionSelector * getInstructionSelector() const override
const LegalizerInfo * getLegalizerInfo() const override
bool canDirectlyComparePointers() const
const SPIRVInstrInfo * getInstrInfo() const override
const SmallSet< SPIRV::Extension::Extension, 4 > & getAllAvailableExtensions() const
const std::string & getTargetTripleAsStr() const
bool isAtLeastSPIRVVer(VersionTuple VerToCompareTo) const
static bool classof(const TargetSubtargetInfo *ST)
static constexpr unsigned MaxLegalAddressSpace
SPIRVGlobalRegistry * getSPIRVGlobalRegistry() const
const SPIRVRegisterInfo * getRegisterInfo() const override
bool isAtLeastOpenCLVer(VersionTuple VerToCompareTo) const
const SPIRVTargetLowering * getTargetLowering() const override
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
bool canUseExtInstSet(SPIRV::InstructionSet::InstructionSet E) const
const RegisterBankInfo * getRegBankInfo() const override
const CallLowering * getCallLowering() const override
const InlineAsmLowering * getInlineAsmLowering() const override
VersionTuple getSPIRVVersion() const
unsigned getBound() const
bool hasOpenCLFullProfile() const
bool canUseExtension(SPIRV::Extension::Extension E) const
const SPIRVFrameLowering * getFrameLowering() const override
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
StringRef - Represent a constant reference to a string, i.e.
TargetSubtargetInfo - Generic base class for all target subtargets.
Triple - Helper class for working with autoconf configuration names.
ArchType getArch() const
Get the parsed architecture type of this triple.
const std::string & str() const
Represents a version number in the form major[.minor[.subminor[.build]]].
This is an optimization pass for GlobalISel generic memory operations.