21#define DEBUG_TYPE "nvptx-subtarget"
23#define GET_SUBTARGETINFO_ENUM
24#define GET_SUBTARGETINFO_TARGET_DESC
25#define GET_SUBTARGETINFO_CTOR
26#include "NVPTXGenSubtargetInfo.inc"
30 cl::desc(
"NVPTX Specific: Disable generation of f16 math ops."),
33void NVPTXSubtarget::anchor() {}
38 TargetName = std::string(CPU.
empty() ?
"sm_30" : CPU);
48 if (PTXVersion == 0) {
56 const std::string &FS,
59 FullSmVersion(200),
SmVersion(getSmVersion()),
60 TLInfo(TM, initializeSubtargetDependencies(CPU, FS)) {
61 TSInfo = std::make_unique<NVPTXSelectionDAGInfo>();
75 std::string
const &FailureMessage)
const {
80 "NVPTX SM architecture \"{}\" and PTX version \"{}\" do not support {}. "
81 "Requires SM >= 90 and PTX >= 78.",
static cl::opt< bool > NoF16Math("nvptx-no-f16-math", cl::Hidden, cl::desc("NVPTX Specific: Disable generation of f16 math ops."), cl::init(false))
void failIfClustersUnsupported(std::string const &FailureMessage) const
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
~NVPTXSubtarget() override
unsigned int getFullSmVersion() const
unsigned int getSmVersion() const
bool allowFP16Math() const
NVPTXSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS, const NVPTXTargetMachine &TM)
This constructor initializes the data members to match that of the specified module.
NVPTXSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS)
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
Triple - Helper class for working with autoconf configuration names.
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.