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."),
34 cl::desc(
"NVPTX Specific: Disable generation of "
35 "f32x2 instructions and registers."),
39void NVPTXSubtarget::anchor() {}
43 TargetName = std::string(CPU);
53 if (PTXVersion == 0) {
61 const std::string &FS,
64 FullSmVersion(200), SmVersion(getSmVersion()),
65 TLInfo(TM, initializeSubtargetDependencies(CPU, FS)) {
66 TSInfo = std::make_unique<NVPTXSelectionDAGInfo>();
80 return SmVersion >= 100 && PTXVersion >= 86 && !
NoF32x2;
116 std::string
const &FailureMessage)
const {
121 "NVPTX SM architecture \"{}\" and PTX version \"{}\" do not support {}. "
122 "Requires SM >= 90 and PTX >= 78.",
static cl::opt< bool > NoF32x2("nvptx-no-f32x2", cl::Hidden, cl::desc("NVPTX Specific: Disable generation of " "f32x2 instructions and registers."), cl::init(false))
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 hasF32x2Instructions() 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 maximum on two values, following IEEE-754 definition...
@ 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)
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)