LLVM 20.0.0git
|
#include "RISCVISelDAGToDAG.h"
#include "MCTargetDesc/RISCVBaseInfo.h"
#include "MCTargetDesc/RISCVMCTargetDesc.h"
#include "MCTargetDesc/RISCVMatInt.h"
#include "RISCVISelLowering.h"
#include "RISCVInstrInfo.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/IR/IntrinsicsRISCV.h"
#include "llvm/Support/Alignment.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "RISCVGenSearchableTables.inc"
Go to the source code of this file.
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. | |
namespace | llvm::RISCV |
Macros | |
#define | DEBUG_TYPE "riscv-isel" |
#define | PASS_NAME "RISC-V DAG->DAG Pattern Instruction Selection" |
#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 | INST_NF_CASE(NAME, NF) |
#define | INST_NF_CASE_MASK(NAME, NF) |
#define | INST_NF_CASE_FF(NAME, NF) |
#define | INST_NF_CASE_FF_MASK(NAME, NF) |
#define | INST_ALL_NF_CASE_BASE(MACRO_NAME, NAME) |
#define | INST_ALL_NF_CASE(NAME) |
#define | INST_ALL_NF_CASE_WITH_FF(NAME) |
#define | CASE_VMSLT_OPCODES(lmulenum, suffix) |
#define | CASE_VMNAND_VMSET_OPCODES(lmulenum, suffix) |
#define | CASE_VMSLT_OPCODES(lmulenum, suffix) |
#define | CASE_VMXOR_VMANDN_VMOR_OPCODES(lmulenum, suffix) |
Variables | |
static cl::opt< bool > | UsePseudoMovImm ("riscv-use-rematerializable-movimm", cl::Hidden, cl::desc("Use a rematerializable pseudoinstruction for 2 instruction " "constant materialization"), cl::init(false)) |
#define CASE_VMNAND_VMSET_OPCODES | ( | lmulenum, | |
suffix | |||
) |
#define CASE_VMSLT_OPCODES | ( | lmulenum, | |
suffix | |||
) |
#define CASE_VMSLT_OPCODES | ( | lmulenum, | |
suffix | |||
) |
#define CASE_VMXOR_VMANDN_VMOR_OPCODES | ( | lmulenum, | |
suffix | |||
) |
#define DEBUG_TYPE "riscv-isel" |
Definition at line 28 of file RISCVISelDAGToDAG.cpp.
#define GET_RISCVVLETable_IMPL |
Definition at line 42 of file RISCVISelDAGToDAG.cpp.
#define GET_RISCVVLSEGTable_IMPL |
Definition at line 39 of file RISCVISelDAGToDAG.cpp.
#define GET_RISCVVLXSEGTable_IMPL |
Definition at line 40 of file RISCVISelDAGToDAG.cpp.
#define GET_RISCVVLXTable_IMPL |
Definition at line 44 of file RISCVISelDAGToDAG.cpp.
#define GET_RISCVVSETable_IMPL |
Definition at line 43 of file RISCVISelDAGToDAG.cpp.
#define GET_RISCVVSSEGTable_IMPL |
Definition at line 38 of file RISCVISelDAGToDAG.cpp.
#define GET_RISCVVSXSEGTable_IMPL |
Definition at line 41 of file RISCVISelDAGToDAG.cpp.
#define GET_RISCVVSXTable_IMPL |
Definition at line 45 of file RISCVISelDAGToDAG.cpp.
#define INST_ALL_NF_CASE | ( | NAME | ) |
#define INST_ALL_NF_CASE_BASE | ( | MACRO_NAME, | |
NAME | |||
) |
#define INST_ALL_NF_CASE_WITH_FF | ( | NAME | ) |
#define INST_NF_CASE | ( | NAME, | |
NF | |||
) |
#define INST_NF_CASE_FF | ( | NAME, | |
NF | |||
) |
#define INST_NF_CASE_FF_MASK | ( | NAME, | |
NF | |||
) |
#define INST_NF_CASE_MASK | ( | NAME, | |
NF | |||
) |
#define PASS_NAME "RISC-V DAG->DAG Pattern Instruction Selection" |
Definition at line 29 of file RISCVISelDAGToDAG.cpp.
Definition at line 3519 of file RISCVISelDAGToDAG.cpp.
References assert(), llvm::ISD::INSERT_SUBVECTOR, N, llvm::Splat, llvm::RISCVISD::VMV_S_X_VL, and llvm::RISCVISD::VMV_V_X_VL.
Referenced by llvm::RISCVDAGToDAGISel::selectVSplat(), and selectVSplatImmHelper().
Definition at line 3750 of file RISCVISelDAGToDAG.cpp.
References llvm::ISD::CopyToReg, llvm::SDNode::getMachineOpcode(), llvm::SDValue::getNode(), llvm::SDNode::getOperand(), getReg(), and llvm::SDNode::isMachineOpcode().
Referenced by usesAllOnesMask().
Definition at line 799 of file RISCVISelDAGToDAG.cpp.
References INST_ALL_NF_CASE, INST_ALL_NF_CASE_WITH_FF, and llvm_unreachable.
Referenced by llvm::RISCVDAGToDAGISel::Select().
Definition at line 3816 of file RISCVISelDAGToDAG.cpp.
References llvm::RISCV::getRVVMCOpcode().
Definition at line 3804 of file RISCVISelDAGToDAG.cpp.
References I, and isImplicitDef().
Referenced by isImplicitDef().
Definition at line 3881 of file RISCVISelDAGToDAG.cpp.
References llvm::RISCV::getRVVMCOpcode(), and N.
Definition at line 2616 of file RISCVISelDAGToDAG.cpp.
References llvm::Add, llvm::ISD::ATOMIC_LOAD, llvm::ISD::ATOMIC_STORE, llvm::EVT::isScalarInteger(), llvm::ISD::LOAD, and llvm::ISD::STORE.
Referenced by llvm::RISCVDAGToDAGISel::SelectAddrRegImm().
|
static |
Definition at line 2558 of file RISCVISelDAGToDAG.cpp.
References Addr, assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::sampleprof::Base, DL, llvm::SmallVectorBase< Size_T >::empty(), llvm::RISCVMatInt::generateInstSeq(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getRegister(), llvm::SelectionDAG::getSignedTargetConstant(), llvm::SelectionDAG::getTargetConstant(), llvm::Hi, llvm::RISCVSubtarget::is64Bit(), llvm::Offset, llvm::SmallVectorTemplateBase< T, bool >::pop_back(), and selectImmSeq().
Referenced by llvm::RISCVDAGToDAGISel::SelectAddrRegImm(), and llvm::RISCVDAGToDAGISel::SelectAddrRegImmLsb00000().
|
static |
Definition at line 204 of file RISCVISelDAGToDAG.cpp.
References DL, llvm::SmallVectorBase< Size_T >::empty(), llvm::RISCVMatInt::generateInstSeq(), llvm::RISCVMatInt::generateTwoRegInstSeq(), llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getSignedTargetConstant(), llvm::SelectionDAG::getTargetConstant(), llvm::Lo, selectImmSeq(), llvm::SmallVectorBase< Size_T >::size(), and UsePseudoMovImm.
Referenced by llvm::RISCVDAGToDAGISel::Select(), llvm::RISCVDAGToDAGISel::selectInvLogicImm(), and llvm::RISCVDAGToDAGISel::selectScalarFPAsInt().
|
static |
Definition at line 175 of file RISCVISelDAGToDAG.cpp.
References DL, llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getRegister(), llvm::SelectionDAG::getSignedTargetConstant(), llvm::RISCVMatInt::Imm, llvm::RISCVMatInt::RegImm, llvm::RISCVMatInt::RegReg, and llvm::RISCVMatInt::RegX0.
Referenced by selectConstantAddr(), and selectImm().
|
static |
Definition at line 3543 of file RISCVISelDAGToDAG.cpp.
References assert(), findVSplat(), llvm::APInt::getSExtValue(), llvm::SelectionDAG::getSignedTargetConstant(), llvm::RISCVSubtarget::getXLenVT(), N, and llvm::Splat.
Referenced by llvm::RISCVDAGToDAGISel::selectVSplatSimm5(), llvm::RISCVDAGToDAGISel::selectVSplatSimm5Plus1(), llvm::RISCVDAGToDAGISel::selectVSplatSimm5Plus1NonZero(), and llvm::RISCVDAGToDAGISel::selectVSplatUimm().
Definition at line 3799 of file RISCVISelDAGToDAG.cpp.
References N, and usesAllOnesMask().
Definition at line 3778 of file RISCVISelDAGToDAG.cpp.
References llvm::SDValue::getMachineOpcode(), getMaskSetter(), and llvm::SDNode::isMachineOpcode().
Referenced by usesAllOnesMask().
|
static |
Definition at line 3268 of file RISCVISelDAGToDAG.cpp.
References assert(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::RISCV::getRVVMCOpcode(), llvm::RISCV::getVectorLowDemandedScalarBits(), llvm::RISCVII::hasSEWOp(), llvm::RISCVII::hasVecPolicyOp(), llvm::RISCVII::hasVLOp(), TII, and llvm::MCInstrDesc::TSFlags.
Referenced by llvm::RISCVDAGToDAGISel::hasAllNBitUsers().
|
static |
Referenced by selectImm().