|
LLVM
4.0.0
|
Custom DAG lowering for SI. More...
#include "AMDGPU.h"#include "AMDGPUIntrinsicInfo.h"#include "AMDGPUSubtarget.h"#include "SIDefines.h"#include "SIISelLowering.h"#include "SIInstrInfo.h"#include "SIMachineFunctionInfo.h"#include "SIRegisterInfo.h"#include "llvm/ADT/BitVector.h"#include "llvm/ADT/StringSwitch.h"#include "llvm/CodeGen/CallingConvLower.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/SelectionDAG.h"#include "llvm/CodeGen/Analysis.h"#include "llvm/IR/DiagnosticInfo.h"#include "llvm/IR/Function.h"Go to the source code of this file.
Variables | |
| static cl::opt< bool > | EnableVGPRIndexMode ("amdgpu-vgpr-index-mode", cl::desc("Use GPR indexing mode instead of movrel for vector indexing"), cl::init(false)) |
Custom DAG lowering for SI.
Definition in file SIISelLowering.cpp.
Definition at line 3508 of file SIISelLowering.cpp.
References llvm::ISD::AND, llvm::ISD::OR, and llvm::ISD::XOR.
|
static |
Definition at line 2222 of file SIISelLowering.cpp.
References llvm::SelectionDAG::getNode(), llvm::SelectionDAG::getTargetGlobalAddress(), llvm::MVT::i32, llvm::SIInstrInfo::MO_NONE, and llvm::AMDGPUISD::PC_ADD_REL_OFFSET.
|
static |
Definition at line 4392 of file SIISelLowering.cpp.
References llvm::SelectionDAG::getMachineNode(), llvm::SelectionDAG::getTargetConstant(), and llvm::MVT::i32.
Referenced by llvm::SITargetLowering::buildRSRC(), and llvm::SITargetLowering::wrapAddr64Rsrc().
|
static |
Return true if the given offset Size in bytes can be folded into the immediate offsets of a memory instruction for the given address space.
Definition at line 3413 of file SIISelLowering.cpp.
References AMDGPUAS::CONSTANT_ADDRESS, llvm::AMDGPUSubtarget::getGeneration(), AMDGPUAS::GLOBAL_ADDRESS, llvm::isUInt< 16 >(), llvm::isUInt< 8 >(), AMDGPUAS::LOCAL_ADDRESS, AMDGPUAS::PRIVATE_ADDRESS, AMDGPUAS::REGION_ADDRESS, and llvm::AMDGPUSubtarget::VOLCANIC_ISLANDS.
|
static |
Definition at line 1435 of file SIISelLowering.cpp.
References llvm::TargetRegisterClass::getSize().
Referenced by emitIndirectDst(), and emitIndirectSrc().
|
static |
Definition at line 1606 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), addOperand(), llvm::MachineInstrBuilder::addOperand(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::clearKillFlags(), computeIndirectRegAndOffset(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::RegState::Define, llvm::VGPRIndexMode::DST_ENABLE, EnableVGPRIndexMode, llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::SISubtarget::getInstrInfo(), getMOVRELDPseudo(), llvm::SIInstrInfo::getNamedOperand(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::SIInstrInfo::getRegisterInfo(), llvm::SISubtarget::hasVGPRIndexMode(), I, llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, llvm::MachineOperand::isReg(), loadM0FromVGPR(), MBB, Offset, llvm::MachineOperand::setIsUndef(), setM0ToIndexFromSGPR(), SubReg, TII, and llvm::RegState::Undef.
Referenced by llvm::SITargetLowering::EmitInstrWithCustomInserter().
|
static |
Definition at line 1507 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), computeIndirectRegAndOffset(), llvm::MachineRegisterInfo::createVirtualRegister(), EnableVGPRIndexMode, llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::SISubtarget::getInstrInfo(), llvm::SIInstrInfo::getNamedOperand(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineFunction::getRegInfo(), llvm::SIInstrInfo::getRegisterInfo(), llvm::SISubtarget::hasVGPRIndexMode(), I, llvm::RegState::Implicit, loadM0FromVGPR(), MBB, llvm::MachineOperand::setIsUndef(), setM0ToIndexFromSGPR(), llvm::VGPRIndexMode::SRC0_ENABLE, SubReg, TII, and llvm::RegState::Undef.
Referenced by llvm::SITargetLowering::EmitInstrWithCustomInserter().
|
static |
Definition at line 1284 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::getUndefRegState(), I, llvm::MachineOperand::isUndef(), llvm::RegState::Kill, llvm::MachineOperand::setIsUndef(), and llvm::MachineRegisterInfo::setSimpleHint().
Referenced by loadM0FromVGPR().
|
static |
Definition at line 2342 of file SIISelLowering.cpp.
References llvm::LLVMContext::diagnose(), llvm::SelectionDAG::getContext(), llvm::SDLoc::getDebugLoc(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getMachineFunction(), and llvm::SelectionDAG::getUNDEF().
|
static |
Definition at line 2350 of file SIISelLowering.cpp.
References llvm::LLVMContext::diagnose(), llvm::SelectionDAG::getContext(), llvm::SDLoc::getDebugLoc(), llvm::MachineFunction::getFunction(), llvm::SelectionDAG::getMachineFunction(), and llvm::SelectionDAG::getUNDEF().
Definition at line 47 of file SIISelLowering.cpp.
References llvm::CCState::isAllocated(), and llvm_unreachable.
Referenced by llvm::SITargetLowering::LowerFormalArguments().
Helper function for LowerBRCOND.
Definition at line 1920 of file SIISelLowering.cpp.
References E, llvm::SDValue::getNode(), I, llvm::SDNode::use_begin(), and llvm::SDNode::use_end().
|
static |
Definition at line 3006 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(), llvm::MVT::Glue, llvm_unreachable, and llvm::MVT::Other.
|
static |
Definition at line 3026 of file SIISelLowering.cpp.
References A, assert(), B, C, llvm::ISD::FMA, llvm::AMDGPUISD::FMA_W_CHAIN, llvm::SelectionDAG::getNode(), llvm::SDNode::getNumValues(), llvm::SDValue::getValue(), llvm::SelectionDAG::getVTList(), llvm::MVT::Glue, llvm_unreachable, and llvm::MVT::Other.
|
static |
Definition at line 1589 of file SIISelLowering.cpp.
References llvm::TargetRegisterClass::getSize(), and llvm_unreachable.
Referenced by emitIndirectDst().
Definition at line 612 of file SIISelLowering.cpp.
References AMDGPUAS::CONSTANT_ADDRESS, AMDGPUAS::FLAT_ADDRESS, and AMDGPUAS::GLOBAL_ADDRESS.
Referenced by llvm::SITargetLowering::isNoopAddrSpaceCast().
Definition at line 4270 of file SIISelLowering.cpp.
References llvm::ISD::AssertZext, llvm::SDValue::getOpcode(), and llvm::SDValue::getOperand().
Referenced by llvm::SITargetLowering::legalizeTargetIndependentNode().
|
static |
Definition at line 3812 of file SIISelLowering.cpp.
References llvm::SelectionDAG::getTargetLoweringInfo(), llvm::TargetLoweringBase::hasFloatingPointExceptions(), and llvm::SelectionDAG::isKnownNeverNaN().
Referenced by performFPMed3ImmCombine().
|
static |
Definition at line 1379 of file SIISelLowering.cpp.
References llvm::MachineBasicBlock::addSuccessor(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MachineFunction::CreateMachineBasicBlock(), llvm::MachineRegisterInfo::createVirtualRegister(), emitLoadM0FromVGPRLoop(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::getDebugLoc(), llvm::SIInstrInfo::getNamedOperand(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), I, llvm::MachineFunction::insert(), MBB, llvm::MachineBasicBlock::splice(), and llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs().
Referenced by emitIndirectDst(), and emitIndirectSrc().
Definition at line 3755 of file SIISelLowering.cpp.
References llvm::AMDGPUISD::FMAX3, llvm::ISD::FMAXNUM, llvm::AMDGPUISD::FMIN3, llvm::ISD::FMINNUM, llvm_unreachable, 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 3819 of file SIISelLowering.cpp.
References llvm::APFloatBase::cmpGreaterThan, llvm::APFloat::compare(), llvm::dyn_cast(), llvm::AMDGPUISD::FMED3, llvm::SelectionDAG::getNode(), llvm::SDValue::getOperand(), llvm::ConstantFPSDNode::getValueAPF(), llvm::SDNode::getValueType(), and isKnownNeverSNan().
|
static |
Definition at line 3774 of file SIISelLowering.cpp.
References llvm::dyn_cast(), llvm::ConstantSDNode::getAPIntValue(), llvm::SelectionDAG::getNode(), llvm::SDValue::getOperand(), llvm::SDNode::getOperand(), llvm::SDNode::getValueType(), llvm::MVT::i16, llvm::MVT::i32, llvm::APInt::sge(), llvm::ISD::SIGN_EXTEND, llvm::AMDGPUISD::SMED3, llvm::ISD::TRUNCATE, llvm::APInt::uge(), llvm::AMDGPUISD::UMED3, and llvm::ISD::ZERO_EXTEND.
|
static |
Definition at line 1450 of file SIISelLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), addOperand(), assert(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::VGPRIndexMode::DST_ENABLE, llvm::MachineInstr::getDebugLoc(), llvm::SIInstrInfo::getNamedOperand(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::SIInstrInfo::getRegisterInfo(), I, llvm::SIRegisterInfo::isSGPRClass(), llvm::RegState::Kill, MBB, llvm::MachineOperand::setIsUndef(), and llvm::VGPRIndexMode::SRC0_ENABLE.
Referenced by emitIndirectDst(), and emitIndirectSrc().
Helper function for adjustWritemask.
Definition at line 4178 of file SIISelLowering.cpp.
|
static |
Referenced by emitIndirectDst(), and emitIndirectSrc().
1.8.6