LLVM  15.0.0git
Namespaces | Macros | Typedefs | Functions
RISCVISelDAGToDAG.cpp File Reference
#include "RISCVISelDAGToDAG.h"
#include "MCTargetDesc/RISCVMCTargetDesc.h"
#include "MCTargetDesc/RISCVMatInt.h"
#include "RISCVISelLowering.h"
#include "RISCVMachineFunctionInfo.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/IR/IntrinsicsRISCV.h"
#include "llvm/Support/Alignment.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "RISCVGenSearchableTables.inc"
Include dependency graph for RISCVISelDAGToDAG.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
 llvm::RISCV
 

Macros

#define DEBUG_TYPE   "riscv-isel"
 
#define GET_RISCVVSSEGTable_IMPL
 
#define GET_RISCVVLSEGTable_IMPL
 
#define GET_RISCVVLXSEGTable_IMPL
 
#define GET_RISCVVSXSEGTable_IMPL
 
#define GET_RISCVVLETable_IMPL
 
#define GET_RISCVVSETable_IMPL
 
#define GET_RISCVVLXTable_IMPL
 
#define GET_RISCVVSXTable_IMPL
 
#define GET_RISCVMaskedPseudosTable_IMPL
 
#define CASE_VMSLT_VMNAND_VMSET_OPCODES(lmulenum, suffix, suffix_b)
 
#define CASE_VMSLT_OPCODES(lmulenum, suffix, suffix_b)
 
#define CASE_VMXOR_VMANDN_VMOR_OPCODES(lmulenum, suffix)
 

Typedefs

using ValidateFn = bool(*)(int64_t)
 

Functions

static SDNodeselectImmWithConstantPool (SelectionDAG *CurDAG, const SDLoc &DL, const MVT VT, int64_t Imm, const RISCVSubtarget &Subtarget)
 
static SDNodeselectImm (SelectionDAG *CurDAG, const SDLoc &DL, const MVT VT, int64_t Imm, const RISCVSubtarget &Subtarget)
 
static SDValue createTupleImpl (SelectionDAG &CurDAG, ArrayRef< SDValue > Regs, unsigned RegClassID, unsigned SubReg0)
 
static SDValue createM1Tuple (SelectionDAG &CurDAG, ArrayRef< SDValue > Regs, unsigned NF)
 
static SDValue createM2Tuple (SelectionDAG &CurDAG, ArrayRef< SDValue > Regs, unsigned NF)
 
static SDValue createM4Tuple (SelectionDAG &CurDAG, ArrayRef< SDValue > Regs, unsigned NF)
 
static SDValue createTuple (SelectionDAG &CurDAG, ArrayRef< SDValue > Regs, unsigned NF, RISCVII::VLMUL LMUL)
 
static bool isAllUndef (ArrayRef< SDValue > Values)
 
static bool selectVSplatSimmHelper (SDValue N, SDValue &SplatVal, SelectionDAG &DAG, const RISCVSubtarget &Subtarget, ValidateFn ValidateImm)
 

Macro Definition Documentation

◆ CASE_VMSLT_OPCODES

#define CASE_VMSLT_OPCODES (   lmulenum,
  suffix,
  suffix_b 
)
Value:
case RISCVII::VLMUL::lmulenum: \
VMSLTOpcode = IsUnsigned ? RISCV::PseudoVMSLTU_VX_##suffix \
: RISCV::PseudoVMSLT_VX_##suffix; \
VMSLTMaskOpcode = IsUnsigned ? RISCV::PseudoVMSLTU_VX_##suffix##_MASK \
: RISCV::PseudoVMSLT_VX_##suffix##_MASK; \
break;

◆ CASE_VMSLT_VMNAND_VMSET_OPCODES

#define CASE_VMSLT_VMNAND_VMSET_OPCODES (   lmulenum,
  suffix,
  suffix_b 
)
Value:
case RISCVII::VLMUL::lmulenum: \
VMSLTOpcode = IsUnsigned ? RISCV::PseudoVMSLTU_VX_##suffix \
: RISCV::PseudoVMSLT_VX_##suffix; \
VMNANDOpcode = RISCV::PseudoVMNAND_MM_##suffix; \
VMSetOpcode = RISCV::PseudoVMSET_M_##suffix_b; \
break;

◆ CASE_VMXOR_VMANDN_VMOR_OPCODES

