diff options
Diffstat (limited to 'lib/Target/PTX/PTXSubtarget.h')
-rw-r--r-- | lib/Target/PTX/PTXSubtarget.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/Target/PTX/PTXSubtarget.h b/lib/Target/PTX/PTXSubtarget.h index 7fd85f873a..9a9ada2af6 100644 --- a/lib/Target/PTX/PTXSubtarget.h +++ b/lib/Target/PTX/PTXSubtarget.h @@ -19,11 +19,36 @@ namespace llvm { class PTXSubtarget : public TargetSubtarget { private: - bool is_sm20; + enum PTXShaderModelEnum { + PTX_SM_1_0, + PTX_SM_1_3, + PTX_SM_2_0 + }; + + enum PTXVersionEnum { + PTX_VERSION_1_4, + PTX_VERSION_2_0, + PTX_VERSION_2_1 + }; + + /// Shader Model supported on the target GPU. + PTXShaderModelEnum PTXShaderModel; + + /// PTX Language Version. + PTXVersionEnum PTXVersion; + + // The native .f64 type is supported on the hardware. + bool SupportsDouble; public: PTXSubtarget(const std::string &TT, const std::string &FS); + std::string getTargetString() const; + + std::string getPTXVersionString() const; + + bool supportsDouble() const { return SupportsDouble; } + std::string ParseSubtargetFeatures(const std::string &FS, const std::string &CPU); }; // class PTXSubtarget |