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>();
106 std::string
const &FailureMessage)
const {
111 "NVPTX SM architecture \"{}\" and PTX version \"{}\" do not support {}. "
112 "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)
unsigned getPTXVersion() const
~NVPTXSubtarget() override
bool hasNativeBF16Support(int Opcode) const
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.
@ SETCC
SetCC operator - This evaluates to a true value iff the condition is true.
@ FADD
Simple binary floating point operators.
@ SELECT
Select(COND, TRUEVAL, FALSEVAL).
@ FMINNUM_IEEE
FMINNUM_IEEE/FMAXNUM_IEEE - Perform floating-point minimumNumber or maximumNumber on two values,...
@ SELECT_CC
Select with condition operator - This selects between a true value and a false value (ops #2 and #3) ...
@ FMINNUM
FMINNUM/FMAXNUM - Perform floating-point minimum or maximum on two values.
@ FMINIMUM
FMINIMUM/FMAXIMUM - NaN-propagating minimum/maximum that also treat -0.0 as less than 0....
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.