13#ifndef LLVM_LIB_TARGET_SPIRV_SPIRVSUBTARGET_H
14#define LLVM_LIB_TARGET_SPIRV_SPIRVSUBTARGET_H
36#define OPTIONS_STRUCT_DECL
37#include "SPIRVOptions.inc"
39#define GET_SUBTARGETINFO_HEADER
40#include "SPIRVGenSubtargetInfo.inc"
44class SPIRVTargetMachine;
52 const SPIRVOptions &CLOpts;
53 const unsigned PointerSize;
60 std::unique_ptr<SPIRVGlobalRegistry> GR;
69 std::unique_ptr<CallLowering> CallLoweringInfo;
70 std::unique_ptr<RegisterBankInfo> RegBankInfo;
72 std::unique_ptr<InstructionSelector> InstSelector;
73 std::unique_ptr<InlineAsmLowering> InlineAsmInfo;
75 void initAvailableExtInstSets();
76 void accountForAMDShaderTrinaryMinmax();
77 void accountForNonSemanticDebugBreak();
92 const SPIRVOptions &
getCLOpts()
const {
return CLOpts; }
94 unsigned getBound()
const {
return GR->getBound(); }
114 return AvailableExtensions;
123 return CallLoweringInfo.get();
126 return RegBankInfo.get();
129 return Legalizer.get();
132 return InstSelector.get();
135 return InlineAsmInfo.get();
139 return &FrameLowering;
145 return &InstrInfo.getRegisterInfo();
149 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.
Module.h This file contains the declarations for the Module class.
Interface for Targets to specify which operations they can successfully select and how the others sho...
This file defines the SmallSet class.
A Module instance is used to store all the information related to an LLVM module.
Holds all the information related to register banks.
unsigned getPointerSize() const
bool hasOpenCLImageSupport() const
SPIRVSubtarget & initSubtargetDependencies(StringRef CPU, StringRef FS)
bool isPhysicalSPIRV() const
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)
SPIRVGlobalRegistry * getSPIRVGlobalRegistry() const
void resolveEnvFromModule(const Module &M)
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
SPIRVSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS, const SPIRVTargetMachine &TM)
const SPIRVOptions & getCLOpts() const
bool isLogicalSPIRV() const
const InlineAsmLowering * getInlineAsmLowering() const override
SPIRV::InstructionSet::InstructionSet getPreferredInstructionSet() const
VersionTuple getSPIRVVersion() const
unsigned getBound() const
SPIRVEnvType getEnv() const
bool hasOpenCLFullProfile() const
bool canUseExtension(SPIRV::Extension::Extension E) const
void initAvailableExtensions(const ExtensionSet &AllowedExtIds)
void setEnv(SPIRVEnvType E)
const SPIRVFrameLowering * getFrameLowering() const override
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
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.
Represents a version number in the form major[.minor[.subminor[.build]]].
This is an optimization pass for GlobalISel generic memory operations.
DenseSet< SPIRV::Extension::Extension > ExtensionSet
@ Fast
Assign the register banks as fast as possible (default).