|
LLVM
10.0.0
|
This file implements the targeting of the InstructionSelector class for AArch64. More...
#include "AArch64InstrInfo.h"#include "AArch64MachineFunctionInfo.h"#include "AArch64RegisterBankInfo.h"#include "AArch64RegisterInfo.h"#include "AArch64Subtarget.h"#include "AArch64TargetMachine.h"#include "MCTargetDesc/AArch64AddressingModes.h"#include "llvm/ADT/Optional.h"#include "llvm/CodeGen/GlobalISel/InstructionSelector.h"#include "llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h"#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"#include "llvm/CodeGen/GlobalISel/MIPatternMatch.h"#include "llvm/CodeGen/GlobalISel/Utils.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineConstantPool.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/IR/Type.h"#include "llvm/IR/IntrinsicsAArch64.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include "AArch64GenGlobalISel.inc"Go to the source code of this file.
Namespaces | |
| llvm | |
| This class represents lattice values for constants. | |
Macros | |
| #define | DEBUG_TYPE "aarch64-isel" |
| #define | GET_GLOBALISEL_PREDICATE_BITSET |
| #define | GET_GLOBALISEL_PREDICATES_DECL |
| #define | GET_GLOBALISEL_TEMPORARIES_DECL |
| #define | GET_GLOBALISEL_IMPL |
| #define | GET_GLOBALISEL_PREDICATES_INIT |
| #define | GET_GLOBALISEL_TEMPORARIES_INIT |
Functions | |
| static const TargetRegisterClass * | getMinClassForRegBank (const RegisterBank &RB, unsigned SizeInBits, bool GetAllRegSet=false) |
| Given a register bank, and size in bits, return the smallest register class that can represent that combination. More... | |
| static bool | getSubRegForClass (const TargetRegisterClass *RC, const TargetRegisterInfo &TRI, unsigned &SubReg) |
| Returns the correct subregister to use for a given register class. More... | |
| static bool | unsupportedBinOp (const MachineInstr &I, const AArch64RegisterBankInfo &RBI, const MachineRegisterInfo &MRI, const AArch64RegisterInfo &TRI) |
Check whether I is a currently unsupported binary operation: More... | |
| static unsigned | selectBinaryOp (unsigned GenericOpc, unsigned RegBankID, unsigned OpSize) |
Select the AArch64 opcode for the basic binary operation GenericOpc (such as G_OR or G_SDIV), appropriate for the register bank RegBankID and of size OpSize. More... | |
| static unsigned | selectLoadStoreUIOp (unsigned GenericOpc, unsigned RegBankID, unsigned OpSize) |
Select the AArch64 opcode for the G_LOAD or G_STORE operation GenericOpc, appropriate for the (value) register bank RegBankID and of memory access size OpSize. More... | |
| static bool | isValidCopy (const MachineInstr &I, const RegisterBank &DstBank, const MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI, const RegisterBankInfo &RBI) |
| Helper function that verifies that we have a valid copy at the end of selectCopy. More... | |
| static bool | selectSubregisterCopy (MachineInstr &I, MachineRegisterInfo &MRI, const RegisterBankInfo &RBI, Register SrcReg, const TargetRegisterClass *From, const TargetRegisterClass *To, unsigned SubReg) |
| Helper function for selectCopy. More... | |
| static std::pair< const TargetRegisterClass *, const TargetRegisterClass * > | getRegClassesForCopy (MachineInstr &I, const TargetInstrInfo &TII, MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI, const RegisterBankInfo &RBI) |
| Helper function to get the source and destination register classes for a copy. More... | |
| static bool | selectCopy (MachineInstr &I, const TargetInstrInfo &TII, MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI, const RegisterBankInfo &RBI) |
| static unsigned | selectFPConvOpc (unsigned GenericOpc, LLT DstTy, LLT SrcTy) |
| static unsigned | selectSelectOpc (MachineInstr &I, MachineRegisterInfo &MRI, const RegisterBankInfo &RBI) |
| static unsigned | selectFCMPOpc (MachineInstr &I, MachineRegisterInfo &MRI) |
| Helper function to select the opcode for a G_FCMP. More... | |
| static bool | isUnsignedICMPPred (const CmpInst::Predicate P) |
Returns true if P is an unsigned integer comparison predicate. More... | |
| static AArch64CC::CondCode | changeICMPPredToAArch64CC (CmpInst::Predicate P) |
| static void | changeFCMPPredToAArch64CC (CmpInst::Predicate P, AArch64CC::CondCode &CondCode, AArch64CC::CondCode &CondCode2) |
| static Optional< int64_t > | getVectorShiftImm (Register Reg, MachineRegisterInfo &MRI) |
| Returns the element immediate value of a vector shift operand if found. More... | |
| static Optional< int64_t > | getVectorSHLImm (LLT SrcTy, Register Reg, MachineRegisterInfo &MRI) |
| Matches and returns the shift immediate value for a SHL instruction given a shift operand. More... | |
| static bool | getLaneCopyOpcode (unsigned &CopyOpc, unsigned &ExtractSubReg, const unsigned EltSize) |
| static std::pair< unsigned, unsigned > | getInsertVecEltOpInfo (const RegisterBank &RB, unsigned EltSize) |
| Return an <Opcode, SubregIndex> pair to do an vector elt insert of a given size and RB. More... | |
| static unsigned | findIntrinsicID (MachineInstr &I) |
| Helper function to find an intrinsic ID on an a MachineInstr. More... | |
| static Optional< uint64_t > | getImmedFromMO (const MachineOperand &Root) |
| static AArch64_AM::ShiftExtendType | getShiftTypeForInst (MachineInstr &MI) |
| Given a shift instruction, return the correct shift type for that instruction. More... | |
| InstructionSelector * | llvm::createAArch64InstructionSelector (const AArch64TargetMachine &, AArch64Subtarget &, AArch64RegisterBankInfo &) |
This file implements the targeting of the InstructionSelector class for AArch64.
Definition in file AArch64InstructionSelector.cpp.
| #define DEBUG_TYPE "aarch64-isel" |
Definition at line 39 of file AArch64InstructionSelector.cpp.
| #define GET_GLOBALISEL_IMPL |
Definition at line 311 of file AArch64InstructionSelector.cpp.
| #define GET_GLOBALISEL_PREDICATE_BITSET |
Definition at line 45 of file AArch64InstructionSelector.cpp.
| #define GET_GLOBALISEL_PREDICATES_DECL |
Definition at line 298 of file AArch64InstructionSelector.cpp.
| #define GET_GLOBALISEL_PREDICATES_INIT |
| #define GET_GLOBALISEL_TEMPORARIES_DECL |
Definition at line 304 of file AArch64InstructionSelector.cpp.
| #define GET_GLOBALISEL_TEMPORARIES_INIT |
|
static |
Definition at line 926 of file AArch64InstructionSelector.cpp.
References llvm::MachineInstrBuilder::addMBB(), llvm::AArch64CC::AL, llvm::MachineIRBuilder::buildInstr(), llvm::BuildMI(), changeICMPPredToAArch64CC(), llvm::MachineInstrBuilder::constrainAllUses(), EQ, llvm::MachineInstr::eraseFromParent(), llvm::AArch64CC::GE, llvm::getConstantVRegValWithLookThrough(), llvm::MachineInstr::getDebugLoc(), llvm::RegisterBank::getID(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getPredicate(), llvm::MachineOperand::getReg(), llvm::RegisterBankInfo::getRegBank(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::MachineRegisterInfo::getVRegDef(), llvm::AArch64CC::GT, llvm::AArch64CC::HI, I, llvm::AArch64CC::LE, llvm_unreachable, llvm::AArch64CC::LS, llvm::AArch64CC::LT, MI, MRI, llvm::AArch64CC::NE, llvm::AArch64CC::PL, std::swap(), TII, TRI, llvm::AArch64CC::VC, and llvm::AArch64CC::VS.
Referenced by getInsertVecEltOpInfo(), and getVectorSHLImm().
|
static |
Definition at line 899 of file AArch64InstructionSelector.cpp.
References EQ, llvm::AArch64CC::GE, llvm::AArch64CC::GT, llvm::AArch64CC::HI, llvm::AArch64CC::HS, llvm::AArch64CC::LE, llvm_unreachable, llvm::AArch64CC::LO, llvm::AArch64CC::LS, llvm::AArch64CC::LT, and llvm::AArch64CC::NE.
Referenced by changeFCMPPredToAArch64CC(), and getInsertVecEltOpInfo().
|
static |
Helper function to find an intrinsic ID on an a MachineInstr.
Returns the ID if it exists, and 0 otherwise.
Definition at line 4049 of file AArch64InstructionSelector.cpp.
References llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildInstr(), llvm::RegisterBankInfo::constrainGenericRegister(), llvm::constrainSelectedInstRegOperands(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineInstr::eraseFromParent(), llvm::find_if(), llvm::RegisterBank::getID(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::RegisterBankInfo::getRegBank(), llvm::LLT::getSizeInBits(), llvm::MachineRegisterInfo::getType(), MRI, llvm::MachineInstr::operands(), llvm::MachineInstr::operands_end(), TII, and TRI.
|
static |
Definition at line 4136 of file AArch64InstructionSelector.cpp.
References llvm::all_of(), assert(), llvm::MipsISD::Ext, llvm::ConstantInt::getBitWidth(), llvm::MachineOperand::getCImm(), llvm::getConstantVRegValWithLookThrough(), llvm::getDefIgnoringCopies(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getMF(), llvm::MachineInstr::getOpcode(), llvm::getOpcodeDef(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::ConstantInt::getSExtValue(), llvm::AArch64_AM::getShifterImm(), llvm::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::MachineRegisterInfo::getVRegDef(), llvm::ConstantInt::getZExtValue(), llvm::Function::hasMinSize(), llvm::MachineRegisterInfo::hasOneUse(), llvm::AArch64_AM::InvalidShiftExtend, llvm::MachineOperand::isCImm(), llvm::MachineOperand::isImm(), llvm::isPowerOf2_32(), llvm::MachineOperand::isReg(), llvm::Log2_32(), llvm::AArch64_AM::LSL, MI, MRI, None, Size, std::swap(), llvm::AArch64_AM::SXTW, and llvm::MachineRegisterInfo::use_instructions().
Referenced by getShiftTypeForInst().
|
static |
Return an <Opcode, SubregIndex> pair to do an vector elt insert of a given size and RB.
Definition at line 3208 of file AArch64InstructionSelector.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addUse(), llvm::AArch64CC::AL, llvm::all_of(), assert(), llvm::MachineIRBuilder::buildInstr(), changeFCMPPredToAArch64CC(), changeICMPPredToAArch64CC(), Concat, llvm::RegisterBankInfo::constrainGenericRegister(), llvm::constrainSelectedInstRegOperands(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::dbgs(), DefMI, llvm::numbers::e, llvm::SmallVectorImpl< T >::emplace_back(), llvm::AArch64_AM::encodeLogicalImmediate(), EQ, llvm::MachineInstr::eraseFromParent(), llvm::getConstantVRegValWithLookThrough(), llvm::Function::getContext(), llvm::getDefIgnoringCopies(), llvm::LLT::getElementType(), llvm::AArch64_AM::getFP32Imm(), llvm::AArch64_AM::getFP64Imm(), llvm::MachineFunction::getFunction(), llvm::RegisterBank::getID(), llvm::MachineIRBuilder::getMF(), getMinClassForRegBank(), llvm::MachineIRBuilder::getMRI(), llvm::LLT::getNumElements(), llvm::MachineInstr::getOpcode(), llvm::getOpcodeDef(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getPredicate(), llvm::MachineOperand::getReg(), llvm::RegisterBankInfo::getRegBank(), llvm::MachineFunction::getRegInfo(), llvm::MachineOperand::getShuffleMask(), llvm::LLT::getSizeInBits(), llvm::getSizeInBits(), getSubRegForClass(), llvm::MachineRegisterInfo::getTargetRegisterInfo(), llvm::MachineRegisterInfo::getType(), llvm::MachineRegisterInfo::getVRegDef(), llvm::MachineRegisterInfo::hasOneUse(), I, llvm::AArch64_AM::isLogicalImmediate(), llvm::LLT::isPointer(), llvm::MachineOperand::isPredicate(), llvm::MachineOperand::isReg(), llvm::LLT::isScalar(), isUnsignedICMPPred(), llvm::LLT::isVector(), LLVM_DEBUG, llvm_unreachable, llvm::MIPatternMatch::m_ICst(), llvm::BitmaskEnumDetail::Mask(), llvm::MIPatternMatch::mi_match(), MRI, llvm::AArch64CC::NE, llvm::None, None, P, Reg, Register, selectFCMPOpc(), selectSelectOpc(), llvm::MachineInstr::setDesc(), llvm::MachineOperand::setReg(), SubReg, TII, llvm::SystemZISD::TM, TRI, and Widen().
|
static |
Definition at line 2875 of file AArch64InstructionSelector.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addUse(), llvm::AArch64ISD::ADRP, assert(), llvm::MachineIRBuilder::buildInstr(), llvm::BuildMI(), llvm::RegisterBankInfo::constrainGenericRegister(), llvm::constrainSelectedInstRegOperands(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::dbgs(), llvm::MachineInstr::eraseFromParent(), llvm::MachineFunction::getConstantPool(), llvm::MachineConstantPool::getConstantPoolIndex(), llvm::getConstantVRegValWithLookThrough(), llvm::MachineIRBuilder::getDataLayout(), llvm::MachineFunction::getDataLayout(), llvm::MachineInstr::getDebugLoc(), llvm::RegisterBank::getID(), llvm::MachineIRBuilder::getMF(), llvm::MachineIRBuilder::getMRI(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::DataLayout::getPrefTypeAlignment(), llvm::MachineOperand::getReg(), llvm::RegisterBankInfo::getRegBank(), llvm::MachineRegisterInfo::getRegClassOrNull(), llvm::LLT::getSizeInBits(), llvm::Value::getType(), llvm::MachineRegisterInfo::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::DataLayout::getTypeStoreSize(), llvm::LLT::isScalar(), llvm::LLT::isVector(), LLVM_DEBUG, llvm::AArch64II::MO_NC, llvm::AArch64II::MO_PAGE, llvm::AArch64II::MO_PAGEOFF, MRI, llvm::SmallVectorTemplateBase< T >::push_back(), selectUnmergeValues(), TII, and TRI.
|
static |
Given a register bank, and size in bits, return the smallest register class that can represent that combination.
Definition at line 363 of file AArch64InstructionSelector.cpp.
References llvm::RegisterBank::getID().
Referenced by getInsertVecEltOpInfo(), getRegClassesForCopy(), and selectCopy().
|
static |
Helper function to get the source and destination register classes for a copy.
Returns a std::pair containing the source register class for the copy, and the destination register class for the copy. If a register class cannot be determined, then it will be nullptr.
Definition at line 645 of file AArch64InstructionSelector.cpp.
References getMinClassForRegBank(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and llvm::RegisterBankInfo::getRegBank().
Referenced by selectCopy().
|
static |
Given a shift instruction, return the correct shift type for that instruction.
Definition at line 4657 of file AArch64InstructionSelector.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::AArch64_AM::ASR, assert(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::AArch64_AM::encodeLogicalImmediate(), llvm::MipsISD::Ext, llvm::AArch64_AM::getArithExtendImm(), llvm::MachineOperand::getCImm(), llvm::getConstantVRegVal(), llvm::getDefIgnoringCopies(), getImmedFromMO(), llvm::MachineIRBuilder::getMRI(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::AArch64_AM::getShifterImm(), llvm::LLT::getSizeInBits(), llvm::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::MachineRegisterInfo::getVRegDef(), llvm::ConstantInt::getZExtValue(), llvm::MachineInstr::hasOneMemOperand(), llvm::AArch64_AM::InvalidShiftExtend, llvm::MachineOperand::isReg(), llvm::AArch64_AM::LSL, llvm::AArch64_AM::LSR, llvm::MachineInstr::mayLoadOrStore(), llvm::MachineInstr::memoperands_begin(), MRI, None, selectCopy(), llvm::AArch64_AM::SXTB, llvm::AArch64_AM::SXTH, llvm::AArch64_AM::SXTW, TII, TRI, llvm::AArch64_AM::UXTB, llvm::AArch64_AM::UXTH, and llvm::AArch64_AM::UXTW.
|
static |
Returns the correct subregister to use for a given register class.
Definition at line 397 of file AArch64InstructionSelector.cpp.
References llvm::dbgs(), llvm::TargetRegisterInfo::getRegSizeInBits(), and LLVM_DEBUG.
Referenced by getInsertVecEltOpInfo(), and selectCopy().
|
static |
Returns the element immediate value of a vector shift operand if found.
This needs to detect a splat-like operation, e.g. a G_BUILD_VECTOR.
Definition at line 1039 of file AArch64InstructionSelector.cpp.
References assert(), llvm::getConstantVRegValWithLookThrough(), llvm::MachineRegisterInfo::getType(), llvm::MachineRegisterInfo::getVRegDef(), llvm::LLT::isVector(), MRI, and llvm::None.
Referenced by getVectorSHLImm().
|
static |
Matches and returns the shift immediate value for a SHL instruction given a shift operand.
Definition at line 1065 of file AArch64InstructionSelector.cpp.
References llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addGlobalAddress(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addJumpTableIndex(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstr::addOperand(), llvm::MachineInstrBuilder::addRegMask(), llvm::MachineInstrBuilder::addUse(), llvm::AArch64ISD::ADR, llvm::AArch64CC::AL, llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Align, assert(), llvm::AMDGPUISD::BFM, llvm::APFloat::bitcastToAPInt(), llvm::ISD::BR, llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildInstr(), llvm::BuildMI(), changeFCMPPredToAArch64CC(), llvm::MachineOperand::ChangeToFrameIndex(), llvm::MachineOperand::ChangeToImmediate(), llvm::MachineOperand::ChangeToRegister(), llvm::ARCISD::CMP, llvm::RegisterBankInfo::constrainGenericRegister(), llvm::constrainSelectedInstRegOperands(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::dbgs(), llvm::tgtok::Def, llvm::PointerUnion< PTs >::dyn_cast(), llvm::AArch64_AM::encodeLogicalImmediate(), EQ, llvm::MachineInstr::eraseFromParent(), llvm::PointerUnion< PTs >::get(), llvm::MachineOperand::getBlockAddress(), llvm::MachineOperand::getCImm(), llvm::getConstantVRegVal(), llvm::MachineInstr::getDebugLoc(), llvm::getDefIgnoringCopies(), llvm::LLT::getElementType(), llvm::MachineOperand::getFPImm(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getGlobal(), llvm::RegisterBank::getID(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineFunction::getInfo(), llvm::AArch64CC::getInvertedCondCode(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineIRBuilder::getMBB(), llvm::MachineOperand::getMBB(), llvm::LLT::getNumElements(), llvm::MachineInstr::getNumExplicitOperands(), llvm::MachineInstr::getNumOperands(), llvm::MachineOperand::getOffset(), llvm::MachineInstr::getOpcode(), llvm::getOpcodeDef(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getPredicate(), llvm::MachineOperand::getReg(), llvm::RegisterBankInfo::getRegBank(), llvm::MachineRegisterInfo::getRegClassOrRegBank(), llvm::MachineFunction::getRegInfo(), llvm::MachineMemOperand::getSize(), llvm::LLT::getSizeInBits(), llvm::getSizeInBits(), llvm::LLT::getSizeInBytes(), llvm::MachineRegisterInfo::getType(), llvm::ConstantFP::getValueAPF(), llvm::AArch64FunctionInfo::getVarArgsStackIndex(), getVectorShiftImm(), llvm::MachineRegisterInfo::getVRegDef(), llvm::ConstantInt::getZExtValue(), llvm::APInt::getZExtValue(), llvm::Function::hasFnAttribute(), llvm::AArch64CC::HS, I, llvm::RegState::Implicit, llvm::MipsISD::Ins, llvm::MachineOperand::isCImm(), llvm::MachineInstr::isCopy(), llvm::APFloat::isExactlyValue(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isJTI(), llvm::LLT::isPointer(), llvm::isPreISelGenericOpcode(), llvm::MachineOperand::isReg(), llvm::LLT::isValid(), llvm::LLT::isVector(), llvm::LegalityPredicates::isVector(), llvm::CodeModel::Large, LLVM_DEBUG, LLVM_FALLTHROUGH, llvm_unreachable, llvm::SPII::Load, llvm::AArch64ISD::LOADgot, llvm::Log2_32(), llvm::BitmaskEnumDetail::Mask(), llvm::MachineInstr::memoperands_begin(), llvm::AArch64II::MO_G0, llvm::AArch64II::MO_G1, llvm::AArch64II::MO_G2, llvm::AArch64II::MO_G3, llvm::AArch64II::MO_GOT, llvm::AArch64II::MO_NC, llvm::AArch64II::MO_PAGE, llvm::AArch64II::MO_PAGEOFF, llvm::AArch64II::MO_TLS, MRI, llvm::AArch64CC::NE, llvm::None, Register, llvm::NVPTX::PTXLdStInstCode::Scalar, selectBinaryOp(), selectCopy(), selectFCMPOpc(), selectFPConvOpc(), llvm::mca::selectImpl(), selectLoadStoreUIOp(), selectMergeValues(), selectSelectOpc(), selectUnmergeValues(), llvm::MachineFrameInfo::setAdjustsStack(), llvm::MachineInstr::setDesc(), llvm::MachineOperand::setImm(), llvm::MachineIRBuilder::setInsertPt(), llvm::MachineOperand::setReg(), llvm::MachineRegisterInfo::setRegBank(), llvm::MachineOperand::setSubReg(), llvm::MachineOperand::setTargetFlags(), Size, std::swap(), TII, llvm::CodeModel::Tiny, llvm::SystemZISD::TM, TRI, llvm::RegState::Undef, and unsupportedBinOp().
|
static |
Returns true if P is an unsigned integer comparison predicate.
Definition at line 887 of file AArch64InstructionSelector.cpp.
Referenced by getInsertVecEltOpInfo().
|
static |
Helper function that verifies that we have a valid copy at the end of selectCopy.
Verifies that the source and dest have the expected sizes and then returns true.
Definition at line 583 of file AArch64InstructionSelector.cpp.
References assert(), llvm::RegisterBank::getID(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::getReg().
Referenced by selectCopy().
Select the AArch64 opcode for the basic binary operation GenericOpc (such as G_OR or G_SDIV), appropriate for the register bank RegBankID and of size OpSize.
GenericOpc if the combination is unsupported. Definition at line 476 of file AArch64InstructionSelector.cpp.
Referenced by getVectorSHLImm(), isSExtLoad(), and llvm::FastISel::selectOperator().
|
static |
Definition at line 670 of file AArch64InstructionSelector.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addUse(), assert(), llvm::BuildMI(), llvm::RegisterBankInfo::constrainGenericRegister(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::dbgs(), llvm::MCInstrInfo::get(), llvm::MachineInstr::getDebugLoc(), llvm::RegisterBank::getID(), getMinClassForRegBank(), llvm::MCInstrInfo::getName(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::RegisterBankInfo::getRegBank(), getRegClassesForCopy(), llvm::TargetRegisterInfo::getRegSizeInBits(), getSubRegForClass(), I, llvm::MachineInstr::isCopy(), isValidCopy(), LLVM_DEBUG, selectSubregisterCopy(), llvm::MachineInstr::setDesc(), llvm::MachineOperand::setReg(), and SubReg.
Referenced by getRegClassFromGRPhysReg(), getShiftTypeForInst(), and getVectorSHLImm().
|
static |
Helper function to select the opcode for a G_FCMP.
Definition at line 873 of file AArch64InstructionSelector.cpp.
References llvm::getConstantFPVRegVal(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::getSizeInBits(), llvm::MachineRegisterInfo::getType(), llvm::ConstantFP::isNegative(), llvm::ConstantFP::isZero(), and MRI.
Referenced by getInsertVecEltOpInfo(), and getVectorSHLImm().
Definition at line 783 of file AArch64InstructionSelector.cpp.
References llvm::LLT::getSizeInBits(), and llvm::LLT::isScalar().
Referenced by getVectorSHLImm().
|
static |
Select the AArch64 opcode for the G_LOAD or G_STORE operation GenericOpc, appropriate for the (value) register bank RegBankID and of memory access size OpSize.
This returns the variant with the base+unsigned-immediate addressing mode (e.g., LDRXui).
GenericOpc if the combination is unsupported. Definition at line 547 of file AArch64InstructionSelector.cpp.
References isStore().
Referenced by getVectorSHLImm().
|
static |
Definition at line 859 of file AArch64InstructionSelector.cpp.
References llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::RegisterBankInfo::getRegBank(), llvm::MachineRegisterInfo::getTargetRegisterInfo(), llvm::MachineRegisterInfo::getType(), MRI, and TRI.
Referenced by getInsertVecEltOpInfo(), and getVectorSHLImm().
|
static |
Helper function for selectCopy.
Inserts a subregister copy from *From to *To, linking it up to I.
e.g, given I = "Dst = COPY SrcReg", we'll transform that into
CopyReg (From class) = COPY SrcReg SubRegCopy (To class) = COPY CopyReg:SubReg Dst = COPY SubRegCopy
Definition at line 620 of file AArch64InstructionSelector.cpp.
References llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildInstr(), llvm::RegisterBankInfo::constrainGenericRegister(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), MRI, llvm::MachineOperand::setReg(), and SubReg.
Referenced by selectCopy().
|
static |
Check whether I is a currently unsupported binary operation:
Definition at line 430 of file AArch64InstructionSelector.cpp.
References llvm::dbgs(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::RegisterBankInfo::getRegBank(), llvm::MachineRegisterInfo::getType(), llvm::LLT::isValid(), LLVM_DEBUG, MRI, llvm::MachineInstr::operands(), and TRI.
Referenced by getVectorSHLImm().
1.8.13