1 //====-- PTXSubtarget.h - Define Subtarget for the PTX ---------*- C++ -*--===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the PTX specific subclass of TargetSubtarget.
12 //===----------------------------------------------------------------------===//
14 #ifndef PTX_SUBTARGET_H
15 #define PTX_SUBTARGET_H
17 #include "llvm/Target/TargetSubtarget.h"
20 class PTXSubtarget : public TargetSubtarget {
22 enum PTXShaderModelEnum {
34 /// Shader Model supported on the target GPU.
35 PTXShaderModelEnum PTXShaderModel;
37 /// PTX Language Version.
38 PTXVersionEnum PTXVersion;
40 // The native .f64 type is supported on the hardware.
43 // Use .u64 instead of .u32 for addresses.
44 bool Use64BitAddresses;
47 PTXSubtarget(const std::string &TT, const std::string &FS);
49 std::string getTargetString() const;
51 std::string getPTXVersionString() const;
53 bool supportsDouble() const { return SupportsDouble; }
55 bool use64BitAddresses() const { return Use64BitAddresses; }
57 std::string ParseSubtargetFeatures(const std::string &FS,
58 const std::string &CPU);
59 }; // class PTXSubtarget
62 #endif // PTX_SUBTARGET_H