LLVM 22.0.0git
|
Custom DAG lowering for SI. More...
#include "SIISelLowering.h"
#include "AMDGPU.h"
#include "AMDGPUInstrInfo.h"
#include "AMDGPULaneMaskUtils.h"
#include "AMDGPUTargetMachine.h"
#include "GCNSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "SIMachineFunctionInfo.h"
#include "SIRegisterInfo.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/UniformityAnalysis.h"
#include "llvm/CodeGen/Analysis.h"
#include "llvm/CodeGen/ByteProvider.h"
#include "llvm/CodeGen/FunctionLoweringInfo.h"
#include "llvm/CodeGen/GlobalISel/GISelValueTracking.h"
#include "llvm/CodeGen/GlobalISel/GenericMachineInstrs.h"
#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/SDPatternMatch.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/IntrinsicsR600.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Support/ModRef.h"
#include "llvm/Transforms/Utils/LowerAtomic.h"
#include <optional>
Go to the source code of this file.
Classes | |
struct | DotSrc |
Macros | |
#define | DEBUG_TYPE "si-lower" |
Variables | |
static cl::opt< bool > | DisableLoopAlignment ("amdgpu-disable-loop-alignment", cl::desc("Do not align and prefetch loops"), cl::init(false)) |
static cl::opt< bool > | UseDivergentRegisterIndexing ("amdgpu-use-divergent-register-indexing", cl::Hidden, cl::desc("Use indirect register addressing for divergent indexes"), cl::init(false)) |
static cl::opt< bool > | UseSelectionDAGPTRADD ("amdgpu-use-sdag-ptradd", cl::Hidden, cl::desc("Generate ISD::PTRADD nodes for 64-bit pointer arithmetic in the " "SelectionDAG ISel"), cl::init(false)) |
Custom DAG lowering for SI.
Definition in file SIISelLowering.cpp.
#define DEBUG_TYPE "si-lower" |
Definition at line 53 of file SIISelLowering.cpp.
Definition at line 15654 of file SIISelLowering.cpp.
References assert(), and llvm::First.
Referenced by placeSources(), and resolveSources().
|
static |
Definition at line 13725 of file SIISelLowering.cpp.
References assert().
Referenced by hasNon16BitAccesses().
|
static |
Definition at line 11776 of file SIISelLowering.cpp.
References Info.
|
static |
Definition at line 6880 of file SIISelLowering.cpp.
References llvm::EVT::changeTypeToInteger(), DL, llvm::SelectionDAG::ExtractVectorElements(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getPOISON(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::EVT::isVector(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::ISD::TRUNCATE.
Referenced by constructRetValue().
|
static |
Definition at line 2769 of file SIISelLowering.cpp.
References llvm::MachineFunction::addLiveIn(), llvm::CCState::AllocateReg(), assert(), llvm::CCState::getMachineFunction(), and Reg.
Referenced by allocateSGPR32Input(), and allocateSGPR64Input().
|
static |
Definition at line 2778 of file SIISelLowering.cpp.
References allocateFixedSGPRInputImpl(), allocateSGPR32InputImpl(), and llvm::ArgDescriptor::getRegister().
Referenced by llvm::SITargetLowering::allocateSpecialInputSGPRs().
|
static |
Definition at line 2749 of file SIISelLowering.cpp.
References llvm::MachineFunction::addLiveIn(), llvm::CCState::AllocateReg(), llvm::ArrayRef(), assert(), llvm::TargetRegisterClass::begin(), llvm::ArgDescriptor::createRegister(), llvm::CCState::getFirstUnallocated(), llvm::CCState::getMachineFunction(), Reg, llvm::report_fatal_error(), and llvm::ArrayRef< T >::size().
Referenced by allocateSGPR32Input(), and allocateSGPR64Input().
|
static |
Definition at line 2786 of file SIISelLowering.cpp.
References allocateFixedSGPRInputImpl(), allocateSGPR32InputImpl(), and llvm::ArgDescriptor::getRegister().
Referenced by llvm::SITargetLowering::allocateSpecialInputSGPRs().
|
static |
Definition at line 2725 of file SIISelLowering.cpp.
References llvm::MachineFunction::addLiveIn(), llvm::CCState::AllocateReg(), llvm::CCState::AllocateStack(), llvm::ArrayRef(), assert(), llvm::ArgDescriptor::createArg(), llvm::ArgDescriptor::createRegister(), llvm::ArgDescriptor::createStack(), llvm::CCState::getFirstUnallocated(), llvm::CCState::getMachineFunction(), llvm::MachineFunction::getRegInfo(), llvm::Offset, Reg, llvm::LLT::scalar(), llvm::MachineRegisterInfo::setType(), and llvm::ArrayRef< T >::size().
Referenced by llvm::SITargetLowering::allocateSpecialInputVGPRs().
|
static |
Definition at line 18302 of file SIISelLowering.cpp.
References Flt, llvm::Function::getDenormalMode(), llvm::Type::getFltSemantics(), llvm::Function::getFnAttribute(), llvm::Instruction::getFunction(), llvm::DenormalMode::getPreserveSign(), llvm::Type::getScalarType(), llvm::Value::getType(), llvm::Attribute::getValueAsBool(), and llvm::Instruction::hasMetadata().
Referenced by llvm::SITargetLowering::shouldExpandAtomicRMWInIR().
|
static |
Definition at line 18406 of file SIISelLowering.cpp.
References llvm::TargetLoweringBase::CmpXChg, llvm::Value::getType(), isAtomicRMWLegalIntTy(), and llvm::TargetLoweringBase::None.
Referenced by llvm::SITargetLowering::shouldExpandAtomicRMWInIR().
Definition at line 13004 of file SIISelLowering.cpp.
References llvm::ISD::AND, Opc, llvm::ISD::OR, and llvm::ISD::XOR.
|
static |
Definition at line 8810 of file SIISelLowering.cpp.
References assert(), DL, llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getSubtarget(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::isInt(), llvm::SIInstrInfo::MO_NONE, llvm::Offset, llvm::AMDGPUISD::PC_ADD_REL_OFFSET, llvm::AMDGPUISD::PC_ADD_REL_OFFSET64, and Ptr.
|
static |
Definition at line 17433 of file SIISelLowering.cpp.
References DL, llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getTargetConstant(), and SDValue().
Referenced by llvm::SITargetLowering::buildRSRC(), and llvm::SITargetLowering::wrapAddr64Rsrc().
|
static |
Definition at line 13435 of file SIISelLowering.cpp.
References llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::BitWidth, llvm::ISD::BSWAP, calculateByteProvider(), calculateSrcByte(), llvm::cast(), llvm::ISD::CopyFromReg, llvm::Depth, llvm::dyn_cast(), llvm::ISD::EXTRACT_VECTOR_ELT, llvm::ISD::FSHR, llvm::ByteProvider< ISelOp >::getConstantZero(), llvm::SDValue::getValueSizeInBits(), LHS, llvm_unreachable, llvm::ISD::OR, llvm::AMDGPUISD::PERM, RHS, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::TRUNCATE, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZEXTLOAD.
|
static |
Definition at line 13370 of file SIISelLowering.cpp.
References calculateSrcByte(), llvm::cast(), llvm::Depth, llvm::dyn_cast(), llvm::ByteProvider< ISelOp >::getSrc(), llvm::EVT::getStoreSize(), llvm::SDValue::getValueType(), llvm::EVT::isByteSized(), llvm_unreachable, llvm::ISD::SIGN_EXTEND, llvm::ISD::SIGN_EXTEND_INREG, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::TRUNCATE, and llvm::ISD::ZERO_EXTEND.
Referenced by calculateByteProvider(), and calculateSrcByte().
|
static |
Definition at line 15834 of file SIISelLowering.cpp.
References assert(), llvm::SelectionDAG::computeKnownBits(), llvm::KnownBits::countMinLeadingZeros(), llvm::SDValue::getValueSizeInBits(), llvm_unreachable, and N.
Definition at line 17682 of file SIISelLowering.cpp.
References llvm::AMDGPU::isInlinableIntLiteral(), llvm::maskTrailingOnes(), and Size.
Referenced by llvm::APInt::APInt(), llvm::APInt::ashrInPlace(), llvm::SITargetLowering::checkAsmConstraintVal(), llvm::APInt::flipAllBits(), llvm::SITargetLowering::LowerAsmOperandForConstraint(), llvm::APInt::operator<<=(), llvm::APInt::operator=(), llvm::APInt::operator^=(), llvm::APInt::operator|=(), and llvm::APInt::setAllBits().
|
static |
Definition at line 5165 of file SIISelLowering.cpp.
References llvm::SIRegisterInfo::getSubRegFromChannel(), llvm::Offset, and TRI.
Referenced by emitIndirectDst(), and emitIndirectSrc().
|
static |
Definition at line 9026 of file SIISelLowering.cpp.
References adjustLoadValueTypeImpl(), llvm::EVT::changeTypeToInteger(), llvm::Data, DL, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::SelectionDAG::getMergeValues(), llvm::SelectionDAG::getNode(), llvm::EVT::getSizeInBits(), llvm::EVT::getVectorElementType(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::MVT::getVectorVT(), llvm::EVT::isVector(), llvm::MVT::isVector(), padEltsToUndef(), SDValue(), and llvm::ISD::TRUNCATE.
|
static |
Definition at line 19087 of file SIISelLowering.cpp.
References assert(), llvm::CastInst::CreatePointerCast(), llvm::AMDGPUAS::FLAT_ADDRESS, llvm::PointerType::get(), llvm::Type::getPointerAddressSpace(), llvm::Value::getType(), I, and llvm::AMDGPUAS::PRIVATE_ADDRESS.
Referenced by llvm::SITargetLowering::emitExpandAtomicCmpXchg(), llvm::SITargetLowering::emitExpandAtomicLoad(), llvm::SITargetLowering::emitExpandAtomicRMW(), and llvm::SITargetLowering::emitExpandAtomicStore().
|
static |
Definition at line 75 of file SIISelLowering.cpp.
References llvm::MachineFunction::getInfo(), llvm::DenormalMode::getPreserveSign(), and Info.
Referenced by llvm::SITargetLowering::denormalsEnabledForType(), llvm::SITargetLowering::denormalsEnabledForType(), llvm::SITargetLowering::isFMADLegal(), llvm::SITargetLowering::isFMADLegal(), llvm::SITargetLowering::isFMAFasterThanFMulAndFAdd(), llvm::SITargetLowering::isFPExtFoldable(), and llvm::SITargetLowering::isFPExtFoldable().
|
static |
Definition at line 80 of file SIISelLowering.cpp.
References llvm::MachineFunction::getInfo(), llvm::DenormalMode::getPreserveSign(), and Info.
Referenced by llvm::SITargetLowering::denormalsEnabledForType(), llvm::SITargetLowering::denormalsEnabledForType(), llvm::SITargetLowering::isFMADLegal(), llvm::SITargetLowering::isFMADLegal(), and llvm::SITargetLowering::isFMAFasterThanFMulAndFAdd().
Definition at line 8592 of file SIISelLowering.cpp.
References assert().
Definition at line 8597 of file SIISelLowering.cpp.
References assert().
|
static |
Definition at line 18317 of file SIISelLowering.cpp.
References DEBUG_TYPE, llvm::Value::getContext(), llvm::AtomicRMWInst::getOperation(), llvm::AtomicRMWInst::getOperationName(), and llvm::AtomicRMWInst::getSyncScopeID().
Referenced by llvm::SITargetLowering::shouldExpandAtomicRMWInIR().
|
static |
Definition at line 5306 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), computeIndirectRegAndOffset(), DL, getIndirectSGPRIdx(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), I, llvm::MachineOperand::isReg(), loadM0FromVGPR(), MBB, MI, MRI, llvm::Offset, setM0ToIndexFromSGPR(), SubReg, TII, and TRI.
Referenced by llvm::SITargetLowering::EmitInstrWithCustomInserter().
|
static |
Definition at line 5220 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), computeIndirectRegAndOffset(), DL, getIndirectSGPRIdx(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), I, llvm::RegState::Implicit, loadM0FromVGPR(), MBB, MI, MRI, llvm::Offset, setM0ToIndexFromSGPR(), SubReg, TII, and TRI.
Referenced by llvm::SITargetLowering::EmitInstrWithCustomInserter().
|
static |
Definition at line 5023 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), llvm::AMDGPU::LaneMaskConstants::AndSaveExecOpc, llvm::MachineBasicBlock::begin(), llvm::BuildMI(), DL, llvm::AMDGPU::LaneMaskConstants::ExecReg, llvm::AMDGPU::LaneMaskConstants::get(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineFunction::getSubtarget(), llvm::getUndefRegState(), I, llvm::MachineOperand::isUndef(), llvm::RegState::Kill, MRI, llvm::Offset, TII, TRI, and llvm::AMDGPU::LaneMaskConstants::XorTermOpc.
Referenced by loadM0FromVGPR().
|
static |
Definition at line 8960 of file SIISelLowering.cpp.
References llvm::LLVMContext::diagnose(), DL, llvm::SelectionDAG::getContext(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getMachineFunction(), and llvm::SelectionDAG::getPOISON().
|
static |
Definition at line 8968 of file SIISelLowering.cpp.
References llvm::LLVMContext::diagnose(), DL, llvm::SelectionDAG::getContext(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getMachineFunction(), and llvm::SelectionDAG::getPOISON().
|
static |
Definition at line 5409 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), MI, MRI, Opc, TII, and TRI.
Referenced by llvm::SITargetLowering::EmitInstrWithCustomInserter(), and lowerWaveReduce().
Definition at line 85 of file SIISelLowering.cpp.
References llvm::CCState::isAllocated(), llvm_unreachable, and Reg.
Referenced by llvm::SITargetLowering::allocateSystemSGPRs().
Helper function for LowerBRCOND.
Definition at line 7482 of file SIISelLowering.cpp.
References llvm::Value::uses().
|
static |
Definition at line 15818 of file SIISelLowering.cpp.
|
static |
Return if a flat address space atomicrmw can access private memory.
Definition at line 18413 of file SIISelLowering.cpp.
References llvm::AMDGPU::hasValueInRangeLikeMetadata(), I, and llvm::AMDGPUAS::PRIVATE_ADDRESS.
Referenced by llvm::SITargetLowering::shouldExpandAtomicCmpXchgInIR(), and llvm::SITargetLowering::shouldExpandAtomicRMWInIR().
|
static |
Definition at line 17800 of file SIISelLowering.cpp.
Referenced by llvm::SITargetLowering::finalizeLowering().
MemSDNode::getBasePtr() does not work for intrinsics, which needs to offset by the chain and intrinsic ID.
Theoretically we would also need to check the specific intrinsic, but they all place the pointer operand first.
Definition at line 12971 of file SIISelLowering.cpp.
References llvm::ISD::INTRINSIC_VOID, llvm::ISD::INTRINSIC_W_CHAIN, and N.
Referenced by llvm::SITargetLowering::hasMemSDNodeUser().
|
static |
Definition at line 8976 of file SIISelLowering.cpp.
References assert(), DL, llvm::ArrayRef< T >::empty(), llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getPOISON(), llvm::SDValue::getValueType(), llvm::MVT::getVectorVT(), and llvm::ArrayRef< T >::size().
Definition at line 13079 of file SIISelLowering.cpp.
References llvm::CallingConv::C.
Referenced by getPermuteMask().
|
static |
Definition at line 1301 of file SIISelLowering.cpp.
References llvm::Acquire, llvm::acquire, llvm::cast(), llvm::CallBase::getArgOperand(), llvm::Value::getContext(), llvm::MDNode::getOperand(), llvm::LLVMContext::getOrInsertSyncScopeID(), Info, llvm::MOCooperative, llvm::MachineMemOperand::MOLoad, llvm::Monotonic, llvm::MachineMemOperand::MOStore, llvm::Release, llvm::release, llvm::seq_cst, and llvm::SequentiallyConsistent.
Referenced by llvm::SITargetLowering::getTgtMemIntrinsic().
|
static |
Scalar Type
Definition at line 13766 of file SIISelLowering.cpp.
References assert(), llvm::ISD::EXTRACT_VECTOR_ELT, llvm::SelectionDAG::ExtractVectorElements(), llvm::SelectionDAG::getBitcastedAnyExtOrTrunc(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getConstant(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getFixedValue(), llvm::MVT::getIntegerVT(), llvm::SelectionDAG::getNode(), llvm::MVT::getVectorVT(), and llvm::ISD::SRL.
Referenced by matchPERM(), and resolveSources().
Definition at line 7829 of file SIISelLowering.cpp.
References llvm::ISD::ADD, llvm::ISD::AND, llvm::ISD::ANY_EXTEND, llvm::cast(), llvm::ISD::isSignedIntSetCC(), llvm_unreachable, llvm::ISD::MUL, llvm::ISD::OR, llvm::ISD::SELECT, llvm::ISD::SETCC, llvm::ISD::SHL, llvm::ISD::SIGN_EXTEND, llvm::ISD::SMAX, llvm::ISD::SMIN, llvm::ISD::SRA, llvm::ISD::SRL, llvm::ISD::SUB, llvm::ISD::UMAX, llvm::ISD::UMIN, llvm::ISD::XOR, and llvm::ISD::ZERO_EXTEND.
|
static |
Definition at line 12038 of file SIISelLowering.cpp.
References A(), assert(), B(), llvm::ISD::FMUL, llvm::AMDGPUISD::FMUL_W_CHAIN, llvm::SelectionDAG::getNode(), llvm::SDNode::getNumValues(), llvm::SDValue::getValue(), llvm::SelectionDAG::getVTList(), and llvm_unreachable.
|
static |
Definition at line 12061 of file SIISelLowering.cpp.
References A(), assert(), B(), llvm::CallingConv::C, llvm::ISD::FMA, llvm::AMDGPUISD::FMA_W_CHAIN, llvm::SelectionDAG::getNode(), llvm::SDNode::getNumValues(), llvm::SDValue::getValue(), llvm::SelectionDAG::getVTList(), and llvm_unreachable.
Definition at line 5460 of file SIISelLowering.cpp.
References llvm_unreachable, and Opc.
Referenced by lowerWaveReduce().
Definition at line 5483 of file SIISelLowering.cpp.
References llvm_unreachable, and Opc.
Referenced by lowerWaveReduce().
|
static |
Definition at line 5201 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), DL, llvm::MachineOperand::getReg(), I, MBB, MI, MRI, llvm::Offset, and TII.
Referenced by emitIndirectDst(), and emitIndirectSrc().
Definition at line 1272 of file SIISelLowering.cpp.
References llvm_unreachable.
Referenced by llvm::SITargetLowering::getTgtMemIntrinsic().
|
static |
Definition at line 11687 of file SIISelLowering.cpp.
References llvm::ISD::ANY_EXTEND, llvm::EVT::bitsLT(), llvm::ISD::EXTLOAD, llvm::SelectionDAG::getNode(), llvm_unreachable, llvm::ISD::NON_EXTLOAD, llvm::ISD::SEXTLOAD, llvm::ISD::SIGN_EXTEND, llvm::ISD::TRUNCATE, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZEXTLOAD.
|
static |
Definition at line 15432 of file SIISelLowering.cpp.
References llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getVTList(), llvm::AMDGPUISD::MAD_I64_I32, llvm::AMDGPUISD::MAD_U64_U32, Signed, and llvm::ISD::TRUNCATE.
Referenced by tryFoldMADwithSRL().
Definition at line 13103 of file SIISelLowering.cpp.
References llvm::ISD::AND, assert(), llvm::CallingConv::C, llvm::dyn_cast(), getConstantPermuteMask(), llvm::ConstantSDNode::getZExtValue(), llvm::ISD::OR, llvm::ISD::SHL, and llvm::ISD::SRL.
|
static |
Definition at line 18420 of file SIISelLowering.cpp.
References llvm::TargetLoweringBase::CustomExpand, llvm::GCNSubtarget::hasGloballyAddressableScratch(), and llvm::TargetLoweringBase::NotAtomic.
Referenced by llvm::SITargetLowering::shouldExpandAtomicCmpXchgInIR(), llvm::SITargetLowering::shouldExpandAtomicLoadInIR(), llvm::SITargetLowering::shouldExpandAtomicRMWInIR(), and llvm::SITargetLowering::shouldExpandAtomicStoreInIR().
|
static |
Definition at line 12179 of file SIISelLowering.cpp.
References assert(), llvm::SelectionDAG::getTargetConstant(), Info, and Mode.
|
static |
Definition at line 14785 of file SIISelLowering.cpp.
References llvm::CallingConv::C, and llvm::dyn_cast().
|
static |
RMW
, based on the properties of the target memory. Definition at line 18383 of file SIISelLowering.cpp.
References llvm::GCNSubtarget::hasEmulatedSystemScopeAtomics(), llvm::Instruction::hasMetadata(), and llvm::GCNSubtarget::supportsAgentScopeFineGrainedRemoteMemoryAtomics().
Referenced by llvm::SITargetLowering::shouldExpandAtomicRMWInIR().
|
static |
Definition at line 15642 of file SIISelLowering.cpp.
References calculateByteProvider().
|
static |
Definition at line 18753 of file SIISelLowering.cpp.
References llvm::dyn_cast(), hasCFUser(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::isa(), and IT.
Referenced by hasCFUser(), and llvm::SITargetLowering::requiresUniformRegister().
Definition at line 13744 of file SIISelLowering.cpp.
References addresses16Bits(), isExtendedFrom16Bits(), and llvm::peekThroughBitcasts().
Referenced by matchPERM().
Definition at line 5506 of file SIISelLowering.cpp.
References Opc.
Referenced by lowerWaveReduce().
Definition at line 18349 of file SIISelLowering.cpp.
References llvm::dyn_cast(), and IT.
Referenced by atomicSupportedIfLegalIntType(), and isAtomicRMWLegalXChgTy().
|
static |
Definition at line 18359 of file SIISelLowering.cpp.
References DL, llvm::dyn_cast(), llvm::Module::getDataLayout(), llvm::Instruction::getFunction(), llvm::GlobalValue::getParent(), llvm::Value::getType(), and isAtomicRMWLegalIntTy().
Referenced by llvm::SITargetLowering::shouldExpandAtomicRMWInIR().
Definition at line 14992 of file SIISelLowering.cpp.
References A(), B(), and llvm::dyn_cast().
|
static |
Definition at line 18184 of file SIISelLowering.cpp.
References assert(), llvm::ISD::CopyFromReg, and N.
Referenced by llvm::SITargetLowering::isSDNodeSourceOfDivergence().
Definition at line 13699 of file SIISelLowering.cpp.
References llvm::ISD::ANY_EXTEND, llvm::cast(), llvm::ISD::EXTLOAD, llvm::SDValue::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::EVT::getSizeInBits(), llvm::SDValue::getValueType(), llvm::EVT::isVector(), llvm::ISD::SEXTLOAD, llvm::ISD::SIGN_EXTEND, llvm::ISD::ZERO_EXTEND, and llvm::ISD::ZEXTLOAD.
Referenced by hasNon16BitAccesses().
Definition at line 17120 of file SIISelLowering.cpp.
References llvm::ISD::AssertZext, and llvm::isa().
Referenced by llvm::SITargetLowering::legalizeTargetIndependentNode().
Definition at line 17643 of file SIISelLowering.cpp.
References llvm::StringRef::size().
Referenced by llvm::SITargetLowering::getConstraintType(), and llvm::SITargetLowering::LowerAsmOperandForConstraint().
|
static |
Return true if the value is a known valid address, such that a null check is not necessary.
Definition at line 8214 of file SIISelLowering.cpp.
References llvm::dyn_cast(), and llvm::isa().
Definition at line 15826 of file SIISelLowering.cpp.
References llvm::ISD::MUL, llvm::AMDGPUISD::MUL_I24, and llvm::AMDGPUISD::MUL_U24.
Definition at line 11468 of file SIISelLowering.cpp.
References llvm::ISD::ADD, llvm::SDNode::getFlags(), llvm::SDNode::getOpcode(), llvm::SDValue::getOpcode(), llvm::SDNodeFlags::hasNoUnsignedWrap(), and llvm::ISD::OR.
Definition at line 18343 of file SIISelLowering.cpp.
References llvm::dyn_cast(), llvm::VectorType::getElementType(), llvm::FixedVectorType::getNumElements(), and llvm::Type::isBFloatTy().
Referenced by llvm::SITargetLowering::shouldExpandAtomicRMWInIR().
Definition at line 18338 of file SIISelLowering.cpp.
References llvm::dyn_cast(), llvm::VectorType::getElementType(), llvm::FixedVectorType::getNumElements(), and llvm::Type::isHalfTy().
Referenced by llvm::SITargetLowering::shouldExpandAtomicRMWInIR().
Definition at line 18328 of file SIISelLowering.cpp.
References llvm::dyn_cast(), llvm::Type::isBFloatTy(), and llvm::Type::isHalfTy().
Referenced by llvm::SITargetLowering::shouldExpandAtomicRMWInIR().
|
static |
Definition at line 17965 of file SIISelLowering.cpp.
References llvm::GISelValueTracking::computeKnownBitsImpl(), llvm::Depth, llvm::KnownBits::extractBits(), llvm::getIConstantVRegValWithLookThrough(), llvm::MachineOperand::getImm(), llvm::GISelValueTracking::getMachineFunction(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm::maskTrailingOnes(), MI, MRI, llvm::Offset, llvm::KnownBits::sext(), and llvm::KnownBits::zext().
Referenced by llvm::SITargetLowering::computeKnownBitsForTargetInstr().
|
static |
Definition at line 17957 of file SIISelLowering.cpp.
References llvm::countl_zero(), llvm::MachineFunction::getFunction(), llvm::GISelValueTracking::getMachineFunction(), llvm::APInt::setHighBits(), and llvm::KnownBits::Zero.
Referenced by llvm::SITargetLowering::computeKnownBitsForTargetInstr().
|
static |
Definition at line 5115 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::addSuccessor(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineFunction::CreateMachineBasicBlock(), DL, emitLoadM0FromVGPRLoop(), llvm::AMDGPU::LaneMaskConstants::ExecReg, llvm::First, llvm::AMDGPU::LaneMaskConstants::get(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::MachineFunction::insert(), MBB, MBBI, MI, llvm::AMDGPU::LaneMaskConstants::MovOpc, MRI, llvm::Offset, splitBlockForLoop(), TII, and TRI.
Referenced by emitIndirectDst(), and emitIndirectSrc().
|
static |
Definition at line 7059 of file SIISelLowering.cpp.
References llvm::dyn_cast(), llvm::SelectionDAG::getCondCode(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getEntryNode(), llvm::SelectionDAG::getNode(), llvm::EVT::getScalarSizeInBits(), llvm::SelectionDAG::getZExtOrTrunc(), N, SDValue(), llvm::AMDGPUISD::SETCC, llvm::ISD::SETCC, and llvm::ISD::SETNE.
|
static |
Definition at line 7030 of file SIISelLowering.cpp.
References llvm::EVT::bitsEq(), llvm::SelectionDAG::getCondCode(), llvm::SelectionDAG::getContext(), llvm::getFCmpCondCode(), llvm::EVT::getIntegerVT(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getPOISON(), llvm::SITargetLowering::getSubtarget(), llvm::SDValue::getValueType(), llvm::AMDGPUSubtarget::getWavefrontSize(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::CmpInst::isFPPredicate(), llvm::TargetLoweringBase::isTypeLegal(), N, and llvm::AMDGPUISD::SETCC.
|
static |
Definition at line 6996 of file SIISelLowering.cpp.
References llvm::EVT::bitsEq(), DL, llvm::SelectionDAG::getCondCode(), llvm::SelectionDAG::getContext(), llvm::getICmpCondCode(), llvm::EVT::getIntegerVT(), llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getPOISON(), llvm::SITargetLowering::getSubtarget(), llvm::AMDGPUSubtarget::getWavefrontSize(), llvm::SelectionDAG::getZExtOrTrunc(), llvm::CmpInst::isIntPredicate(), llvm::CmpInst::isSigned(), llvm::TargetLoweringBase::isTypeLegal(), LHS, N, RHS, llvm::AMDGPUISD::SETCC, llvm::ISD::SIGN_EXTEND, and llvm::ISD::ZERO_EXTEND.
|
static |
Definition at line 7096 of file SIISelLowering.cpp.
References assert(), llvm::ISD::CONCAT_VECTORS, llvm::ISD::EXTRACT_SUBVECTOR, llvm::ISD::EXTRACT_VECTOR_ELT, llvm::SelectionDAG::getAnyExtOrTrunc(), llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getContext(), llvm::MVT::getIntegerVT(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::EVT::getSimpleVT(), llvm::EVT::getSizeInBits(), llvm::SITargetLowering::getSubtarget(), llvm::SelectionDAG::getTargetConstant(), llvm::SDValue::getValueType(), llvm::EVT::getVectorElementType(), llvm::SelectionDAG::getVectorIdxConstant(), llvm::EVT::getVectorNumElements(), llvm::EVT::getVectorVT(), llvm::MVT::getVectorVT(), llvm::ISD::INTRINSIC_WO_CHAIN, llvm::EVT::isFloatingPoint(), llvm::AMDGPU::isLegalDPALU_DPPControl(), llvm::EVT::isVector(), llvm_unreachable, N, Operands, llvm::SmallVectorTemplateBase< T, bool >::push_back(), SDValue(), and llvm::MVT::SimpleTy.
|
static |
Definition at line 5514 of file SIISelLowering.cpp.
References Accumulator, llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), DL, llvm::MachineBasicBlock::end(), Expand64BitScalarArithmetic(), getIdentityValueFor32BitWaveReduction(), getIdentityValueFor64BitWaveReduction(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), I, is32bitWaveReduceOperation(), MI, MRI, Opc, llvm::MachineInstrBuilder::setOperandDead(), splitBlockForLoop(), TII, and TRI.
Referenced by llvm::SITargetLowering::EmitInstrWithCustomInserter().
|
static |
Definition at line 13821 of file SIISelLowering.cpp.
References assert(), calculateByteProvider(), llvm::TargetLowering::DAGCombinerInfo::DAG, DL, llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getBitcastedAnyExtOrTrunc(), llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getDataLayout(), getDWordFromOffset(), llvm::MVT::getIntegerVT(), llvm::SelectionDAG::getNode(), llvm::SDValue::getValueSizeInBits(), llvm::SDValue::getValueType(), hasNon16BitAccesses(), llvm::DataLayout::isBigEndian(), llvm::EVT::isByteSized(), N, P, llvm::AMDGPUISD::PERM, llvm::SmallVectorTemplateBase< T, bool >::push_back(), SDValue(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::SITargetLowering::PerformDAGCombine().
|
static |
Definition at line 1214 of file SIISelLowering.cpp.
References assert(), DL, llvm::dyn_cast(), llvm::TargetLoweringBase::getValueType(), and llvm::EVT::getVectorVT().
Referenced by llvm::SITargetLowering::getTgtMemIntrinsic(), and memVTFromLoadIntrReturn().
|
static |
Definition at line 1230 of file SIISelLowering.cpp.
References assert(), DL, llvm::dyn_cast(), and memVTFromLoadIntrData().
Referenced by llvm::SITargetLowering::getTgtMemIntrinsic().
Definition at line 14720 of file SIISelLowering.cpp.
References llvm::AMDGPUISD::FMAX3, llvm::AMDGPUISD::FMAXIMUM3, llvm::AMDGPUISD::FMIN3, llvm::AMDGPUISD::FMINIMUM3, llvm_unreachable, Opc, llvm::ISD::SMAX, llvm::AMDGPUISD::SMAX3, llvm::ISD::SMIN, llvm::AMDGPUISD::SMIN3, llvm::ISD::UMAX, llvm::AMDGPUISD::UMAX3, llvm::ISD::UMIN, and llvm::AMDGPUISD::UMIN3.
|
static |
Definition at line 9117 of file SIISelLowering.cpp.
References llvm::ISD::ANY_EXTEND, DL, llvm::SelectionDAG::getBitcast(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getNode(), llvm::SDValue::getValueType(), I, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
static |
Definition at line 9005 of file SIISelLowering.cpp.
References DL, llvm::SelectionDAG::ExtractVectorElements(), llvm::SelectionDAG::getBuildVector(), llvm::SelectionDAG::getPOISON(), llvm::EVT::getScalarType(), llvm::EVT::isVector(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by constructRetValue().
|
static |
Definition at line 9099 of file SIISelLowering.cpp.
References llvm::cast(), DL, llvm::SDValue::getNode(), and llvm::SelectionDAG::getTargetConstant().
|
static |
Definition at line 15674 of file SIISelLowering.cpp.
References addPermMasks(), assert(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::find_if(), I, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::ByteProvider< ISelOp >::Src, and llvm::ByteProvider< ISelOp >::SrcOffset.
|
static |
Definition at line 2628 of file SIISelLowering.cpp.
References llvm::CallingConv::AMDGPU_PS, assert(), E(), llvm::ISD::InputArg::Flags, llvm::ISD::InputArg::getOrigArgIndex(), llvm::MVT::getScalarSizeInBits(), I, Info, llvm::ISD::ArgFlagsTy::isInReg(), llvm::ISD::ArgFlagsTy::isSplit(), llvm::ISD::ArgFlagsTy::isSplitEnd(), llvm::MVT::isVector(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::BitVector::set(), llvm::ISD::InputArg::Used, and llvm::ISD::InputArg::VT.
Referenced by llvm::SITargetLowering::LowerFormalArguments().
|
static |
Definition at line 3100 of file SIISelLowering.cpp.
References assert(), llvm::Function::getCallingConv(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineFrameInfo::hasCalls(), llvm::MachineFrameInfo::hasStackObjects(), Info, llvm::AMDGPU::isShader(), MRI, llvm::None, llvm::AMDGPUFunctionArgInfo::PRIVATE_SEGMENT_BUFFER, Reg, llvm::report_fatal_error(), and TRI.
Referenced by llvm::SITargetLowering::finalizeLowering().
|
static |
Definition at line 15750 of file SIISelLowering.cpp.
References addPermMasks(), assert(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SelectionDAG::getConstant(), getDWordFromOffset(), llvm::SelectionDAG::getNode(), llvm::ISD::OR, llvm::AMDGPUISD::PERM, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
|
static |
Definition at line 10180 of file SIISelLowering.cpp.
References llvm::SelectionDAG::getRegister(), llvm::GCNSubtarget::hasRestrictedSOffset(), and llvm::isNullConstant().
|
static |
Definition at line 5178 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), assert(), llvm::BuildMI(), DL, llvm::MachineOperand::getReg(), I, MBB, MI, MRI, llvm::Offset, and TII.
Referenced by emitIndirectDst(), and emitIndirectSrc().
|
static |
Definition at line 4919 of file SIISelLowering.cpp.
References llvm::MachineBasicBlock::addSuccessor(), llvm::MachineBasicBlock::begin(), llvm::MachineFunction::CreateMachineBasicBlock(), I, llvm::MachineFunction::insert(), MBB, MBBI, MI, llvm::Next, llvm::MachineBasicBlock::splice(), and llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs().
Referenced by llvm::SITargetLowering::emitGWSMemViolTestLoop(), loadM0FromVGPR(), and lowerWaveReduce().
STATISTIC | ( | NumTailCalls | , |
"Number of tail calls" | ) |
|
static |
Return the source of an fp_extend from f16 to f32, or a converted FP constant.
Definition at line 15308 of file SIISelLowering.cpp.
References llvm::APFloat::convert(), llvm::dyn_cast(), llvm::SelectionDAG::getConstantFP(), llvm::APFloatBase::IEEEhalf(), llvm::APFloatBase::rmNearestTiesToEven, and SDValue().
Helper function for adjustWritemask.
Definition at line 16923 of file SIISelLowering.cpp.
|
static |
Opc
for type VT
. Definition at line 14873 of file SIISelLowering.cpp.
References llvm::AMDGPUISD::FMAX_LEGACY, llvm::AMDGPUISD::FMIN_LEGACY, llvm::GCNSubtarget::hasMin3Max3_16(), llvm::GCNSubtarget::hasMin3Max3PKF16(), llvm::GCNSubtarget::hasMinimum3Maximum3F16(), llvm::GCNSubtarget::hasMinimum3Maximum3F32(), llvm::GCNSubtarget::hasMinimum3Maximum3PKF16(), llvm_unreachable, Opc, llvm::ISD::SMAX, llvm::ISD::SMIN, llvm::ISD::UMAX, and llvm::ISD::UMIN.
|
static |
Definition at line 15446 of file SIISelLowering.cpp.
References llvm::dyn_cast(), llvm::SDNode::getAsZExtVal(), llvm::SelectionDAG::getConstant(), getMad64_32(), llvm::SDValue::getNode(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOpcode(), llvm::SDValue::getOperand(), llvm::SDValue::getValueType(), llvm::SelectionDAG::getZeroExtendInReg(), llvm::Hi_32(), llvm::Lo_32(), SDValue(), llvm::ISD::SRL, std::swap(), and llvm::ISD::TRUNCATE.
Definition at line 14646 of file SIISelLowering.cpp.
References llvm::isa().
|
static |
Referenced by llvm::SITargetLowering::getPrefLoopAlignment().
|
static |
Referenced by llvm::SITargetLowering::shouldExpandVectorDynExt().
|
static |
Referenced by llvm::SITargetLowering::shouldPreservePtrArith().