LLVM 20.0.0git
|
#include "NVPTXISelDAGToDAG.h"
#include "MCTargetDesc/NVPTXBaseInfo.h"
#include "NVPTXUtilities.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/ISDOpcodes.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.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) |
Functions | |
static unsigned | getPTXCmpMode (const CondCodeSDNode &CondCode, bool FTZ) |
static unsigned int | getCodeAddrSpace (MemSDNode *N) |
static bool | canLowerToLDG (MemSDNode *N, const NVPTXSubtarget &Subtarget, unsigned CodeAddrSpace, MachineFunction *F) |
static std::optional< unsigned > | pickOpcodeForVT (MVT::SimpleValueType VT, unsigned Opcode_i8, unsigned Opcode_i16, unsigned Opcode_i32, std::optional< unsigned > Opcode_i64, unsigned Opcode_f32, std::optional< unsigned > Opcode_f64) |
static int | getLdStRegType (EVT VT) |
static unsigned | pickOpcodeForVectorStParam (SmallVector< SDValue, 8 > &Ops, unsigned NumElts, MVT::SimpleValueType MemTy, SelectionDAG *CurDAG, SDLoc DL) |
Variables | |
static cl::opt< bool > | EnableRsqrtOpt ("nvptx-rsqrt-approx-opt", cl::init(true), cl::Hidden, cl::desc("Enable reciprocal sqrt optimization")) |
#define DEBUG_TYPE "nvptx-isel" |
Definition at line 31 of file NVPTXISelDAGToDAG.cpp.
#define getOpcodeForVectorStParam | ( | n, | |
ty, | |||
isimm | |||
) |
Definition at line 2364 of file NVPTXISelDAGToDAG.cpp.
#define getOpcodeForVectorStParamV2 | ( | ty, | |
isimm | |||
) | (isimm[0]) ? getOpcV2H1(ty, i, isimm[1]) : getOpcV2H1(ty, r, isimm[1]) |
Definition at line 2342 of file NVPTXISelDAGToDAG.cpp.
#define getOpcodeForVectorStParamV4 | ( | ty, | |
isimm | |||
) |
Definition at line 2360 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV2H | ( | ty, | |
opKind0, | |||
opKind1 | |||
) | NVPTX::StoreParamV2##ty##_##opKind0##opKind1 |
Definition at line 2336 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV2H1 | ( | ty, | |
opKind0, | |||
isImm1 | |||
) | (isImm1) ? getOpcV2H(ty, opKind0, i) : getOpcV2H(ty, opKind0, r) |
Definition at line 2339 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV4H | ( | ty, | |
opKind0, | |||
opKind1, | |||
opKind2, | |||
opKind3 | |||
) | NVPTX::StoreParamV4##ty##_##opKind0##opKind1##opKind2##opKind3 |
Definition at line 2345 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV4H1 | ( | ty, | |
opKind0, | |||
isImm1, | |||
isImm2, | |||
isImm3 | |||
) |
Definition at line 2356 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV4H2 | ( | ty, | |
opKind0, | |||
opKind1, | |||
isImm2, | |||
isImm3 | |||
) |
Definition at line 2352 of file NVPTXISelDAGToDAG.cpp.
#define getOpcV4H3 | ( | ty, | |
opKind0, | |||
opKind1, | |||
opKind2, | |||
isImm3 | |||
) |
Definition at line 2348 of file NVPTXISelDAGToDAG.cpp.
#define PASS_NAME "NVPTX DAG->DAG Pattern Instruction Selection" |
Definition at line 32 of file NVPTXISelDAGToDAG.cpp.
|
static |
Definition at line 918 of file NVPTXISelDAGToDAG.cpp.
References A, llvm::all_of(), F, llvm::getUnderlyingObjects(), llvm::NVPTX::PTXLdStInstCode::GLOBAL, llvm::NVPTXSubtarget::hasLDG(), if(), llvm::isKernelFunction(), and N.
Definition at line 698 of file NVPTXISelDAGToDAG.cpp.
References llvm::ADDRESS_SPACE_CONST, llvm::ADDRESS_SPACE_GENERIC, llvm::ADDRESS_SPACE_GLOBAL, llvm::ADDRESS_SPACE_LOCAL, llvm::ADDRESS_SPACE_PARAM, llvm::ADDRESS_SPACE_SHARED, llvm::NVPTX::PTXLdStInstCode::CONSTANT, llvm::NVPTX::PTXLdStInstCode::GENERIC, llvm::NVPTX::PTXLdStInstCode::GLOBAL, llvm::NVPTX::PTXLdStInstCode::LOCAL, N, llvm::NVPTX::PTXLdStInstCode::PARAM, and llvm::NVPTX::PTXLdStInstCode::SHARED.
|
static |
Definition at line 1119 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 575 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.
|
static |
Definition at line 2368 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 1088 of file NVPTXISelDAGToDAG.cpp.