#define CASE_VMXOR_VMANDN_VMOR_OPCODES (   lmulenum,
  suffix 
)
Value:
case RISCVII::VLMUL::lmulenum: \
VMXOROpcode = RISCV::PseudoVMXOR_MM_##suffix; \
VMANDNOpcode = RISCV::PseudoVMANDN_MM_##suffix; \
VMOROpcode = RISCV::PseudoVMOR_MM_##suffix; \
break;

◆ DEBUG_TYPE

#define DEBUG_TYPE   "riscv-isel"

Definition at line 28 of file RISCVISelDAGToDAG.cpp.

◆ GET_RISCVMaskedPseudosTable_IMPL

#define GET_RISCVMaskedPseudosTable_IMPL

Definition at line 40 of file RISCVISelDAGToDAG.cpp.

◆ GET_RISCVVLETable_IMPL

#define GET_RISCVVLETable_IMPL

Definition at line 36 of file RISCVISelDAGToDAG.cpp.

◆ GET_RISCVVLSEGTable_IMPL

#define GET_RISCVVLSEGTable_IMPL

Definition at line 33 of file RISCVISelDAGToDAG.cpp.

◆ GET_RISCVVLXSEGTable_IMPL

#define GET_RISCVVLXSEGTable_IMPL

Definition at line 34 of file RISCVISelDAGToDAG.cpp.

◆ GET_RISCVVLXTable_IMPL

#define GET_RISCVVLXTable_IMPL

Definition at line 38 of file RISCVISelDAGToDAG.cpp.

◆ GET_RISCVVSETable_IMPL

#define GET_RISCVVSETable_IMPL

Definition at line 37 of file RISCVISelDAGToDAG.cpp.

◆ GET_RISCVVSSEGTable_IMPL

#define GET_RISCVVSSEGTable_IMPL

Definition at line 32 of file RISCVISelDAGToDAG.cpp.

◆ GET_RISCVVSXSEGTable_IMPL

#define GET_RISCVVSXSEGTable_IMPL

Definition at line 35 of file RISCVISelDAGToDAG.cpp.

◆ GET_RISCVVSXTable_IMPL

#define GET_RISCVVSXTable_IMPL

Definition at line 39 of file RISCVISelDAGToDAG.cpp.

Typedef Documentation

◆ ValidateFn

using ValidateFn = bool (*)(int64_t)

Definition at line 2006 of file RISCVISelDAGToDAG.cpp.

Function Documentation

◆ createM1Tuple()

static SDValue createM1Tuple ( SelectionDAG CurDAG,
ArrayRef< SDValue Regs,
unsigned  NF 
)
static

Definition at line 232 of file RISCVISelDAGToDAG.cpp.

References createTupleImpl().

Referenced by createTuple().

◆ createM2Tuple()

static SDValue createM2Tuple ( SelectionDAG CurDAG,
ArrayRef< SDValue Regs,
unsigned  NF 
)
static

Definition at line 242 of file RISCVISelDAGToDAG.cpp.

References createTupleImpl().

Referenced by createTuple().

◆ createM4Tuple()

static SDValue createM4Tuple ( SelectionDAG CurDAG,
ArrayRef< SDValue Regs,
unsigned  NF 
)
static

Definition at line 251 of file RISCVISelDAGToDAG.cpp.

References createTupleImpl().

Referenced by createTuple().

◆ createTuple()

static SDValue createTuple ( SelectionDAG CurDAG,
ArrayRef< SDValue Regs,
unsigned  NF,
RISCVII::VLMUL  LMUL 
)
static

◆ createTupleImpl()

static SDValue createTupleImpl ( SelectionDAG CurDAG,
ArrayRef< SDValue Regs,
unsigned  RegClassID,
unsigned  SubReg0 
)
static

◆ isAllUndef()

static bool isAllUndef ( ArrayRef< SDValue Values)
static

Definition at line 319 of file RISCVISelDAGToDAG.cpp.

References llvm::all_of(), and llvm::SDNode::isUndef().

◆ selectImm()

static SDNode* selectImm ( SelectionDAG CurDAG,
const SDLoc DL,
const MVT  VT,
int64_t  Imm,
const RISCVSubtarget Subtarget 
)
static

◆ selectImmWithConstantPool()

static SDNode* selectImmWithConstantPool ( SelectionDAG CurDAG,
const SDLoc DL,
const MVT  VT,
int64_t  Imm,
const RISCVSubtarget Subtarget 
)
static

◆ selectVSplatSimmHelper()

static bool selectVSplatSimmHelper ( SDValue  N,
SDValue SplatVal,
SelectionDAG DAG,
const RISCVSubtarget Subtarget,
ValidateFn  ValidateImm 
)
static