LLVM 20.0.0git
|
#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: |
Variables | |
static const MVT | AllVectorVTs [] |
static const MVT | AllMaskVTs [] = {MVT::v256i1, MVT::v512i1} |
static const MVT | AllPackedVTs [] = {MVT::v512i32, MVT::v512f32} |
#define ADD_VVP_OP | ( | VVP_NAME, | |
ISD_NAME | |||
) | setOperationAction(ISD::ISD_NAME, LegalVecVT, Custom); |
#define ADD_VVP_OP | ( | VVP_NAME, | |
ISD_NAME | |||
) | case ISD::ISD_NAME: |
#define ADD_VVP_OP | ( | VVP_NAME, | |
... | |||
) | TARGET_NODE_CASE(VVP_NAME) |
#define ADD_VVP_OP | ( | VVP_NAME, | |
... | |||
) | case VEISD::VVP_NAME: |
#define DEBUG_TYPE "ve-lower" |
Definition at line 39 of file VEISelLowering.cpp.
#define HANDLE_VP_TO_VVP | ( | VP_OPC, | |
VVP_NAME | |||
) | setOperationAction(ISD::VP_OPC, LegalVecVT, Custom); |
#define TARGET_NODE_CASE | ( | NAME | ) |
|
static |
Definition at line 2732 of file VEISelLowering.cpp.
References CC, llvm::VEISD::CMPF, llvm::VEISD::CMPI, llvm::VEISD::CMPQ, llvm::VEISD::CMPU, and llvm::EVT::isFloatingPoint().
Referenced by generateComparison().
Definition at line 2741 of file VEISelLowering.cpp.
Referenced by generateComparison().
|
static |
Definition at line 1179 of file VEISelLowering.cpp.
References llvm::ISD::AND, llvm::Data, DL, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), and llvm::ISD::SRL.
Referenced by llvm::VETargetLowering::lowerATOMIC_SWAP().
|
static |
Definition at line 2772 of file VEISelLowering.cpp.
References CC, decideComp(), decideCompType(), DL, llvm::SelectionDAG::getNode(), llvm::isNullConstant(), llvm::isNullFPConstant(), LHS, RHS, and safeWithoutCompWithNull().
Referenced by llvm::VETargetLowering::combineSelectCC().
CCAssignFn * getParamCC | ( | CallingConv::ID | CallConv, |
bool | IsVarArg | ||
) |
Definition at line 56 of file VEISelLowering.cpp.
References llvm::CallingConv::Fast.
Referenced by llvm::VETargetLowering::LowerCall(), and llvm::VETargetLowering::LowerFormalArguments().
CCAssignFn * getReturnCC | ( | CallingConv::ID | CallConv | ) |
Definition at line 47 of file VEISelLowering.cpp.
References llvm::CallingConv::Fast.
Referenced by llvm::VETargetLowering::CanLowerReturn(), llvm::VETargetLowering::LowerCall(), and llvm::VETargetLowering::LowerReturn().
Definition at line 1821 of file VEISelLowering.cpp.
References N.
Definition at line 1795 of file VEISelLowering.cpp.
Referenced by llvm::VETargetLowering::lowerBUILD_VECTOR().
Definition at line 2895 of file VEISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::ATOMIC_CMP_SWAP, llvm::ISD::ATOMIC_SWAP, llvm::ISD::BITCAST, llvm::ISD::BR_CC, llvm::ISD::BSWAP, llvm::VEISD::CMOV, llvm::VEISD::CMPI, llvm::VEISD::CMPU, llvm::ISD::CopyToReg, llvm::User::getOperand(), isI32InsnAllUses(), llvm::isIntVECondCode(), llvm::ISD::MUL, N, llvm::ISD::OR, llvm::ISD::SDIV, llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::ISD::SETCC, llvm::ISD::SHL, llvm::ISD::SINT_TO_FP, llvm::ISD::SMAX, llvm::ISD::SMIN, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::SUB, llvm::ISD::UDIV, llvm::ISD::UINT_TO_FP, and llvm::ISD::XOR.
Referenced by llvm::VETargetLowering::combineTRUNCATE(), and isI32InsnAllUses().
Definition at line 2952 of file VEISelLowering.cpp.
References llvm::ISD::ANY_EXTEND, assert(), llvm::VEISD::CMOV, isI32Insn(), N, llvm::ISD::SELECT, llvm::ISD::SELECT_CC, llvm::ISD::SIGN_EXTEND, llvm::Value::uses(), and llvm::ISD::ZERO_EXTEND.
Referenced by isI32Insn().
Definition at line 2711 of file VEISelLowering.cpp.
References llvm::CallingConv::C, llvm::getFpImmVal(), llvm::getImmVal(), llvm::EVT::isFloatingPoint(), llvm::EVT::isInteger(), llvm::isMImm32Val(), llvm::isMImmVal(), and llvm::EVT::isVector().
Referenced by llvm::VETargetLowering::combineSelect(), and llvm::VETargetLowering::combineSelectCC().
Definition at line 2689 of file VEISelLowering.cpp.
References llvm::CallingConv::C, llvm::EVT::isFloatingPoint(), llvm::EVT::isInteger(), and llvm::EVT::isVector().
Referenced by llvm::VETargetLowering::combineSelectCC().
|
static |
Definition at line 1723 of file VEISelLowering.cpp.
References llvm::Depth, DL, llvm::SelectionDAG::getCopyFromReg(), llvm::MachineFunction::getDataLayout(), llvm::SelectionDAG::getEntryNode(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::TargetLoweringBase::getPointerTy(), llvm::VESubtarget::getRegisterInfo(), and llvm::MachineFrameInfo::setFrameAddressIsTaken().
Referenced by llvm::VETargetLowering::LowerOperation(), and lowerRETURNADDR().
|
static |
Definition at line 1322 of file VEISelLowering.cpp.
References llvm::ISD::ADD, assert(), DL, llvm::MemSDNode::getAlign(), llvm::LoadSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getMergeValues(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::LoadSDNode::getOffset(), llvm::MemSDNode::getPointerInfo(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::getValueType(), llvm::SDValue::isUndef(), llvm::MemSDNode::isVolatile(), llvm::MachineMemOperand::MONone, llvm::MachineMemOperand::MOVolatile, and llvm::ISD::TokenFactor.
Referenced by llvm::VETargetLowering::lowerLOAD().
|
static |
Definition at line 1367 of file VEISelLowering.cpp.
References llvm::ISD::ADD, Addr, assert(), DL, llvm::MemSDNode::getAlign(), llvm::LoadSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineNode(), llvm::MemSDNode::getMemoryVT(), llvm::SelectionDAG::getMergeValues(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::LoadSDNode::getOffset(), llvm::MemSDNode::getPointerInfo(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::isUndef(), llvm::MemSDNode::isVolatile(), llvm::MachineMemOperand::MONone, llvm::MachineMemOperand::MOVolatile, and llvm::ISD::TokenFactor.
Referenced by llvm::VETargetLowering::lowerLOAD().
|
static |
Definition at line 1744 of file VEISelLowering.cpp.
References llvm::ISD::ADD, DL, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getEntryNode(), llvm::MachineFunction::getFrameInfo(), llvm::SelectionDAG::getLoad(), llvm::SelectionDAG::getMachineFunction(), llvm::SelectionDAG::getNode(), lowerFRAMEADDR(), llvm::Offset, llvm::MachineFrameInfo::setReturnAddressIsTaken(), and llvm::TargetLowering::verifyReturnAddressArgumentIsConstant().
Referenced by llvm::VETargetLowering::LowerOperation().
|
static |
Definition at line 1451 of file VEISelLowering.cpp.
References llvm::ISD::ADD, assert(), DL, llvm::MemSDNode::getAlign(), llvm::StoreSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getNode(), llvm::StoreSDNode::getOffset(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTargetConstant(), llvm::StoreSDNode::getValue(), llvm::SDValue::getValueType(), llvm::SDValue::isUndef(), llvm::MemSDNode::isVolatile(), llvm::MachineMemOperand::MONone, llvm::MachineMemOperand::MOVolatile, and llvm::ISD::TokenFactor.
Referenced by llvm::VETargetLowering::lowerSTORE().
|
static |
Definition at line 1492 of file VEISelLowering.cpp.
References llvm::ISD::ADD, Addr, assert(), DL, llvm::MemSDNode::getAlign(), llvm::StoreSDNode::getBasePtr(), llvm::MemSDNode::getChain(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getMachineNode(), llvm::MemSDNode::getMemoryVT(), llvm::SelectionDAG::getNode(), llvm::StoreSDNode::getOffset(), llvm::SelectionDAG::getStore(), llvm::SelectionDAG::getTargetConstant(), llvm::StoreSDNode::getValue(), llvm::SDValue::isUndef(), llvm::MemSDNode::isVolatile(), llvm::MachineMemOperand::MONone, llvm::MachineMemOperand::MOVolatile, and llvm::ISD::TokenFactor.
Referenced by llvm::VETargetLowering::lowerSTORE().
|
static |
Definition at line 1157 of file VEISelLowering.cpp.
References llvm::ISD::AND, DL, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), llvm::SDValue::getValueType(), N, Ptr, and llvm::ISD::SHL.
Referenced by llvm::VETargetLowering::lowerATOMIC_SWAP().
|
static |
Definition at line 2747 of file VEISelLowering.cpp.
References CC, and llvm::EVT::isFloatingPoint().
Referenced by generateComparison().
Definition at line 79 of file VEISelLowering.cpp.
Definition at line 81 of file VEISelLowering.cpp.
Definition at line 76 of file VEISelLowering.cpp.