LLVM 19.0.0git
Macros | Functions | Variables
VEISelLowering.cpp File Reference
#include "VEISelLowering.h"
#include "MCTargetDesc/VEMCExpr.h"
#include "VECustomDAG.h"
#include "VEInstrBuilder.h"
#include "VEMachineFunctionInfo.h"
#include "VERegisterInfo.h"
#include "VETargetMachine.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/CodeGen/CallingConvLower.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/KnownBits.h"
#include "VEGenCallingConv.inc"
#include "VVPNodes.def"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "ve-lower"
 
#define HANDLE_VP_TO_VVP(VP_OPC, VVP_NAME)    setOperationAction(ISD::VP_OPC, LegalVecVT, Custom);
 
#define ADD_VVP_OP(VVP_NAME, ISD_NAME)    setOperationAction(ISD::ISD_NAME, LegalVecVT, Custom);
 
#define TARGET_NODE_CASE(NAME)
 
#define ADD_VVP_OP(VVP_NAME, ...)   TARGET_NODE_CASE(VVP_NAME)
 
#define ADD_VVP_OP(VVP_NAME, ...)   case VEISD::VVP_NAME:
 
#define ADD_VVP_OP(VVP_NAME, ISD_NAME)   case ISD::ISD_NAME:
 

Functions

CCAssignFn * getReturnCC (CallingConv::ID CallConv)
 
CCAssignFn * getParamCC (CallingConv::ID CallConv, bool IsVarArg)
 
static SDValue prepareTS1AM (SDValue Op, SelectionDAG &DAG, SDValue &Flag, SDValue &Bits)
 
static SDValue finalizeTS1AM (SDValue Op, SelectionDAG &DAG, SDValue Data, SDValue Bits)
 
static SDValue lowerLoadF128 (SDValue Op, SelectionDAG &DAG)
 
static SDValue lowerLoadI1 (SDValue Op, SelectionDAG &DAG)
 
static SDValue lowerStoreF128 (SDValue Op, SelectionDAG &DAG)
 
static SDValue lowerStoreI1 (SDValue Op, SelectionDAG &DAG)
 
static SDValue lowerFRAMEADDR (SDValue Op, SelectionDAG &DAG, const VETargetLowering &TLI, const VESubtarget *Subtarget)
 
static SDValue lowerRETURNADDR (SDValue Op, SelectionDAG &DAG, const VETargetLowering &TLI, const VESubtarget *Subtarget)
 
static bool getUniqueInsertion (SDNode *N, unsigned &UniqueIdx)
 
static SDValue getSplatValue (SDNode *N)
 
static bool isSimm7 (SDValue V)
 
static bool isMImm (SDValue V)
 
static unsigned decideComp (EVT SrcVT, ISD::CondCode CC)
 
static EVT decideCompType (EVT SrcVT)
 
static bool safeWithoutCompWithNull (EVT SrcVT, ISD::CondCode CC, bool WithCMov)
 
static SDValue generateComparison (EVT VT, SDValue LHS, SDValue RHS, ISD::CondCode CC, bool WithCMov, const SDLoc &DL, SelectionDAG &DAG)
 
static bool isI32InsnAllUses (const SDNode *User, const SDNode *N)
 
static bool isI32Insn (const SDNode *User, const SDNode *N)
 

Variables

static const MVT AllVectorVTs []
 
static const MVT AllMaskVTs [] = {MVT::v256i1, MVT::v512i1}
 
static const MVT AllPackedVTs [] = {MVT::v512i32, MVT::v512f32}
 

Macro Definition Documentation

◆ ADD_VVP_OP [1/4]

#define ADD_VVP_OP (   VVP_NAME,
  ISD_NAME 
)     setOperationAction(ISD::ISD_NAME, LegalVecVT, Custom);

◆ ADD_VVP_OP [2/4]

#define ADD_VVP_OP (   VVP_NAME,
  ISD_NAME 
)    case ISD::ISD_NAME:

◆ ADD_VVP_OP [3/4]

#define ADD_VVP_OP (   VVP_NAME,
  ... 
)    TARGET_NODE_CASE(VVP_NAME)

◆ ADD_VVP_OP [4/4]

#define ADD_VVP_OP (   VVP_NAME,
  ... 
)    case VEISD::VVP_NAME:

◆ DEBUG_TYPE

#define DEBUG_TYPE   "ve-lower"

Definition at line 39 of file VEISelLowering.cpp.

◆ HANDLE_VP_TO_VVP

#define HANDLE_VP_TO_VVP (   VP_OPC,
  VVP_NAME 
)     setOperationAction(ISD::VP_OPC, LegalVecVT, Custom);

◆ TARGET_NODE_CASE

#define TARGET_NODE_CASE (   NAME)
Value:
case VEISD::NAME: \
return "VEISD::" #NAME;

Function Documentation

◆ decideComp()

static unsigned decideComp ( EVT  SrcVT,
ISD::CondCode  CC 
)
static

◆ decideCompType()

static EVT decideCompType ( EVT  SrcVT)
static

Definition at line 2744 of file VEISelLowering.cpp.

Referenced by generateComparison().

◆ finalizeTS1AM()

static SDValue finalizeTS1AM ( SDValue  Op,
SelectionDAG DAG,
SDValue  Data,
SDValue  Bits 
)
static

◆ generateComparison()

static SDValue generateComparison ( EVT  VT,
SDValue  LHS,
SDValue  RHS,
ISD::CondCode  CC,
bool  WithCMov,
const SDLoc DL,
SelectionDAG DAG 
)
static

◆ getParamCC()

CCAssignFn * getParamCC ( CallingConv::ID  CallConv,
bool  IsVarArg 
)

◆ getReturnCC()

CCAssignFn * getReturnCC ( CallingConv::ID  CallConv)

◆ getSplatValue()

static SDValue getSplatValue ( SDNode N)
static

Definition at line 1822 of file VEISelLowering.cpp.

References N.

◆ getUniqueInsertion()

static bool getUniqueInsertion ( SDNode N,
unsigned UniqueIdx 
)
static

Definition at line 1796 of file VEISelLowering.cpp.

References Idx, and N.

Referenced by llvm::VETargetLowering::lowerBUILD_VECTOR().

◆ isI32Insn()

static bool isI32Insn ( const SDNode User,
const SDNode N 
)
static

◆ isI32InsnAllUses()

static bool isI32InsnAllUses ( const SDNode User,
const SDNode N 
)
static

◆ isMImm()

static bool isMImm ( SDValue  V)
static

◆ isSimm7()

static bool isSimm7 ( SDValue  V)
static

◆ lowerFRAMEADDR()

static SDValue lowerFRAMEADDR ( SDValue  Op,
SelectionDAG DAG,
const VETargetLowering TLI,
const VESubtarget Subtarget 
)
static

◆ lowerLoadF128()

static SDValue lowerLoadF128 ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ lowerLoadI1()

static SDValue lowerLoadI1 ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ lowerRETURNADDR()

static SDValue lowerRETURNADDR ( SDValue  Op,
SelectionDAG DAG,
const VETargetLowering TLI,
const VESubtarget Subtarget 
)
static

◆ lowerStoreF128()

static SDValue lowerStoreF128 ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ lowerStoreI1()

static SDValue lowerStoreI1 ( SDValue  Op,
SelectionDAG DAG 
)
static

◆ prepareTS1AM()

static SDValue prepareTS1AM ( SDValue  Op,
SelectionDAG DAG,
SDValue Flag,
SDValue Bits 
)
static

◆ safeWithoutCompWithNull()

static bool safeWithoutCompWithNull ( EVT  SrcVT,
ISD::CondCode  CC,
bool  WithCMov 
)
static

Definition at line 2750 of file VEISelLowering.cpp.

References CC, and llvm::EVT::isFloatingPoint().

Referenced by generateComparison().

Variable Documentation

◆ AllMaskVTs

const MVT AllMaskVTs[] = {MVT::v256i1, MVT::v512i1}
static

Definition at line 79 of file VEISelLowering.cpp.

◆ AllPackedVTs

const MVT AllPackedVTs[] = {MVT::v512i32, MVT::v512f32}
static

Definition at line 81 of file VEISelLowering.cpp.

◆ AllVectorVTs

const MVT AllVectorVTs[]
static
Initial value:
= {MVT::v256i32, MVT::v512i32, MVT::v256i64,
MVT::v256f32, MVT::v512f32, MVT::v256f64}

Definition at line 76 of file VEISelLowering.cpp.