|
LLVM 22.0.0git
|
#include "Target/ARM/ARMBaseInstrInfo.h"
Static Public Member Functions | |
| static bool | isCPSRDefined (const MachineInstr &MI) |
Protected Member Functions | |
| ARMBaseInstrInfo (const ARMSubtarget &STI, const ARMBaseRegisterInfo &TRI) | |
| void | expandLoadStackGuardBase (MachineBasicBlock::iterator MI, unsigned LoadImmOpc, unsigned LoadOpc) const |
| bool | getRegSequenceLikeInputs (const MachineInstr &MI, unsigned DefIdx, SmallVectorImpl< RegSubRegPairAndIdx > &InputRegs) const override |
Build the equivalent inputs of a REG_SEQUENCE for the given MI and DefIdx. | |
| bool | getExtractSubregLikeInputs (const MachineInstr &MI, unsigned DefIdx, RegSubRegPairAndIdx &InputReg) const override |
Build the equivalent inputs of a EXTRACT_SUBREG for the given MI and DefIdx. | |
| bool | getInsertSubregLikeInputs (const MachineInstr &MI, unsigned DefIdx, RegSubRegPair &BaseReg, RegSubRegPairAndIdx &InsertedReg) const override |
Build the equivalent inputs of a INSERT_SUBREG for the given MI and DefIdx. | |
| MachineInstr * | commuteInstructionImpl (MachineInstr &MI, bool NewMI, unsigned OpIdx1, unsigned OpIdx2) const override |
| Commutes the operands in the given instruction. | |
| std::optional< DestSourcePair > | isCopyInstrImpl (const MachineInstr &MI) const override |
| If the specific machine instruction is an instruction that moves/copies value from one register to another register return destination and source registers as machine operands. | |
| std::optional< ParamLoadedValue > | describeLoadedValue (const MachineInstr &MI, Register Reg) const override |
| Specialization of TargetInstrInfo::describeLoadedValue, used to enhance debug entry value descriptions for ARM targets. | |
Definition at line 42 of file ARMBaseInstrInfo.h.
|
explicitprotected |
Definition at line 110 of file ARMBaseInstrInfo.cpp.
References ARM_MLxTable, llvm_unreachable, and TRI.
Referenced by llvm::ARMInstrInfo::ARMInstrInfo(), llvm::Thumb1InstrInfo::Thumb1InstrInfo(), and llvm::Thumb2InstrInfo::Thumb2InstrInfo().
| const MachineInstrBuilder & ARMBaseInstrInfo::AddDReg | ( | MachineInstrBuilder & | MIB, |
| unsigned | Reg, | ||
| unsigned | SubIdx, | ||
| unsigned | State ) const |
Definition at line 932 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), getRegisterInfo(), and llvm::Register::isPhysicalRegister().
Referenced by loadRegFromStackSlot(), llvm::Thumb2InstrInfo::loadRegFromStackSlot(), storeRegToStackSlot(), and llvm::Thumb2InstrInfo::storeRegToStackSlot().
|
override |
Definition at line 182 of file ARMBaseInstrInfo.cpp.
References assert(), Cond, llvm::MachineOperand::CreateImm(), llvm::ARMSubtarget::enableMachinePipeliner(), llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getOpcode(), I, llvm::isCondBranchOpcode(), llvm::isIndirectBranchOpcode(), llvm::isJumpTableBranchOpcode(), isPredicated(), llvm::isSpeculationBarrierEndBBOpcode(), llvm::isUncondBranchOpcode(), MBB, removeBranch(), and TBB.
|
override |
analyzeCompare - For a comparison instruction, return the source registers in SrcReg and SrcReg2 if having two register operands, and the value it compares against in CmpValue.
Return true if the comparison instruction can be analyzed.
Definition at line 2634 of file ARMBaseInstrInfo.cpp.
References MI.
Referenced by shouldSink().
|
override |
Analyze loop L, which must be a single-basic-block loop, and if the conditions can be understood enough produce a PipelinerLoopInfo object.
Definition at line 6765 of file ARMBaseInstrInfo.cpp.
References llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineInstr::getOpcode(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), I, llvm::MachineBasicBlock::instrs(), isCPSRDefined(), llvm::isVCTP(), MRI, and llvm::MachineBasicBlock::pred_begin().
|
override |
Definition at line 2165 of file ARMBaseInstrInfo.cpp.
|
override |
areLoadsFromSameBasePtr - This is used by the pre-regalloc scheduler to determine if two loads are loading from the same base address.
It should only return true if the base pointers are the same and the only differences between the two addresses is the offset. It also returns the offsets by reference.
It should only return true if the base pointers are the same and the only differences between the two addresses is the offset. It also returns the offsets by reference.
FIXME: remove this in favor of the MachineInstr interface once pre-RA-sched is permanently disabled.
Definition at line 1794 of file ARMBaseInstrInfo.cpp.
References llvm::cast(), llvm::SDNode::getMachineOpcode(), llvm::SDNode::getOperand(), llvm::isa(), and llvm::SDNode::isMachineOpcode().
|
override |
Definition at line 5250 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::ARMCC::AL, assert(), llvm::BuildMI(), contains(), llvm::get(), llvm::MachineOperand::getReg(), MI, llvm::predOps(), and TRI.
|
override |
Definition at line 6373 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::ARMCC::AL, llvm::any_of(), assert(), llvm::BuildMI(), Call, llvm::get(), llvm::MachineFunction::getInfo(), isThumb(), MachineOutlinerDefault, MachineOutlinerTailCall, MachineOutlinerThunk, MBB, MI, Opc, and llvm::predOps().
canCauseFpMLxStall - Return true if an instruction of the specified opcode will cause stalls when scheduled after (within 4-cycle window) a fp MLA / MLS instruction.
Definition at line 514 of file ARMBaseInstrInfo.h.
|
override |
Definition at line 488 of file ARMBaseInstrInfo.cpp.
References MI, and llvm::ARMII::ThumbArithFlagSetting.
|
overrideprotected |
Commutes the operands in the given instruction.
The commutable operands are specified by their indices OpIdx1 and OpIdx2.
Do not call this method for a non-commutable instruction or for non-commutable pair of operand indices OpIdx1 and OpIdx2. Even though the instruction is commutable, the method may still fail to commute the operands, null pointer is returned in such cases.
Definition at line 2102 of file ARMBaseInstrInfo.cpp.
References llvm::ARMCC::AL, llvm::TargetInstrInfo::commuteInstructionImpl(), llvm::MachineInstr::findFirstPredOperandIdx(), llvm::getInstrPredicate(), llvm::MachineInstr::getOperand(), llvm::ARMCC::getOppositeCondition(), MI, and llvm::MachineOperand::setImm().
Referenced by llvm::Thumb2InstrInfo::commuteInstructionImpl().
| void ARMBaseInstrInfo::copyFromCPSR | ( | MachineBasicBlock & | MBB, |
| MachineBasicBlock::iterator | I, | ||
| MCRegister | DestReg, | ||
| bool | KillSrc, | ||
| const ARMSubtarget & | Subtarget ) const |
Definition at line 654 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, llvm::BuildMI(), llvm::get(), llvm::getKillRegState(), I, llvm::RegState::Implicit, MBB, Opc, and llvm::predOps().
Referenced by copyPhysReg().
|
override |
Definition at line 718 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstr::addRegisterDefined(), llvm::MachineInstr::addRegisterKilled(), llvm::addUnpredicatedMveVpredROp(), llvm::ARMCC::AL, assert(), llvm::BuildMI(), llvm::condCodeOp(), contains(), copyFromCPSR(), copyToCPSR(), llvm::SmallSet< T, N, C >::count(), DL, llvm::get(), llvm::getKillRegState(), getRegisterInfo(), I, llvm::SmallSet< T, N, C >::insert(), MBB, Opc, llvm::predOps(), and TRI.
Referenced by llvm::Thumb2InstrInfo::copyPhysReg(), and insertOutlinedCall().
| void ARMBaseInstrInfo::copyToCPSR | ( | MachineBasicBlock & | MBB, |
| MachineBasicBlock::iterator | I, | ||
| MCRegister | SrcReg, | ||
| bool | KillSrc, | ||
| const ARMSubtarget & | Subtarget ) const |
Definition at line 674 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, llvm::BuildMI(), llvm::RegState::Define, llvm::get(), llvm::getKillRegState(), I, llvm::RegState::Implicit, MBB, Opc, and llvm::predOps().
Referenced by copyPhysReg().
|
override |
Definition at line 403 of file ARMBaseInstrInfo.cpp.
References llvm::ARMCondCodeToString(), llvm::TargetInstrInfo::createMIROperandComment(), MI, OpIdx, and TRI.
|
override |
Definition at line 125 of file ARMBaseInstrInfo.cpp.
References llvm::TargetInstrInfo::CreateTargetHazardRecognizer(), and II.
|
override |
Definition at line 138 of file ARMBaseInstrInfo.cpp.
References llvm::MultiHazardRecognizer::AddHazardRecognizer(), llvm::TargetInstrInfo::CreateTargetMIHazardRecognizer(), llvm::ScheduleDAGMI::hasVRegLiveness(), and II.
|
override |
Definition at line 160 of file ARMBaseInstrInfo.cpp.
References llvm::MultiHazardRecognizer::AddHazardRecognizer(), llvm::TargetInstrInfo::CreateTargetPostRAHazardRecognizer(), and II.
|
override |
Definition at line 5379 of file ARMBaseInstrInfo.cpp.
References llvm::ARMII::MO_OPTION_MASK.
|
overrideprotected |
Specialization of TargetInstrInfo::describeLoadedValue, used to enhance debug entry value descriptions for ARM targets.
Definition at line 903 of file ARMBaseInstrInfo.cpp.
References llvm::TargetInstrInfo::describeLoadedValue(), isCopyInstrImpl(), and MI.
|
override |
Definition at line 1683 of file ARMBaseInstrInfo.cpp.
References llvm::TargetInstrInfo::duplicate(), duplicateCPV(), llvm::ilist_node_impl< OptionsT >::getIterator(), I, and MBB.
|
protected |
Definition at line 4758 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addGlobalAddress(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, assert(), llvm::BuildMI(), llvm::cast(), llvm::MachineInstrBuilder::cloneMemRefs(), DL, llvm::get(), llvm::MachinePointerInfo::getGOT(), llvm::GlobalValue::hasDLLImportStorageClass(), llvm::RegState::Kill, MBB, MI, llvm::ARMII::MO_COFFSTUB, llvm::ARMII::MO_DLLIMPORT, llvm::ARMII::MO_GOT, llvm::ARMII::MO_NO_FLAG, llvm::ARMII::MO_NONLAZY, llvm::MachineMemOperand::MODereferenceable, llvm::MachineMemOperand::MOInvariant, llvm::MachineMemOperand::MOLoad, llvm::Offset, and llvm::predOps().
|
override |
Definition at line 1533 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, contains(), llvm::dbgs(), llvm::get(), getRegisterInfo(), llvm::RegState::Implicit, LLVM_DEBUG, MI, llvm::predOps(), and TRI.
|
override |
Definition at line 2032 of file ARMBaseInstrInfo.cpp.
References llvm::divideCeil().
|
override |
foldImmediate - 'Reg' is known to be defined by a move immediate instruction, try to fold the immediate into the use instruction.
Definition at line 3158 of file ARMBaseInstrInfo.cpp.
References AbstractManglingParser< Derived, Alloc >::NumOps, llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, llvm::BuildMI(), llvm::condCodeOp(), DefMI, llvm::get(), llvm::getKillRegState(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineOperand::getReg(), llvm::ARM_AM::getSOImmTwoPartFirst(), llvm::ARM_AM::getSOImmTwoPartSecond(), llvm::ARM_AM::getT2SOImmTwoPartFirst(), llvm::ARM_AM::getT2SOImmTwoPartSecond(), llvm::MCInstrDesc::hasOptionalDef(), llvm::MachineOperand::isDead(), llvm::ARM_AM::isSOImmTwoPartVal(), llvm::ARM_AM::isT2SOImmTwoPartVal(), MRI, OpIdx, llvm::predOps(), and UseMI.
|
override |
VFP/NEON execution domains.
Definition at line 4887 of file ARMBaseInstrInfo.cpp.
References llvm::ARMII::DomainMask, llvm::ARMII::DomainNEON, llvm::ARMII::DomainNEONA8, llvm::ARMII::DomainVFP, ExeGeneric, ExeNEON, ExeVFP, isPredicated(), and MI.
|
overrideprotected |
Build the equivalent inputs of a EXTRACT_SUBREG for the given MI and DefIdx.
[out] InputReg of the equivalent EXTRACT_SUBREG. E.g., EXTRACT_SUBREG %1:sub1, sub0, sub1 would produce:
MI, DefIdx. False otherwise.Definition at line 5328 of file ARMBaseInstrInfo.cpp.
References assert(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineOperand::isUndef(), llvm_unreachable, MI, llvm::TargetInstrInfo::RegSubRegPair::Reg, llvm::TargetInstrInfo::RegSubRegPairAndIdx::SubIdx, and llvm::TargetInstrInfo::RegSubRegPair::SubReg.
|
inline |
Returns predicate register associated with the given frame instruction.
Definition at line 523 of file ARMBaseInstrInfo.h.
|
overrideprotected |
Build the equivalent inputs of a INSERT_SUBREG for the given MI and DefIdx.
[out] BaseReg and [out] InsertedReg contain the equivalent inputs of INSERT_SUBREG. E.g., INSERT_SUBREG %0:sub0, %1:sub1, sub3 would produce:
MI, DefIdx. False otherwise.Definition at line 5351 of file ARMBaseInstrInfo.cpp.
References assert(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineOperand::isUndef(), llvm_unreachable, MI, llvm::TargetInstrInfo::RegSubRegPair::Reg, llvm::TargetInstrInfo::RegSubRegPairAndIdx::SubIdx, and llvm::TargetInstrInfo::RegSubRegPair::SubReg.
|
override |
GetInstSize - Returns the size of the specified MachineInstr.
GetInstSize - Return the size of the specified MachineInstr.
Definition at line 605 of file ARMBaseInstrInfo.cpp.
References llvm::alignTo(), llvm::MachineFunction::getInfo(), llvm::TargetMachine::getMCAsmInfo(), llvm::MachineFunction::getTarget(), llvm::ARMFunctionInfo::isThumbFunction(), MBB, MI, and Size.
Referenced by getOutliningCandidateInfo(), and predictBranchSizeForIfCvt().
| unsigned ARMBaseInstrInfo::getNumLDMAddresses | ( | const MachineInstr & | MI | ) | const |
Get the number of addresses by LDM or VLDM or zero for unknown.
Definition at line 3555 of file ARMBaseInstrInfo.cpp.
|
override |
Definition at line 3609 of file ARMBaseInstrInfo.cpp.
References llvm::ARMSubtarget::DoubleIssue, llvm::ARMSubtarget::DoubleIssueCheckUnalignedAccess, llvm::InstrItineraryData::getNumMicroOps(), getNumMicroOpsSingleIssuePlusExtras(), getNumMicroOpsSwiftLdSt(), llvm::InstrItineraryData::isEmpty(), llvm_unreachable, MI, Opc, llvm::ARMSubtarget::SingleIssue, and llvm::ARMSubtarget::SingleIssuePlusExtras.
|
override |
Definition at line 4209 of file ARMBaseInstrInfo.cpp.
References DefMI, getBundledDefMI(), getBundledUseMI(), llvm::MachineInstr::getDesc(), llvm::MachineOperand::getReg(), getRegisterInfo(), llvm::MachineInstr::isCopyLike(), llvm::InstrItineraryData::isEmpty(), llvm::MachineInstr::isImplicitDef(), llvm::MachineInstr::isInsertSubreg(), llvm::MachineInstr::isRegSequence(), and UseMI.
Referenced by getOperandLatency().
|
override |
Definition at line 4303 of file ARMBaseInstrInfo.cpp.
References llvm::cast(), llvm::get(), llvm::ARM_AM::getAM2Offset(), llvm::ARM_AM::getAM2ShiftOpc(), llvm::SDNode::getConstantOperandVal(), llvm::SDNode::getMachineOpcode(), llvm::MCInstrDesc::getOpcode(), llvm::InstrItineraryData::getOperandCycle(), getOperandLatency(), llvm::MCInstrDesc::getSchedClass(), llvm::InstrItineraryData::isEmpty(), llvm::SDNode::isMachineOpcode(), llvm::Latency, llvm::ARM_AM::lsl, llvm::ARM_AM::lsr, llvm::MCInstrDesc::mayLoad(), and llvm::MCInstrDesc::Opcode.
|
override |
Definition at line 5724 of file ARMBaseInstrInfo.cpp.
References llvm::any_of(), llvm::outliner::Candidate::back(), llvm::ARMFunctionInfo::branchTargetEnforcement(), llvm::CallingConv::C, OutlinerCosts::CallDefault, OutlinerCosts::CallNoLRSave, OutlinerCosts::CallRegSave, OutlinerCosts::CallTailCall, OutlinerCosts::CallThunk, llvm::drop_end(), llvm::erase_if(), OutlinerCosts::FrameDefault, OutlinerCosts::FrameNoLRSave, OutlinerCosts::FrameRegSave, OutlinerCosts::FrameTailCall, OutlinerCosts::FrameThunk, getInstSizeInBytes(), getRegisterInfo(), HasCalls, llvm::MachineInstr::isCall(), isLRAvailable(), llvm::Last, MachineOutlinerDefault, MachineOutlinerNoLRSave, MachineOutlinerRegSave, MachineOutlinerTailCall, MachineOutlinerThunk, MI, llvm::partition(), OutlinerCosts::SaveRestoreLROnStack, llvm::ARMFunctionInfo::shouldSignReturnAddress(), TRI, and UnsafeRegsDead.
|
override |
Definition at line 6135 of file ARMBaseInstrInfo.cpp.
References llvm::ARMII::DomainMask, llvm::ARMII::DomainMVE, llvm::dyn_cast(), llvm::MachineFunction::getFrameInfo(), llvm::MachineModuleInfo::getMachineFunction(), llvm::MachineFrameInfo::getNumObjects(), getRegisterInfo(), llvm::MachineFrameInfo::getStackSize(), HasCalls, llvm::outliner::Illegal, llvm::MachineFrameInfo::isCalleeSavedInfoValid(), llvm::outliner::Legal, llvm::outliner::LegalTerminator, LRUnavailableSomewhere, MI, Opc, and TRI.
|
override |
Definition at line 5189 of file ARMBaseInstrInfo.cpp.
References assert(), contains(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), MI, llvm::MachineOperand::readsReg(), and TRI.
|
inline |
Definition at line 172 of file ARMBaseInstrInfo.h.
References llvm::ARMCC::AL, and MI.
|
inline |
Definition at line 129 of file ARMBaseInstrInfo.h.
References llvm::TargetInstrInfo::getRegisterInfo().
Referenced by AddDReg(), copyPhysReg(), expandPostRAPseudo(), getOperandLatency(), getOutliningCandidateInfo(), getOutliningTypeImpl(), isMBBSafeToOutlineFrom(), isProfitableToIfCvt(), loadRegFromStackSlot(), optimizeCompareInstr(), predictBranchSizeForIfCvt(), setExecutionDomain(), and storeRegToStackSlot().
|
overrideprotected |
Build the equivalent inputs of a REG_SEQUENCE for the given MI and DefIdx.
[out] InputRegs of the equivalent REG_SEQUENCE. Each element of the list is modeled as <Reg:SubReg, SubIdx>. E.g., REG_SEQUENCE %1:sub1, sub0, %2, sub1 would produce two elements:
MI, DefIdx. False otherwise.Definition at line 5301 of file ARMBaseInstrInfo.cpp.
References assert(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineOperand::isUndef(), llvm_unreachable, MI, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
override |
Definition at line 5397 of file ARMBaseInstrInfo.cpp.
References llvm::ArrayRef().
|
override |
Definition at line 5385 of file ARMBaseInstrInfo.cpp.
References llvm::ArrayRef().
|
inline |
Definition at line 134 of file ARMBaseInstrInfo.h.
Referenced by isPredicable(), and llvm::Thumb2InstrInfo::optimizeSelect().
Implemented in llvm::ARMInstrInfo, llvm::Thumb1InstrInfo, and llvm::Thumb2InstrInfo.
References Opc.
| bool ARMBaseInstrInfo::hasNOP | ( | ) | const |
Definition at line 5283 of file ARMBaseInstrInfo.cpp.
Referenced by llvm::ARMInstrInfo::getNop().
|
override |
Definition at line 325 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMBB(), llvm::ARMCC::AL, assert(), llvm::BuildMI(), Cond, DL, llvm::get(), llvm::getImm(), isThumb(), llvm::ARMFunctionInfo::isThumb2Function(), llvm::ARMFunctionInfo::isThumbFunction(), MBB, llvm::predOps(), and TBB.
|
override |
Definition at line 6446 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addGlobalAddress(), llvm::ARMCC::AL, assert(), llvm::BuildMI(), llvm::CFIInstBuilder::buildRegister(), llvm::CFIInstBuilder::buildRestore(), llvm::CallingConv::C, copyPhysReg(), llvm::dwarf_linker::DebugLoc, llvm::MachineInstr::FrameDestroy, llvm::MachineInstr::FrameSetup, llvm::get(), llvm::MachineFunction::getName(), llvm::ARMFunctionInfo::isLRSpilled(), isThumb(), MachineOutlinerNoLRSave, MachineOutlinerRegSave, MachineOutlinerTailCall, MachineOutlinerThunk, MBB, Opc, llvm::predOps(), and llvm::ARMFunctionInfo::shouldSignReturnAddress().
|
override |
Definition at line 5411 of file ARMBaseInstrInfo.cpp.
References llvm::MachineOperand::getReg(), llvm::MachineOperand::isReg(), MI, and llvm::Offset.
|
overrideprotected |
If the specific machine instruction is an instruction that moves/copies value from one register to another register return destination and source registers as machine operands.
Definition at line 887 of file ARMBaseInstrInfo.cpp.
References MI.
Referenced by describeLoadedValue().
|
static |
Definition at line 512 of file ARMBaseInstrInfo.cpp.
References MI.
Referenced by analyzeLoopForPipelining(), and isEligibleForITBlock().
isFpMLxInstruction - Return true if the specified opcode is a fp MLA / MLS instruction.
Definition at line 500 of file ARMBaseInstrInfo.h.
| bool ARMBaseInstrInfo::isFpMLxInstruction | ( | unsigned | Opcode, |
| unsigned & | MulOpc, | ||
| unsigned & | AddSubOpc, | ||
| bool & | NegAcc, | ||
| bool & | HasLane ) const |
isFpMLxInstruction - This version also returns the multiply opcode and the addition / subtraction opcode to expand to.
Return true for 'HasLane' for the MLX instructions with an extra lane operand.
Definition at line 4851 of file ARMBaseInstrInfo.cpp.
References ARM_MLxTable, and I.
|
override |
ARM supports the MachineOutliner.
Definition at line 6063 of file ARMBaseInstrInfo.cpp.
References F, llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), and llvm::ARMFunctionInfo::isThumb1OnlyFunction().
|
override |
Definition at line 1404 of file ARMBaseInstrInfo.cpp.
References MI.
|
override |
Definition at line 1464 of file ARMBaseInstrInfo.cpp.
References Accesses, llvm::cast(), and MI.
|
override |
Definition at line 6086 of file ARMBaseInstrInfo.cpp.
References llvm::LiveRegUnits::accumulate(), llvm::LiveRegUnits::addLiveOuts(), llvm::any_of(), assert(), llvm::LiveRegUnits::available(), getRegisterInfo(), HasCalls, isLRAvailable(), LRUnavailableSomewhere, MBB, MI, llvm::reverse(), and UnsafeRegsDead.
|
override |
isPredicable - Return true if the specified instruction can be predicated.
By default, this returns true for every instruction with a PredicateOperand.
Definition at line 551 of file ARMBaseInstrInfo.cpp.
References llvm::ARMII::DomainMask, llvm::ARMII::DomainNEON, llvm::MachineFunction::getInfo(), getSubtarget(), llvm::MachineFunction::getSubtarget(), isEligibleForITBlock(), llvm::isIndirectCall(), llvm::isIndirectControlFlowNotComingBack(), llvm::ARMFunctionInfo::isThumb2Function(), llvm::isV8EligibleForIT(), and MI.
|
override |
Definition at line 387 of file ARMBaseInstrInfo.cpp.
References llvm::ARMCC::AL, I, and MI.
Referenced by analyzeBranch(), getExecutionDomain(), optimizeCompareInstr(), setExecutionDomain(), and shouldSink().
|
inlineoverride |
Definition at line 279 of file ARMBaseInstrInfo.h.
References MBB.
|
override |
Definition at line 1941 of file ARMBaseInstrInfo.cpp.
References llvm::findCMPToFoldIntoCBZ(), llvm::MachineInstr::getOpcode(), getRegisterInfo(), isProfitableToIfCvt(), MBB, and TRI.
Referenced by isProfitableToIfCvt().
|
override |
Definition at line 1967 of file ARMBaseInstrInfo.cpp.
References llvm::BranchProbability::getCompl(), llvm::MachineBasicBlock::pred_size(), llvm::BranchProbability::scale(), and TBB.
|
override |
Definition at line 2069 of file ARMBaseInstrInfo.cpp.
|
override |
Definition at line 1891 of file ARMBaseInstrInfo.cpp.
References I, llvm::isSEHInstruction(), MBB, and MI.
Referenced by llvm::Thumb2InstrInfo::isSchedulingBoundary().
|
override |
Definition at line 1144 of file ARMBaseInstrInfo.cpp.
References MI.
|
override |
Definition at line 1198 of file ARMBaseInstrInfo.cpp.
References Accesses, llvm::cast(), and MI.
| bool ARMBaseInstrInfo::isSwiftFastImmShift | ( | const MachineInstr * | MI | ) | const |
Returns true if the instruction has a shift by immediate that can be executed in one cycle less.
Definition at line 5287 of file ARMBaseInstrInfo.cpp.
References llvm::ARM_AM::getSORegOffset(), llvm::ARM_AM::getSORegShOp(), llvm::ARM_AM::lsl, llvm::ARM_AM::lsr, and MI.
|
inlineoverride |
Definition at line 379 of file ARMBaseInstrInfo.h.
References MI.
|
override |
Definition at line 1211 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), AddDReg(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), llvm::addUnpredicatedMveVpredNOp(), llvm::ARMCC::AL, llvm::BuildMI(), llvm::RegState::DefineNoRead, DL, llvm::get(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlign(), llvm::MachineFrameInfo::getObjectSize(), getRegisterInfo(), I, llvm::RegState::ImplicitDefine, llvm::Register::isPhysical(), llvm_unreachable, MBB, llvm::MachineMemOperand::MOLoad, llvm::predOps(), and TRI.
Referenced by llvm::Thumb2InstrInfo::loadRegFromStackSlot().
|
override |
Definition at line 6048 of file ARMBaseInstrInfo.cpp.
References llvm::CallingConv::C, F, llvm::Function::getFnAttribute(), and llvm::Function::hasFnAttribute().
|
override |
optimizeCompareInstr - Convert the instruction to set the zero flag so that we can remove a "comparison with zero"; Remove a redundant CMP instruction if the flags can be updated in the same way by an earlier instruction such as SUB.
optimizeCompareInstr - Convert the instruction supplying the argument to the comparison into one that sets the zero bit in the flags register; Remove a redundant Compare instruction if an earlier instruction can set the flags in the same way as Compare.
E.g. SUBrr(r1,r2) and CMPrr(r1,r2). We also handle the case where two operands are swapped: SUBrr(r1,r2) and CMPrr(r2,r1), by updating the condition code of instructions which use the flags.
Definition at line 2860 of file ARMBaseInstrInfo.cpp.
References llvm::ARMCC::AL, assert(), B(), llvm::MachineBasicBlock::begin(), llvm::MachineOperand::clobbersPhysReg(), Cond, llvm::MachineBasicBlock::end(), llvm::ARMCC::EQ, llvm::MachineInstr::eraseFromParent(), llvm::ARMCC::GE, getCmpToAddCondition(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), getRegisterInfo(), getSwappedCondition(), llvm::ARMCC::GT, llvm::ARMCC::HI, llvm::ARMCC::HS, I, llvm::MachineBasicBlock::insert(), llvm::MachineOperand::isDef(), isOptimizeCompareCandidate(), isPredicated(), isRedundantFlagInstr(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isRegMask(), isSuitableForMask(), llvm::ARMCC::LE, llvm::ARMCC::LO, llvm::ARMCC::LS, llvm::ARMCC::LT, MBB, llvm::ARMCC::MI, MI, MRI, llvm::ARMCC::NE, Opc, llvm::ARMCC::PL, llvm::SmallVectorTemplateBase< T, bool >::push_back(), TRI, llvm::ARMCC::VC, and llvm::ARMCC::VS.
|
override |
Definition at line 2187 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), assert(), llvm::BuildMI(), llvm::MachineInstr::clearKillInfo(), llvm::condCodeOp(), DefMI, llvm::SmallPtrSetImpl< PtrType >::erase(), llvm::MachineInstr::getNumOperands(), llvm::MCInstrDesc::getNumOperands(), llvm::ARMCC::getOppositeCondition(), llvm::MachineOperand::getReg(), llvm::MachineInstr::hasOptionalDef(), llvm::SmallPtrSetImpl< PtrType >::insert(), MI, MRI, llvm::MCInstrDesc::operands(), llvm::MachineOperand::setImplicit(), and llvm::MachineInstr::tieOperands().
Referenced by llvm::Thumb2InstrInfo::optimizeSelect().
|
override |
Definition at line 428 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::get(), llvm::getImm(), llvm::getMatchingCondBranchOpcode(), getReg(), llvm::isUncondBranchOpcode(), MI, Opc, llvm::MachineOperand::setImm(), and llvm::ARMII::ThumbArithFlagSetting.
|
override |
Definition at line 2046 of file ARMBaseInstrInfo.cpp.
References llvm::findCMPToFoldIntoCBZ(), getInstSizeInBytes(), getRegisterInfo(), MI, and Size.
|
override |
Definition at line 1707 of file ARMBaseInstrInfo.cpp.
References llvm::MachineConstantPoolEntry::ConstVal, llvm::MachineFunction::getConstantPool(), llvm::MachineConstantPool::getConstants(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getNumOperands(), llvm::MachineOperand::getOffset(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::ARMConstantPoolValue::hasSameValue(), llvm::MachineInstr::IgnoreVRegDefs, llvm::MachineInstr::isIdenticalTo(), llvm::MachineOperand::isIdenticalTo(), llvm::MachineConstantPoolEntry::isMachineConstantPoolEntry(), llvm::Register::isVirtual(), llvm::MachineConstantPoolEntry::MachineCPVal, MRI, produceSameValue(), and llvm::MachineConstantPoolEntry::Val.
Referenced by produceSameValue().
|
override |
Definition at line 1656 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::addConstantPoolIndex(), llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), llvm::MachineInstrBuilder::cloneMemRefs(), duplicateCPV(), llvm::get(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), I, MBB, MI, and TRI.
|
override |
Definition at line 298 of file ARMBaseInstrInfo.cpp.
References assert(), I, llvm::isCondBranchOpcode(), llvm::isUncondBranchOpcode(), and MBB.
Referenced by analyzeBranch().
|
override |
Definition at line 377 of file ARMBaseInstrInfo.cpp.
References Cond, and llvm::ARMCC::getOppositeCondition().
|
override |
Definition at line 4979 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, assert(), llvm::BuildMI(), llvm::RegState::Define, ExeNEON, llvm::get(), getCorrespondingDRegAndLane(), getImplicitSPRUseForDPRUse(), getRegisterInfo(), llvm::getUndefRegState(), llvm::RegState::Implicit, isPredicated(), llvm_unreachable, MI, llvm::predOps(), TRI, and llvm::RegState::Undef.
|
override |
Enable outlining by default at -Oz.
Definition at line 6511 of file ARMBaseInstrInfo.cpp.
References llvm::MachineFunction::getFunction(), and llvm::Function::hasMinSize().
|
override |
shouldScheduleLoadsNear - This is a used by the pre-regalloc scheduler to determine (in conjunction with areLoadsFromSameBasePtr) if two loads should be scheduled togther.
On some targets if two loads are loading from addresses in the same cache line, it's better if they are scheduled together. This function takes two integers that represent the load offsets from the common base address. It returns true if it decides it's desirable to schedule the two loads together. "NumLoads" is the number of loads that have already been scheduled after Load1.
On some targets if two loads are loading from addresses in the same cache line, it's better if they are scheduled together. This function takes two integers that represent the load offsets from the common base address. It returns true if it decides it's desirable to schedule the two loads together. "NumLoads" is the number of loads that have already been scheduled after Load1.
FIXME: remove this in favor of the MachineInstr interface once pre-RA-sched is permanently disabled.
Definition at line 1861 of file ARMBaseInstrInfo.cpp.
References assert(), and llvm::SDNode::getMachineOpcode().
|
override |
Definition at line 3140 of file ARMBaseInstrInfo.cpp.
References analyzeCompare(), isPredicated(), isRedundantFlagInstr(), MI, and llvm::Next.
|
override |
Definition at line 944 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), AddDReg(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), llvm::addUnpredicatedMveVpredNOp(), llvm::ARMCC::AL, llvm::BuildMI(), llvm::dwarf_linker::DebugLoc, llvm::get(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::getKillRegState(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlign(), llvm::MachineFrameInfo::getObjectSize(), getRegisterInfo(), I, llvm_unreachable, MBB, llvm::MachineMemOperand::MOStore, llvm::predOps(), and TRI.
Referenced by llvm::Thumb2InstrInfo::storeRegToStackSlot().
|
override |
Definition at line 462 of file ARMBaseInstrInfo.cpp.
References llvm::ARMCC::AL, llvm::ARMCC::EQ, llvm::ARMCC::GE, llvm::getImm(), llvm::ARMCC::GT, llvm::ARMCC::HI, llvm::ARMCC::HS, llvm::ARMCC::LE, llvm::ARMCC::LO, llvm::ARMCC::LS, llvm::ARMCC::LT, and llvm::ArrayRef< T >::size().