LLVM 20.0.0git
|
#include "NVPTXISelDAGToDAG.h"
#include "NVPTXUtilities.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/IR/NVVMIntrinsicUtils.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Target/TargetIntrinsicInfo.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "nvptx-isel" |
#define | PASS_NAME "NVPTX DAG->DAG Pattern Instruction Selection" |
#define | getOpcV2H(ty, opKind0, opKind1) NVPTX::StoreParamV2##ty##_##opKind0##opKind1 |
#define | getOpcV2H1(ty, opKind0, isImm1) (isImm1) ? getOpcV2H(ty, opKind0, i) : getOpcV2H(ty, opKind0, r) |
#define | getOpcodeForVectorStParamV2(ty, isimm) (isimm[0]) ? getOpcV2H1(ty, i, isimm[1]) : getOpcV2H1(ty, r, isimm[1]) |
#define | getOpcV4H(ty, opKind0, opKind1, opKind2, opKind3) NVPTX::StoreParamV4##ty##_##opKind0##opKind1##opKind2##opKind3 |
#define | getOpcV4H3(ty, opKind0, opKind1, opKind2, isImm3) |
#define | getOpcV4H2(ty, opKind0, opKind1, isImm2, isImm3) |
#define | getOpcV4H1(ty, opKind0, isImm1, isImm2, isImm3) |
#define | getOpcodeForVectorStParamV4(ty, isimm) |
#define | getOpcodeForVectorStParam(n, ty, isimm) |
#define | CP_ASYNC_BULK_TENSOR_OPCODE(dir, dim, mode, is_s32, suffix) |
#define | CP_ASYNC_BULK_TENSOR_OPCODE_S2G_IMPL(op, dim, mode, is_ch, is_s32) |
#define | GET_CP_ASYNC_BULK_TENSOR_OPCODE_S2G(dim, mode, is_reduce, is_ch, is_s32) |
#define | GET_CP_ASYNC_BULK_TENSOR_OPCODE_G2S(dim, mode, is_mc, is_ch, is_s32) |
#define | GET_CP_ASYNC_BULK_TENSOR_OPCODE_PREFETCH(dim, mode, is_ch) |
Variables | |
static cl::opt< bool > | EnableRsqrtOpt ("nvptx-rsqrt-approx-opt", cl::init(true), cl::Hidden, cl::desc("Enable reciprocal sqrt optimization")) |
#define CP_ASYNC_BULK_TENSOR_OPCODE | ( | dir, | |
dim, | |||
mode, | |||
is_s32, | |||
suffix | |||
) |
Definition at line 2766 of file NVPTXISelDAGToDAG.cpp.
Definition at line 2771 of file NVPTXISelDAGToDAG.cpp.
#define DEBUG_TYPE "nvptx-isel" |
Definition at line 30 of file NVPTXISelDAGToDAG.cpp.
#define GET_CP_ASYNC_BULK_TENSOR_OPCODE_G2S | ( | dim, | |
mode, | |||
is_mc, | |||
is_ch, | |||
is_s32 | |||
) |
Definition at line 2782 of file NVPTXISelDAGToDAG.cpp.
#define GET_CP_ASYNC_BULK_TENSOR_OPCODE_PREFETCH | ( | dim, | |
mode, | |||
is_ch | |||
) |
#define GET_CP_ASYNC_BULK_TENSOR_OPCODE_S2G | ( | dim, | |
mode, | |||
is_reduce, | |||
is_ch, | |||
is_s32 | |||
) |
Definition at line 2775 of file NVPTXISelDAGToDAG.cpp.
#define getOpcodeForVectorStParam | ( | n, | |
ty, | |||
isimm | |||
) |
Definition at line 2054 of file NVPTXISelDAGToDAG.cpp.
#define getOpcodeForVectorStParamV2 | ( | ty, | |
isimm | |||
) | (isimm[0]) ? getOpcV2H1(ty, i, isimm[1]) : getOpcV2H1(ty, r, isimm[1]) |
Definition at line 2032 of file NVPTXISelDAGToDAG.cpp.
#define getOpcodeForVectorStParamV4 | ( | ty, | |
isimm | |||
) |
Definition at line 2050 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV2H | ( | ty, | |
opKind0, | |||
opKind1 | |||
) | NVPTX::StoreParamV2##ty##_##opKind0##opKind1 |
Definition at line 2026 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV2H1 | ( | ty, | |
opKind0, | |||
isImm1 | |||
) | (isImm1) ? getOpcV2H(ty, opKind0, i) : getOpcV2H(ty, opKind0, r) |
Definition at line 2029 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV4H | ( | ty, | |
opKind0, | |||
opKind1, | |||
opKind2, | |||
opKind3 | |||
) | NVPTX::StoreParamV4##ty##_##opKind0##opKind1##opKind2##opKind3 |
Definition at line 2035 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV4H1 | ( | ty, | |
opKind0, | |||
isImm1, | |||
isImm2, | |||
isImm3 | |||
) |
Definition at line 2046 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV4H2 | ( | ty, | |
opKind0, | |||
opKind1, | |||
isImm2, | |||
isImm3 | |||
) |
Definition at line 2042 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV4H3 | ( | ty, | |
opKind0, | |||
opKind1, | |||
opKind2, | |||
isImm3 | |||
) |
Definition at line 2038 of file NVPTXISelDAGToDAG.cpp.
#define PASS_NAME "NVPTX DAG->DAG Pattern Instruction Selection" |
Definition at line 31 of file NVPTXISelDAGToDAG.cpp.
|
static |
Definition at line 597 of file NVPTXISelDAGToDAG.cpp.
References A, llvm::all_of(), F, llvm::getUnderlyingObjects(), llvm::NVPTX::Global, llvm::NVPTXSubtarget::hasLDG(), if(), llvm::isKernelFunction(), and N.
Definition at line 337 of file NVPTXISelDAGToDAG.cpp.
References llvm::NVPTXAS::ADDRESS_SPACE_CONST, llvm::NVPTXAS::ADDRESS_SPACE_GENERIC, llvm::NVPTXAS::ADDRESS_SPACE_GLOBAL, llvm::NVPTXAS::ADDRESS_SPACE_LOCAL, llvm::NVPTXAS::ADDRESS_SPACE_PARAM, llvm::NVPTXAS::ADDRESS_SPACE_SHARED, llvm::NVPTX::Const, llvm::NVPTX::Generic, llvm::NVPTX::Global, llvm::NVPTX::Local, N, llvm::NVPTX::Param, and llvm::NVPTX::Shared.
|
static |
Definition at line 2839 of file NVPTXISelDAGToDAG.cpp.
References D, GET_CP_ASYNC_BULK_TENSOR_OPCODE_G2S, and llvm_unreachable.
|
static |
Definition at line 2881 of file NVPTXISelDAGToDAG.cpp.
References D, GET_CP_ASYNC_BULK_TENSOR_OPCODE_PREFETCH, and llvm_unreachable.
|
static |
Definition at line 2797 of file NVPTXISelDAGToDAG.cpp.
References D, GET_CP_ASYNC_BULK_TENSOR_OPCODE_S2G, and llvm_unreachable.
|
static |
Definition at line 2914 of file NVPTXISelDAGToDAG.cpp.
References llvm_unreachable.
|
static |
Definition at line 639 of file NVPTXISelDAGToDAG.cpp.
References llvm::NVPTX::Acquire, llvm::NVPTX::AcquireRelease, llvm::NVPTX::Block, llvm::NVPTX::Cluster, llvm::NVPTX::Device, llvm::formatv(), llvm_unreachable, llvm::NVPTX::NotAtomic, llvm::NVPTX::Relaxed, llvm::NVPTX::RelaxedMMIO, llvm::NVPTX::Release, llvm::report_fatal_error(), llvm::NVPTX::SequentiallyConsistent, llvm::NVPTX::System, llvm::NVPTX::Thread, and llvm::NVPTX::Volatile.
|
static |
Definition at line 852 of file NVPTXISelDAGToDAG.cpp.
References llvm::NVPTX::PTXLdStInstCode::Float, llvm::EVT::getSimpleVT(), llvm::EVT::isFloatingPoint(), llvm::MVT::SimpleTy, llvm::NVPTX::PTXLdStInstCode::Unsigned, and llvm::NVPTX::PTXLdStInstCode::Untyped.
|
static |
Definition at line 214 of file NVPTXISelDAGToDAG.cpp.
References CC, llvm::NVPTX::PTXCmpMode::FTZ_FLAG, llvm_unreachable, llvm::ISD::SETEQ, llvm::ISD::SETGE, llvm::ISD::SETGT, llvm::ISD::SETLE, llvm::ISD::SETLT, llvm::ISD::SETNE, llvm::ISD::SETO, llvm::ISD::SETOEQ, llvm::ISD::SETOGE, llvm::ISD::SETOGT, llvm::ISD::SETOLE, llvm::ISD::SETOLT, llvm::ISD::SETONE, llvm::ISD::SETUEQ, llvm::ISD::SETUGE, llvm::ISD::SETUGT, llvm::ISD::SETULE, llvm::ISD::SETULT, llvm::ISD::SETUNE, and llvm::ISD::SETUO.
Definition at line 2453 of file NVPTXISelDAGToDAG.cpp.
References llvm::ISD::ADD, and llvm::ISD::OR.
Definition at line 986 of file NVPTXISelDAGToDAG.cpp.
References llvm::Isv2x16VT().
|
static |
Definition at line 2058 of file NVPTXISelDAGToDAG.cpp.
References assert(), DL, F32, F64, llvm::ConstantFPSDNode::getConstantFPValue(), llvm::ConstantSDNode::getConstantIntValue(), getOpcodeForVectorStParam, getOpcodeForVectorStParamV2, llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetConstantFP(), and llvm_unreachable.
|
static |
Definition at line 821 of file NVPTXISelDAGToDAG.cpp.