|
LLVM 24.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 109 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, | ||
| RegState | State ) const |
Definition at line 930 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 181 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 2612 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 6744 of file ARMBaseInstrInfo.cpp.
References llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getFirstTerminator(), llvm::MachineInstr::getOpcode(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineRegisterInfo::getUniqueVRegDef(), I, llvm::MachineBasicBlock::instrs(), isCPSRDefined(), llvm::isVCTP(), and llvm::MachineBasicBlock::pred_begin().
|
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 1793 of file ARMBaseInstrInfo.cpp.
References llvm::cast(), llvm::SDNode::getMachineOpcode(), llvm::SDNode::getOperand(), llvm::isa(), and llvm::SDNode::isMachineOpcode().
|
override |
Definition at line 5228 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 6352 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 509 of file ARMBaseInstrInfo.h.
|
override |
Definition at line 487 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 2101 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 652 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::Implicit, MBB, Opc, and llvm::predOps().
Referenced by copyPhysReg().
|
override |
Definition at line 716 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 672 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, llvm::BuildMI(), llvm::Define, llvm::get(), llvm::getKillRegState(), I, llvm::Implicit, MBB, Opc, and llvm::predOps().
Referenced by copyPhysReg().
|
override |
Definition at line 402 of file ARMBaseInstrInfo.cpp.
References llvm::ARMCondCodeToString(), llvm::TargetInstrInfo::createMIROperandComment(), MI, and TRI.
|
override |
Definition at line 124 of file ARMBaseInstrInfo.cpp.
References llvm::TargetInstrInfo::CreateTargetHazardRecognizer(), and II.
|
override |
Definition at line 137 of file ARMBaseInstrInfo.cpp.
References llvm::MultiHazardRecognizer::AddHazardRecognizer(), llvm::TargetInstrInfo::CreateTargetMIHazardRecognizer(), llvm::ScheduleDAGMI::hasVRegLiveness(), and II.
|
override |
Definition at line 159 of file ARMBaseInstrInfo.cpp.
References llvm::MultiHazardRecognizer::AddHazardRecognizer(), llvm::TargetInstrInfo::CreateTargetPostRAHazardRecognizer(), and II.
|
override |
Definition at line 5357 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 901 of file ARMBaseInstrInfo.cpp.
References llvm::TargetInstrInfo::describeLoadedValue(), isCopyInstrImpl(), and MI.
|
override |
Definition at line 1682 of file ARMBaseInstrInfo.cpp.
References llvm::TargetInstrInfo::duplicate(), duplicateCPV(), llvm::ilist_node_impl< OptionsT >::getIterator(), I, and MBB.
|
protected |
Definition at line 4736 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::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 1531 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, contains(), llvm::dbgs(), llvm::get(), getRegisterInfo(), llvm::Implicit, LLVM_DEBUG, MI, llvm::predOps(), and TRI.
|
override |
Definition at line 2031 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 3136 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(), llvm::MachineRegisterInfo::constrainRegClass(), llvm::MachineRegisterInfo::createVirtualRegister(), DefMI, llvm::get(), llvm::getKillRegState(), llvm::MCInstrDesc::getNumOperands(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::ARM_AM::getSOImmTwoPartFirst(), llvm::ARM_AM::getSOImmTwoPartSecond(), llvm::ARM_AM::getT2SOImmTwoPartFirst(), llvm::ARM_AM::getT2SOImmTwoPartSecond(), llvm::MachineRegisterInfo::hasOneNonDBGUse(), llvm::MCInstrDesc::hasOptionalDef(), llvm::MachineOperand::isDead(), llvm::ARM_AM::isSOImmTwoPartVal(), llvm::ARM_AM::isT2SOImmTwoPartVal(), llvm::predOps(), and UseMI.
|
override |
VFP/NEON execution domains.
Definition at line 4865 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 5306 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 518 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 5329 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 604 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 3533 of file ARMBaseInstrInfo.cpp.
|
override |
Definition at line 3587 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 4187 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 4281 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 5711 of file ARMBaseInstrInfo.cpp.
References llvm::any_of(), llvm::outliner::Candidate::back(), llvm::ARMFunctionInfo::branchTargetEnforcement(), C(), OutlinerCosts::CallDefault, OutlinerCosts::CallNoLRSave, OutlinerCosts::CallRegSave, OutlinerCosts::CallTailCall, OutlinerCosts::CallThunk, CanTransformInstrIntoTailCall(), 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 6116 of file ARMBaseInstrInfo.cpp.
References CanTransformInstrIntoTailCall(), 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 5167 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 5279 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 5375 of file ARMBaseInstrInfo.cpp.
References llvm::ArrayRef().
|
override |
Definition at line 5363 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 5261 of file ARMBaseInstrInfo.cpp.
Referenced by llvm::ARMInstrInfo::getNop().
|
override |
Definition at line 324 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 6425 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addGlobalAddress(), llvm::ARMCC::AL, assert(), llvm::BuildMI(), llvm::CFIInstBuilder::buildRegister(), llvm::CFIInstBuilder::buildRestore(), 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 5389 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 885 of file ARMBaseInstrInfo.cpp.
References MI.
Referenced by describeLoadedValue().
|
static |
Definition at line 511 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 495 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 4829 of file ARMBaseInstrInfo.cpp.
References ARM_MLxTable, and I.
|
override |
ARM supports the MachineOutliner.
Definition at line 6044 of file ARMBaseInstrInfo.cpp.
References F, llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), and llvm::ARMFunctionInfo::isThumb1OnlyFunction().
|
override |
Definition at line 1402 of file ARMBaseInstrInfo.cpp.
References MI.
|
override |
Definition at line 1462 of file ARMBaseInstrInfo.cpp.
References Accesses, llvm::cast(), and MI.
|
override |
Definition at line 6067 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 550 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 386 of file ARMBaseInstrInfo.cpp.
References llvm::ARMCC::AL, I, and MI.
Referenced by analyzeBranch(), getExecutionDomain(), optimizeCompareInstr(), setExecutionDomain(), and shouldSink().
|
inlineoverride |
Definition at line 280 of file ARMBaseInstrInfo.h.
References MBB.
|
override |
Definition at line 1940 of file ARMBaseInstrInfo.cpp.
References llvm::findCMPToFoldIntoCBZ(), llvm::MachineInstr::getOpcode(), getRegisterInfo(), isProfitableToIfCvt(), MBB, and TRI.
Referenced by isProfitableToIfCvt().
|
override |
Definition at line 1966 of file ARMBaseInstrInfo.cpp.
References llvm::BranchProbability::getCompl(), llvm::MachineBasicBlock::pred_size(), llvm::BranchProbability::scale(), and TBB.
|
override |
Definition at line 2068 of file ARMBaseInstrInfo.cpp.
|
override |
Definition at line 1890 of file ARMBaseInstrInfo.cpp.
References I, llvm::isSEHInstruction(), MBB, and MI.
Referenced by llvm::Thumb2InstrInfo::isSchedulingBoundary().
|
override |
Definition at line 1142 of file ARMBaseInstrInfo.cpp.
References MI.
|
override |
Definition at line 1196 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 5265 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 376 of file ARMBaseInstrInfo.h.
References MI.
|
override |
Definition at line 1209 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::DefineNoRead, DL, llvm::get(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlign(), llvm::MachineFrameInfo::getObjectSize(), getRegisterInfo(), I, llvm::ImplicitDefine, llvm::Register::isPhysical(), llvm_unreachable, MBB, llvm::MachineMemOperand::MOLoad, llvm::predOps(), and TRI.
Referenced by llvm::Thumb2InstrInfo::loadRegFromStackSlot().
|
override |
Definition at line 6029 of file ARMBaseInstrInfo.cpp.
References 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 2838 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::MachineRegisterInfo::getUniqueVRegDef(), 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, llvm::ARMCC::NE, Opc, llvm::ARMCC::PL, llvm::SmallVectorTemplateBase< T, bool >::push_back(), TRI, llvm::MachineRegisterInfo::use_instr_begin(), llvm::MachineRegisterInfo::use_instr_end(), llvm::ARMCC::VC, and llvm::ARMCC::VS.
|
override |
Definition at line 2165 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), assert(), llvm::BuildMI(), llvm::MachineInstr::clearKillInfo(), llvm::condCodeOp(), llvm::MachineRegisterInfo::constrainRegClass(), DefMI, llvm::SmallPtrSetImpl< PtrType >::erase(), llvm::MachineInstr::getNumOperands(), llvm::MCInstrDesc::getNumOperands(), llvm::ARMCC::getOppositeCondition(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::MachineInstr::hasOptionalDef(), llvm::SmallPtrSetImpl< PtrType >::insert(), MI, llvm::MCInstrDesc::operands(), llvm::MachineOperand::setImplicit(), and llvm::MachineInstr::tieOperands().
Referenced by llvm::Thumb2InstrInfo::optimizeSelect().
|
override |
Definition at line 427 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 2045 of file ARMBaseInstrInfo.cpp.
References llvm::findCMPToFoldIntoCBZ(), getInstSizeInBytes(), getRegisterInfo(), MI, and Size.
|
override |
Definition at line 1706 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::MachineRegisterInfo::getVRegDef(), llvm::ARMConstantPoolValue::hasSameValue(), llvm::MachineInstr::IgnoreVRegDefs, llvm::MachineInstr::isIdenticalTo(), llvm::MachineOperand::isIdenticalTo(), llvm::MachineConstantPoolEntry::isMachineConstantPoolEntry(), llvm::Register::isVirtual(), llvm::MachineConstantPoolEntry::MachineCPVal, produceSameValue(), and llvm::MachineConstantPoolEntry::Val.
Referenced by produceSameValue().
|
override |
Definition at line 1654 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 297 of file ARMBaseInstrInfo.cpp.
References assert(), I, llvm::isCondBranchOpcode(), llvm::isUncondBranchOpcode(), and MBB.
Referenced by analyzeBranch().
|
override |
Definition at line 376 of file ARMBaseInstrInfo.cpp.
References Cond, and llvm::ARMCC::getOppositeCondition().
|
override |
Definition at line 4957 of file ARMBaseInstrInfo.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::ARMCC::AL, assert(), llvm::BuildMI(), llvm::Define, ExeNEON, llvm::get(), getCorrespondingDRegAndLane(), getImplicitSPRUseForDPRUse(), getRegisterInfo(), llvm::getUndefRegState(), llvm::Implicit, isPredicated(), llvm_unreachable, MI, llvm::predOps(), TRI, and llvm::Undef.
|
override |
Enable outlining by default at -Oz.
Definition at line 6490 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.
shouldScheduleLoadsNear - This is a used by the pre-regalloc scheduler to determine (in conjunction with areLoadsFromSameBasePtr) if two loads should be scheduled together.
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 1860 of file ARMBaseInstrInfo.cpp.
References assert(), and llvm::SDNode::getMachineOpcode().
|
override |
Definition at line 3118 of file ARMBaseInstrInfo.cpp.
References analyzeCompare(), isPredicated(), isRedundantFlagInstr(), MI, and llvm::Next.
|
override |
Definition at line 942 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 461 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().