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() {}
37 TargetName = std::string(CPU);
47 if (PTXVersion == 0) {
55 const std::string &FS,
58 FullSmVersion(200),
SmVersion(getSmVersion()),
59 TLInfo(TM, initializeSubtargetDependencies(CPU, FS)) {
60 TSInfo = std::make_unique<NVPTXSelectionDAGInfo>();
74 std::string
const &FailureMessage)
const {
79 "NVPTX SM architecture \"{}\" and PTX version \"{}\" do not support {}. "
80 "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
std::string getTargetName() 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.
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.