|
LLVM
10.0.0
|
#include "Target/Hexagon/HexagonInstrInfo.h"
Definition at line 38 of file HexagonInstrInfo.h.
|
explicit |
Definition at line 117 of file HexagonInstrInfo.cpp.
| bool HexagonInstrInfo::addLatencyToSchedule | ( | const MachineInstr & | MI1, |
| const MachineInstr & | MI2 | ||
| ) | const |
Definition at line 2934 of file HexagonInstrInfo.cpp.
References isHVXVec(), and isVecUsableNextPacket().
|
override |
Analyze the branching code at the end of MBB, returning true if it cannot be understood (e.g.
This function can analyze one/two way branching only and should (mostly) be called by target independent side.
it's a switch dispatch or isn't implemented for a target). Upon success, this returns false and returns with the following information in various cases:
Note that removeBranch and insertBranch must be implemented to support cases where this method returns success.
If AllowModify is true, then this routine is allowed to modify the basic block (e.g. delete instructions after the unconditional branch).
First entry is always the opcode of the branching instruction, except when the Cond vector is supposed to be empty, e.g., when AnalyzeBranch fails, a BB with only unconditional jump. Subsequent entries depend upon the opcode, e.g. Jump_c p will have Cond[0] = Jump_c Cond[1] = p HW-loop ENDLOOP: Cond[0] = ENDLOOP Cond[1] = MBB New value jump: Cond[0] = Hexagon::CMPEQri_f_Jumpnv_t_V4 – specific opcode Cond[1] = R Cond[2] = Imm
Definition at line 385 of file HexagonInstrInfo.cpp.
Referenced by INITIALIZE_PASS().
|
override |
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.
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 1765 of file HexagonInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), and llvm::MachineOperand::isImm().
|
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 755 of file HexagonInstrInfo.cpp.
References llvm::MachineBasicBlock::end(), findLoopInstr(), llvm::MachineBasicBlock::getFirstTerminator(), I, and isEndLoopN().
Referenced by llvm::ModuloScheduleExpander::expand(), and llvm::PeelingModuloScheduleExpander::expand().
|
override |
Definition at line 1870 of file HexagonInstrInfo.cpp.
References getBaseAndOffsetPosition(), llvm::MachineOperand::getImm(), getMemAccessSize(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineInstr::hasOrderedMemoryRef(), llvm::MachineInstr::hasUnmodeledSideEffects(), llvm::MachineOperand::isImm(), isMemOp(), isPostIncrement(), and llvm::MachineInstr::mayLoad().
| bool HexagonInstrInfo::canExecuteInBundle | ( | const MachineInstr & | First, |
| const MachineInstr & | Second | ||
| ) | const |
Can these instructions execute at the same time in a bundle.
Definition at line 2952 of file HexagonInstrInfo.cpp.
References DisableNVSchedule, llvm::numbers::e, llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isUse(), mayBeNewStore(), and llvm::MachineInstr::mayStore().
Referenced by llvm::HexagonSubtarget::adjustSchedDependency(), getZeroLatency(), and hasDependence().
| short HexagonInstrInfo::changeAddrMode_abs_io | ( | short | Opc | ) | const |
Definition at line 4449 of file HexagonInstrInfo.cpp.
Referenced by changeAddrMode_abs_io().
|
inline |
Definition at line 493 of file HexagonInstrInfo.h.
References changeAddrMode_abs_io(), and llvm::MachineInstr::getOpcode().
| short HexagonInstrInfo::changeAddrMode_io_abs | ( | short | Opc | ) | const |
Definition at line 4453 of file HexagonInstrInfo.cpp.
Referenced by changeAddrMode_io_abs().
|
inline |
Definition at line 496 of file HexagonInstrInfo.h.
References changeAddrMode_io_abs(), and llvm::MachineInstr::getOpcode().
| short HexagonInstrInfo::changeAddrMode_io_pi | ( | short | Opc | ) | const |
Definition at line 4457 of file HexagonInstrInfo.cpp.
| short HexagonInstrInfo::changeAddrMode_io_rr | ( | short | Opc | ) | const |
Definition at line 4461 of file HexagonInstrInfo.cpp.
Referenced by changeAddrMode_io_rr().
|
inline |
Definition at line 499 of file HexagonInstrInfo.h.
References changeAddrMode_io_rr(), and llvm::MachineInstr::getOpcode().
| short HexagonInstrInfo::changeAddrMode_pi_io | ( | short | Opc | ) | const |
Definition at line 4465 of file HexagonInstrInfo.cpp.
| short HexagonInstrInfo::changeAddrMode_rr_io | ( | short | Opc | ) | const |
Definition at line 4469 of file HexagonInstrInfo.cpp.
Referenced by changeAddrMode_rr_io().
|
inline |
Definition at line 502 of file HexagonInstrInfo.h.
References changeAddrMode_rr_io(), and llvm::MachineInstr::getOpcode().
| short HexagonInstrInfo::changeAddrMode_rr_ur | ( | short | Opc | ) | const |
Definition at line 4473 of file HexagonInstrInfo.cpp.
Referenced by changeAddrMode_rr_ur().
|
inline |
Definition at line 505 of file HexagonInstrInfo.h.
References changeAddrMode_rr_ur(), and llvm::MachineInstr::getOpcode().
| short HexagonInstrInfo::changeAddrMode_ur_rr | ( | short | Opc | ) | const |
Definition at line 4477 of file HexagonInstrInfo.cpp.
Referenced by changeAddrMode_ur_rr().
|
inline |
Definition at line 508 of file HexagonInstrInfo.h.
References changeAddrMode_ur_rr(), and llvm::MachineInstr::getOpcode().
|
override |
Emit instructions to copy a pair of physical registers.
This function should support copies within any legal register class as well as any cross-class copies created during instruction selection.
The source and destination registers may overlap, which may require a careful implementation when multiple copy instructions are required for large registers. See for example the ARM target.
Definition at line 787 of file HexagonInstrInfo.cpp.
References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), contains(), llvm::dbgs(), llvm::getKillRegState(), llvm_unreachable, llvm::printMBBReference(), and llvm::printReg().
Referenced by expandPostRAPseudo(), getINCDECFromLEA(), and INITIALIZE_PASS().
|
override |
Allocate and return a hazard recognizer to use for this target when scheduling the machine instructions after register allocation.
Definition at line 1754 of file HexagonInstrInfo.cpp.
References llvm::TargetInstrInfo::CreateTargetPostRAHazardRecognizer(), and UseDFAHazardRec.
|
override |
Create machine specific model for scheduling.
Definition at line 1860 of file HexagonInstrInfo.cpp.
References llvm::TargetSubtargetInfo::getInstrItineraryData().
| unsigned HexagonInstrInfo::createVR | ( | MachineFunction * | MF, |
| MVT | VT | ||
| ) | const |
HexagonInstrInfo specifics.
Definition at line 1985 of file HexagonInstrInfo.cpp.
References llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MVT::f32, llvm::MVT::f64, llvm::MachineFunction::getRegInfo(), llvm::MVT::i1, llvm::MVT::i32, llvm::MVT::i64, llvm_unreachable, and MRI.
|
override |
Decompose the machine operand's target flags into two values - the direct target flag value and any of bit flags that are applied.
Definition at line 1951 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::MO_Bitmasks.
Referenced by llvm::MachineOperand::printTargetFlags().
|
override |
If the specified instruction defines any predicate or condition code register(s) used for predication, returns true as well as the definition predicate(s) by reference.
Definition at line 1619 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isRegMask(), and llvm::MachineInstr::modifiesRegister().
| bool HexagonInstrInfo::doesNotReturn | ( | const MachineInstr & | CallMI | ) | const |
Definition at line 2977 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
Referenced by isSchedulingBoundary().
|
override |
This function is called for all pseudo instructions that remain after register allocation.
expandPostRAPseudo - This function is called for all pseudo instructions that remain after register allocation.
Many pseudo instructions are created to help register allocation. This is the place to convert them into real instructions. The target can edit MI in place, or it can insert new instructions and erase MI. The function should return true if anything was changed.
Definition at line 983 of file HexagonInstrInfo.cpp.
References add(), llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), llvm::all_of(), assert(), llvm::LivePhysRegs::available(), llvm::BuildMI(), llvm::MachineRegisterInfo::clearKillFlags(), llvm::MachineInstrBuilder::cloneMemRefs(), copyPhysReg(), llvm::MachineBasicBlock::erase(), llvm::MachineInstr::getDebugLoc(), llvm::HexagonRegisterInfo::getFrameRegister(), llvm::MachineOperand::getImm(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::getKillRegState(), getLiveRegsAt(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::getRegState(), llvm::MachineOperand::getSubReg(), llvm::RegState::Implicit, isConstant(), llvm::MachineOperand::isKill(), llvm::MachineOperand::isUndef(), llvm::RegState::Kill, mayAlias(), llvm::MachineInstr::memoperands(), MI, llvm::MachineMemOperand::MOLoad, llvm::MachineMemOperand::MOVolatile, MRI, Reg, llvm::MachineInstr::setDesc(), TII, and llvm::RegState::Undef.
Referenced by INITIALIZE_PASS().
| MachineBasicBlock::instr_iterator HexagonInstrInfo::expandVGatherPseudo | ( | MachineInstr & | MI | ) | const |
Definition at line 1436 of file HexagonInstrInfo.cpp.
References add(), llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineBasicBlock::erase(), llvm::MachineInstr::getDebugLoc(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineInstr::getParent().
| MachineInstr * HexagonInstrInfo::findLoopInstr | ( | MachineBasicBlock * | BB, |
| unsigned | EndLoopOp, | ||
| MachineBasicBlock * | TargetBB, | ||
| SmallPtrSet< MachineBasicBlock *, 8 > & | Visited | ||
| ) | const |
Find the hardware loop instruction used to set-up the specified loop.
On Hexagon, we have two instructions used to set-up the hardware loop (LOOP0, LOOP1) with corresponding endloop (ENDLOOP0, ENDLOOP1) instructions to indicate the end of a loop.
Definition at line 146 of file HexagonInstrInfo.cpp.
References E, I, llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::MachineBasicBlock::predecessors().
Referenced by analyzeLoopForPipelining().
| void HexagonInstrInfo::genAllInsnTimingClasses | ( | MachineFunction & | MF | ) | const |
Definition at line 4387 of file HexagonInstrInfo.cpp.
References B, llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), llvm::BuildMI(), llvm::dbgs(), llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getDesc(), getName(), llvm::MachineInstr::getOpcode(), llvm::MCInstrDesc::getSchedClass(), I, and LLVM_DEBUG.
| unsigned HexagonInstrInfo::getAddrMode | ( | const MachineInstr & | MI | ) | const |
Definition at line 3148 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::AddrModeMask, llvm::HexagonII::AddrModePos, F(), llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by llvm::HexagonSubtarget::BankConflictMutation::apply(), getBaseAndOffset(), getNonExtOpcode(), hasNonExtEquivalent(), isAbsoluteSet(), isBaseImmOffset(), and isPostIncrement().
| MachineOperand * HexagonInstrInfo::getBaseAndOffset | ( | const MachineInstr & | MI, |
| int64_t & | Offset, | ||
| unsigned & | AccessSize | ||
| ) | const |
Definition at line 3157 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::BaseImmOffset, llvm::HexagonII::BaseLongOffset, getAddrMode(), getBaseAndOffsetPosition(), llvm::MachineOperand::getImm(), getMemAccessSize(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getSubReg(), llvm::MachineOperand::isImm(), isMemOp(), and isPostIncrement().
Referenced by llvm::HexagonSubtarget::BankConflictMutation::apply(), and getMemOperandWithOffset().
|
override |
For instructions with a base and offset, return the position of the base register and offset operands.
Return the position of the base and offset operands for this instruction.
Definition at line 3190 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOperand(), isAddrModeWithOffset(), llvm::MachineOperand::isImm(), isMemOp(), isPostIncrement(), isPredicated(), llvm::MachineOperand::isReg(), llvm::MachineInstr::mayLoad(), and llvm::MachineInstr::mayStore().
Referenced by areMemAccessesTriviallyDisjoint(), getBaseAndOffset(), and getIncrementValue().
| SmallVector< MachineInstr *, 2 > HexagonInstrInfo::getBranchingInstrs | ( | MachineBasicBlock & | MBB | ) | const |
Definition at line 3227 of file HexagonInstrInfo.cpp.
References I, llvm::MachineBasicBlock::instr_begin(), llvm::MachineBasicBlock::instr_end(), llvm::MachineInstr::isBundle(), and llvm::SmallVectorTemplateBase< T >::push_back().
| bool HexagonInstrInfo::getBundleNoShuf | ( | const MachineInstr & | MIB | ) | const |
Definition at line 4442 of file HexagonInstrInfo.cpp.
References assert(), llvm::MachineInstr::getOperand(), and llvm::MachineInstr::isBundle().
| unsigned HexagonInstrInfo::getCExtOpNum | ( | const MachineInstr & | MI | ) | const |
Definition at line 3285 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::ExtendableOpMask, llvm::HexagonII::ExtendableOpPos, F(), llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by immediateExtend(), and isConstExtended().
| HexagonII::CompoundGroup HexagonInstrInfo::getCompoundCandidateGroup | ( | const MachineInstr & | MI | ) | const |
Definition at line 3292 of file HexagonInstrInfo.cpp.
References contains(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::HexagonII::HCG_A, llvm::HexagonII::HCG_B, llvm::HexagonII::HCG_C, llvm::HexagonII::HCG_None, llvm::MachineOperand::isImm(), and isIntRegForSubInst().
Referenced by getCompoundOpcode().
| unsigned HexagonInstrInfo::getCompoundOpcode | ( | const MachineInstr & | GA, |
| const MachineInstr & | GB | ||
| ) | const |
Definition at line 3380 of file HexagonInstrInfo.cpp.
References assert(), getCompoundCandidateGroup(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::HexagonII::HCG_A, llvm::HexagonII::HCG_B, llvm::MachineOperand::isImm(), and llvm::MachineInstr::readsRegister().
| int HexagonInstrInfo::getCondOpcode | ( | int | Opc, |
| bool | sense | ||
| ) | const |
Definition at line 3406 of file HexagonInstrInfo.cpp.
References llvm_unreachable.
| int HexagonInstrInfo::getDotCurOp | ( | const MachineInstr & | MI | ) | const |
Definition at line 3418 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), and llvm_unreachable.
| int HexagonInstrInfo::getDotNewOp | ( | const MachineInstr & | MI | ) | const |
Definition at line 3531 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), llvm::report_fatal_error(), and llvm::to_string().
Referenced by llvm::HexagonHazardRecognizer::EmitInstruction(), and llvm::HexagonHazardRecognizer::getHazardType().
| int HexagonInstrInfo::getDotNewPredJumpOp | ( | const MachineInstr & | MI, |
| const MachineBranchProbabilityInfo * | MBPI | ||
| ) | const |
Definition at line 3572 of file HexagonInstrInfo.cpp.
References assert(), B, llvm::MachineBranchProbabilityInfo::getEdgeProbability(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), I, llvm::MachineInstr::isConditionalBranch(), llvm::MachineOperand::isMBB(), llvm_unreachable, llvm::MachineBasicBlock::succ_size(), and llvm::MachineBasicBlock::successors().
Referenced by getDotNewPredOp().
| int HexagonInstrInfo::getDotNewPredOp | ( | const MachineInstr & | MI, |
| const MachineBranchProbabilityInfo * | MBPI | ||
| ) | const |
Definition at line 3658 of file HexagonInstrInfo.cpp.
References getDotNewPredJumpOp(), and llvm::MachineInstr::getOpcode().
| int HexagonInstrInfo::getDotOldOp | ( | const MachineInstr & | MI | ) | const |
Definition at line 3673 of file HexagonInstrInfo.cpp.
References assert(), llvm::MachineInstr::getOpcode(), isNewValueStore(), isPredicated(), and isPredicatedNew().
| HexagonII::SubInstructionGroup HexagonInstrInfo::getDuplexCandidateGroup | ( | const MachineInstr & | MI | ) | const |
Definition at line 3724 of file HexagonInstrInfo.cpp.
References contains(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getOffset(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::HexagonRegisterInfo::getStackRegister(), llvm::HexagonII::HSIG_A, llvm::HexagonII::HSIG_L1, llvm::HexagonII::HSIG_L2, llvm::HexagonII::HSIG_None, llvm::HexagonII::HSIG_S1, llvm::HexagonII::HSIG_S2, isDblRegForSubInst(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isImm(), and isIntRegForSubInst().
Referenced by isDuplexPair().
| short HexagonInstrInfo::getEquivalentHWInstr | ( | const MachineInstr & | MI | ) | const |
Definition at line 4070 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
|
override |
If the instruction is an increment of a constant value, return the amount.
Definition at line 1928 of file HexagonInstrInfo.cpp.
References getBaseAndOffsetPosition(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::isImm(), and isPostIncrement().
|
override |
Measure the specified inline asm to determine an approximation of its length.
Comments (which run till the next SeparatorString or newline) do not count as an instruction. Any other non-whitespace text is considered an instruction, with multiple instructions separated by SeparatorString or newlines. Variable-length instructions are not handled here; this function may be overloaded in the target code to do that. Hexagon counts the number of ##'s and adjust for that many constant exenders.
Definition at line 1726 of file HexagonInstrInfo.cpp.
References llvm::StringRef::count(), llvm::StringRef::data(), llvm::MCAsmInfo::getCommentString(), llvm::MCAsmInfo::getMaxInstLength(), llvm::MCAsmInfo::getSeparatorString(), and llvm::StringRef::size().
Referenced by getSize().
|
override |
Compute the instruction latency of a given instruction.
If the instruction has higher cost when predicated, it's returned via PredCost.
Definition at line 1854 of file HexagonInstrInfo.cpp.
References getInstrTimingClassLatency().
Referenced by getInstrTimingClassLatency().
| unsigned HexagonInstrInfo::getInstrTimingClassLatency | ( | const InstrItineraryData * | ItinData, |
| const MachineInstr & | MI | ||
| ) | const |
Definition at line 4074 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), getInstrLatency(), llvm::MCInstrDesc::getSchedClass(), llvm::InstrItineraryData::getStageLatency(), and llvm::MachineInstr::isTransient().
Referenced by getInstrLatency().
Definition at line 4149 of file HexagonInstrInfo.cpp.
References isPredicatedTrue(), and llvm_unreachable.
Referenced by invertAndChangeJumpTarget(), and reversePredSense().
| bool HexagonInstrInfo::getInvertedPredSense | ( | SmallVectorImpl< MachineOperand > & | Cond | ) | const |
Definition at line 4140 of file HexagonInstrInfo.cpp.
| int HexagonInstrInfo::getMaxValue | ( | const MachineInstr & | MI | ) | const |
Definition at line 4160 of file HexagonInstrInfo.cpp.
References bits, llvm::HexagonII::ExtentBitsMask, llvm::HexagonII::ExtentBitsPos, llvm::HexagonII::ExtentSignedMask, llvm::HexagonII::ExtentSignedPos, F(), llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by isConstExtended().
| unsigned HexagonInstrInfo::getMemAccessSize | ( | const MachineInstr & | MI | ) | const |
Definition at line 4202 of file HexagonInstrInfo.cpp.
References F(), llvm::MachineInstr::getDesc(), llvm::HexagonII::getMemAccessSizeInBytes(), llvm::HexagonII::HVXVectorAccess, llvm_unreachable, llvm::HexagonII::MemAccesSizeMask, llvm::HexagonII::MemAccessSizePos, Size, and llvm::MCInstrDesc::TSFlags.
Referenced by areMemAccessesTriviallyDisjoint(), and getBaseAndOffset().
|
override |
Get the base register and byte offset of a load/store instr.
Definition at line 2943 of file HexagonInstrInfo.cpp.
References getBaseAndOffset(), and llvm::MachineOperand::isReg().
Referenced by llvm::createStoreClusterDAGMutation(), llvm::TargetInstrInfo::describeLoadedValue(), and INITIALIZE_PASS().
| int HexagonInstrInfo::getMinValue | ( | const MachineInstr & | MI | ) | const |
Definition at line 4222 of file HexagonInstrInfo.cpp.
References bits, llvm::HexagonII::ExtentBitsMask, llvm::HexagonII::ExtentBitsPos, llvm::HexagonII::ExtentSignedMask, llvm::HexagonII::ExtentSignedPos, F(), llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by isConstExtended().
| int HexagonInstrInfo::getNonDotCurOp | ( | const MachineInstr & | MI | ) | const |
Definition at line 3434 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), and llvm_unreachable.
| short HexagonInstrInfo::getNonExtOpcode | ( | const MachineInstr & | MI | ) | const |
Definition at line 4236 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::Absolute, llvm::HexagonII::BaseImmOffset, llvm::HexagonII::BaseLongOffset, getAddrMode(), llvm::MachineInstr::getDesc(), llvm::MachineInstr::getOpcode(), llvm::MCInstrDesc::mayLoad(), and llvm::MCInstrDesc::mayStore().
|
override |
getOperandLatency - Compute and return the use operand latency of a given pair of def and use.
In most cases, the static scheduling itinerary was enough to determine the operand latency. But it may not be possible for instructions with variable number of defs / uses.
This is a raw interface to the itinerary that may be directly overriden by a target. Use computeOperandLatency to get the best estimate of latency.
Definition at line 4094 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::findRegisterDefOperandIdx(), llvm::MachineInstr::findRegisterUseOperandIdx(), llvm::MachineInstr::getOperand(), llvm::TargetInstrInfo::getOperandLatency(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isImplicit(), llvm::Register::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MCRegisterInfo::DiffListIterator::isValid(), and llvm::Latency.
Referenced by llvm::HexagonSubtarget::adjustSchedDependency(), and llvm::HexagonSubtarget::usePredicatedCalls().
| bool HexagonInstrInfo::getPredReg | ( | ArrayRef< MachineOperand > | Cond, |
| unsigned & | PredReg, | ||
| unsigned & | PredRegPos, | ||
| unsigned & | PredRegFlags | ||
| ) | const |
Definition at line 4260 of file HexagonInstrInfo.cpp.
| short HexagonInstrInfo::getPseudoInstrPair | ( | const MachineInstr & | MI | ) | const |
Definition at line 4280 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
| short HexagonInstrInfo::getRegForm | ( | const MachineInstr & | MI | ) | const |
Definition at line 4284 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
|
override |
Return an array that contains the bitmask target flag values and their names.
MIR Serialization is able to serialize only the target flags that are defined by this method.
Definition at line 1976 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::HMOTF_ConstExtended, and llvm::makeArrayRef().
Referenced by llvm::PerTargetMIParsingState::getDirectTargetFlag(), and llvm::MachineOperand::printTargetFlags().
|
override |
Return an array that contains the direct target flag values and their names.
MIR Serialization is able to serialize only the target flags that are defined by this method.
Definition at line 1957 of file HexagonInstrInfo.cpp.
References llvm::makeArrayRef(), llvm::HexagonII::MO_GDGOT, llvm::HexagonII::MO_GDPLT, llvm::AArch64II::MO_GOT, llvm::HexagonII::MO_GPREL, llvm::ARMII::MO_HI16, llvm::HexagonII::MO_IE, llvm::HexagonII::MO_IEGOT, llvm::ARMII::MO_LO16, llvm::HexagonII::MO_PCREL, and llvm::HexagonII::MO_TPREL.
Referenced by llvm::PerTargetMIParsingState::getTargetIndex().
| unsigned HexagonInstrInfo::getSize | ( | const MachineInstr & | MI | ) | const |
Definition at line 4292 of file HexagonInstrInfo.cpp.
References assert(), BranchRelaxAsmLarge, llvm::MachineInstr::getDesc(), getInlineAsmLength(), llvm::TargetMachine::getMCAsmInfo(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MCInstrDesc::getSize(), llvm::MachineOperand::getSymbolName(), llvm::MachineFunction::getTarget(), HEXAGON_INSTR_SIZE, llvm::ISD::INLINEASM, isConstExtended(), llvm::MachineInstr::isDebugInstr(), llvm::MachineOperand::isDef(), isExtended(), llvm::MachineInstr::isPosition(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isSymbol(), and Size.
Referenced by isHardwareLoop().
| uint64_t HexagonInstrInfo::getType | ( | const MachineInstr & | MI | ) | const |
Definition at line 4326 of file HexagonInstrInfo.cpp.
References F(), llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::TSFlags, llvm::HexagonII::TypeMask, and llvm::HexagonII::TypePos.
Referenced by llvm::HexagonSubtarget::HVXMemLatencyMutation::apply(), cannotCoexistAsymm(), isCompoundBranchInstr(), isHVXVec(), and isLateSourceInstr().
| unsigned HexagonInstrInfo::getUnits | ( | const MachineInstr & | MI | ) | const |
Definition at line 4331 of file HexagonInstrInfo.cpp.
References llvm::InstrItineraryData::beginStage(), llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::getSchedClass(), and llvm::InstrStage::getUnits().
| bool HexagonInstrInfo::hasEHLabel | ( | const MachineBasicBlock * | B | ) | const |
Definition at line 2982 of file HexagonInstrInfo.cpp.
References I.
|
override |
Check if the instruction or the bundle of instructions has load from stack slots.
This function checks if the instruction or bundle of instructions has load from stack slot and returns frameindex and machine memory operand of that instruction if true.
Return the frameindex and machine memory operand if true.
Definition at line 337 of file HexagonInstrInfo.cpp.
References llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getParent(), llvm::TargetInstrInfo::hasLoadFromStackSlot(), llvm::MachineBasicBlock::instr_end(), and llvm::MachineInstr::isBundle().
| bool HexagonInstrInfo::hasNonExtEquivalent | ( | const MachineInstr & | MI | ) | const |
Definition at line 2991 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::Absolute, llvm::HexagonII::BaseImmOffset, llvm::HexagonII::BaseLongOffset, getAddrMode(), llvm::MachineInstr::getDesc(), llvm::MachineInstr::getOpcode(), llvm::MCInstrDesc::mayLoad(), and llvm::MCInstrDesc::mayStore().
| bool HexagonInstrInfo::hasPseudoInstrPair | ( | const MachineInstr & | MI | ) | const |
Definition at line 3026 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
|
override |
Check if the instruction or the bundle of instructions has store to stack slots.
This function checks if the instruction or bundle of instructions has store to stack slot and returns frameindex and machine memory operand of that instruction if true.
Return the frameindex and machine memory operand if true.
Definition at line 355 of file HexagonInstrInfo.cpp.
References llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineInstr::getParent(), llvm::TargetInstrInfo::hasStoreToStackSlot(), llvm::MachineBasicBlock::instr_end(), and llvm::MachineInstr::isBundle().
| bool HexagonInstrInfo::hasUncondBranch | ( | const MachineBasicBlock * | B | ) | const |
Definition at line 3031 of file HexagonInstrInfo.cpp.
References E, llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getFirstTerminator(), and I.
| void HexagonInstrInfo::immediateExtend | ( | MachineInstr & | MI | ) | const |
immediateExtend - Changes the instruction in place to one using an immediate extender.
Definition at line 4353 of file HexagonInstrInfo.cpp.
References llvm::MachineOperand::addTargetFlag(), assert(), getCExtOpNum(), llvm::MachineInstr::getOperand(), llvm::HexagonII::HMOTF_ConstExtended, isConstExtended(), isExtendable(), llvm::MachineOperand::isImm(), and llvm::MachineOperand::isMBB().
|
override |
Insert branch code into the end of the specified MachineBasicBlock.
The operands to this method are the same as those returned by AnalyzeBranch. This is only invoked in cases where AnalyzeBranch returns success. It returns the number of instructions inserted.
It is also invoked by tail merging to add unconditional branches in cases where AnalyzeBranch doesn't apply because there was no original branch to analyze. At least this much must be implemented, else tail merging needs to be disabled.
Definition at line 578 of file HexagonInstrInfo.cpp.
Referenced by llvm::FastISel::fastEmitBranch().
|
override |
Insert a noop into the instruction stream at the specified point.
Definition at line 1539 of file HexagonInstrInfo.cpp.
References llvm::BuildMI().
Referenced by INITIALIZE_PASS().
| bool HexagonInstrInfo::invertAndChangeJumpTarget | ( | MachineInstr & | MI, |
| MachineBasicBlock * | NewTarget | ||
| ) | const |
Definition at line 4366 of file HexagonInstrInfo.cpp.
References assert(), llvm::dbgs(), llvm::MachineInstr::dump(), EnableBranchPrediction, getInvertedPredicatedOpcode(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::isBranch(), llvm::MachineOperand::isMBB(), isPredicatedNew(), LLVM_DEBUG, llvm::printMBBReference(), reversePrediction(), llvm::MachineInstr::setDesc(), and llvm::MachineOperand::setMBB().
| bool HexagonInstrInfo::isAbsoluteSet | ( | const MachineInstr & | MI | ) | const |
Definition at line 2002 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::AbsoluteSet, and getAddrMode().
| bool HexagonInstrInfo::isAccumulator | ( | const MachineInstr & | MI | ) | const |
Definition at line 2006 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::AccumulatorMask, llvm::HexagonII::AccumulatorPos, F(), llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
Referenced by isVecAcc().
| bool HexagonInstrInfo::isAddrModeWithOffset | ( | const MachineInstr & | MI | ) | const |
Definition at line 4174 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::AddrModeMask, llvm::HexagonII::AddrModePos, llvm::HexagonII::BaseImmOffset, llvm::HexagonII::BaseLongOffset, llvm::HexagonII::BaseRegOffset, F(), llvm::MachineInstr::getDesc(), llvm::MachineInstr::getOpcode(), and llvm::MCInstrDesc::TSFlags.
Referenced by getBaseAndOffsetPosition().
| bool HexagonInstrInfo::isBaseImmOffset | ( | const MachineInstr & | MI | ) | const |
Definition at line 2011 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::BaseImmOffset, and getAddrMode().
| bool HexagonInstrInfo::isComplex | ( | const MachineInstr & | MI | ) | const |
Definition at line 2015 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::getOpcode(), llvm::MachineInstr::isBranch(), llvm::MachineInstr::isCall(), isMemOp(), llvm::MachineInstr::isReturn(), isTC1(), isTC2Early(), llvm::MCInstrDesc::mayLoad(), and llvm::MCInstrDesc::mayStore().
| bool HexagonInstrInfo::isCompoundBranchInstr | ( | const MachineInstr & | MI | ) | const |
Definition at line 2024 of file HexagonInstrInfo.cpp.
References getType(), llvm::MachineInstr::isBranch(), and llvm::HexagonII::TypeCJ.
| bool HexagonInstrInfo::isConstExtended | ( | const MachineInstr & | MI | ) | const |
Definition at line 2030 of file HexagonInstrInfo.cpp.
References assert(), llvm::HexagonII::ExtendableMask, llvm::HexagonII::ExtendablePos, llvm::HexagonII::ExtendedMask, llvm::HexagonII::ExtendedPos, F(), getCExtOpNum(), llvm::MachineInstr::getDesc(), llvm::MachineOperand::getImm(), getMaxValue(), getMinValue(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getTargetFlags(), llvm::HexagonII::HMOTF_ConstExtended, llvm::MachineOperand::isBlockAddress(), llvm::MachineInstr::isCall(), llvm::MachineOperand::isCPI(), isExtendable(), isExtended(), llvm::MachineOperand::isFPImm(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isJTI(), llvm::MachineOperand::isMBB(), llvm::MachineOperand::isSymbol(), and llvm::MCInstrDesc::TSFlags.
Referenced by getSize(), and immediateExtend().
| bool HexagonInstrInfo::isDeallocRet | ( | const MachineInstr & | MI | ) | const |
Definition at line 2073 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
| bool HexagonInstrInfo::isDependent | ( | const MachineInstr & | ProdMI, |
| const MachineInstr & | ConsMI | ||
| ) | const |
Definition at line 2088 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::getNumDefs(), llvm::Register::isPhysicalRegister(), llvm::MCRegisterInfo::DiffListIterator::isValid(), and parseOperands().
Referenced by producesStall().
| bool HexagonInstrInfo::isDotCurInst | ( | const MachineInstr & | MI | ) | const |
Definition at line 2123 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
| bool HexagonInstrInfo::isDotNewInst | ( | const MachineInstr & | MI | ) | const |
Definition at line 2134 of file HexagonInstrInfo.cpp.
References isNewValueInst(), isPredicated(), and isPredicatedNew().
| bool HexagonInstrInfo::isDuplexPair | ( | const MachineInstr & | MIa, |
| const MachineInstr & | MIb | ||
| ) | const |
Symmetrical. See if these two instructions are fit for duplex pair.
Definition at line 2142 of file HexagonInstrInfo.cpp.
References getDuplexCandidateGroup(), and isDuplexPairMatch().
| bool HexagonInstrInfo::isEarlySourceInstr | ( | const MachineInstr & | MI | ) | const |
Definition at line 2149 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::getSchedClass(), llvm::is_TC3x(), llvm::is_TC4x(), llvm::MachineInstr::isCompare(), and llvm::MachineInstr::mayLoadOrStore().
Referenced by isLateInstrFeedsEarlyInstr().
Definition at line 2158 of file HexagonInstrInfo.cpp.
Referenced by analyzeLoopForPipelining().
Definition at line 2163 of file HexagonInstrInfo.cpp.
References llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_JumpTableIndex, and llvm::MachineOperand::MO_MachineBasicBlock.
| bool HexagonInstrInfo::isExtendable | ( | const MachineInstr & | MI | ) | const |
Definition at line 2177 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::ExtendableMask, llvm::HexagonII::ExtendablePos, F(), llvm::MachineInstr::getDesc(), llvm::MachineInstr::getOpcode(), and llvm::MCInstrDesc::TSFlags.
Referenced by immediateExtend(), and isConstExtended().
| bool HexagonInstrInfo::isExtended | ( | const MachineInstr & | MI | ) | const |
Definition at line 2199 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::ExtendedMask, llvm::HexagonII::ExtendedPos, F(), llvm::MachineInstr::getDesc(), llvm::HexagonII::HMOTF_ConstExtended, llvm::MachineInstr::operands(), and llvm::MCInstrDesc::TSFlags.
Referenced by getSize(), and isConstExtended().
| bool HexagonInstrInfo::isFloat | ( | const MachineInstr & | MI | ) | const |
Definition at line 2212 of file HexagonInstrInfo.cpp.
References F(), llvm::HexagonII::FPMask, llvm::HexagonII::FPPos, and llvm::MachineInstr::getOpcode().
| bool HexagonInstrInfo::isHVXMemWithAIndirect | ( | const MachineInstr & | I, |
| const MachineInstr & | J | ||
| ) | const |
Definition at line 2219 of file HexagonInstrInfo.cpp.
References isHVXVec(), llvm::MachineInstr::isIndirectBranch(), isIndirectCall(), isIndirectL4Return(), llvm::MachineInstr::mayLoad(), and llvm::MachineInstr::mayStore().
Referenced by cannotCoexistAsymm().
| bool HexagonInstrInfo::isHVXVec | ( | const MachineInstr & | MI | ) | const |
Definition at line 2633 of file HexagonInstrInfo.cpp.
References getType(), llvm::HexagonII::TypeCVI_FIRST, and llvm::HexagonII::TypeCVI_LAST.
Referenced by addLatencyToSchedule(), llvm::HexagonHazardRecognizer::EmitInstruction(), isHVXMemWithAIndirect(), isVecAcc(), and producesStall().
| bool HexagonInstrInfo::isIndirectCall | ( | const MachineInstr & | MI | ) | const |
Definition at line 2228 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
Referenced by isHVXMemWithAIndirect().
| bool HexagonInstrInfo::isIndirectL4Return | ( | const MachineInstr & | MI | ) | const |
Definition at line 2239 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
Referenced by isHVXMemWithAIndirect().
| bool HexagonInstrInfo::isJumpR | ( | const MachineInstr & | MI | ) | const |
Definition at line 2253 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
| bool HexagonInstrInfo::isJumpWithinBranchRange | ( | const MachineInstr & | MI, |
| unsigned | offset | ||
| ) | const |
Definition at line 2271 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), and isNewValueJump().
| bool HexagonInstrInfo::isLateInstrFeedsEarlyInstr | ( | const MachineInstr & | LRMI, |
| const MachineInstr & | ESMI | ||
| ) | const |
Definition at line 2313 of file HexagonInstrInfo.cpp.
References llvm::dbgs(), llvm::MachineInstr::dump(), isEarlySourceInstr(), isLateResultInstr(), and LLVM_DEBUG.
| bool HexagonInstrInfo::isLateResultInstr | ( | const MachineInstr & | MI | ) | const |
Definition at line 2331 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MachineInstr::getOpcode(), llvm::MCInstrDesc::getSchedClass(), llvm::ISD::INLINEASM, and llvm::is_TC1().
Referenced by isLateInstrFeedsEarlyInstr().
| bool HexagonInstrInfo::isLateSourceInstr | ( | const MachineInstr & | MI | ) | const |
Definition at line 2350 of file HexagonInstrInfo.cpp.
References getType(), and llvm::HexagonII::TypeCVI_VX_LATE.
Referenced by isVecUsableNextPacket().
|
override |
TargetInstrInfo overrides.
isLoadFromStackSlot - If the specified machine instruction is a direct load from a stack slot, return the virtual or physical register number of the destination along with the FrameIndex of the loaded stack slot.
If the specified machine instruction is a direct load from a stack slot, return the virtual or physical register number of the destination along with the FrameIndex of the loaded stack slot. If not, return 0. This predicate must return 0 if the instruction has any side effects other than loading from the stack slot.
If not, return 0. This predicate must return 0 if the instruction has any side effects other than loading from the stack slot.
Definition at line 239 of file HexagonInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), and llvm::MachineOperand::isImm().
Referenced by InstructionStoresToFI(), and isFullCopyOf().
| bool HexagonInstrInfo::isLoopN | ( | const MachineInstr & | MI | ) | const |
Definition at line 2356 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
| bool HexagonInstrInfo::isMemOp | ( | const MachineInstr & | MI | ) | const |
Definition at line 2368 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
Referenced by areMemAccessesTriviallyDisjoint(), getBaseAndOffset(), getBaseAndOffsetPosition(), and isComplex().
| bool HexagonInstrInfo::isNewValue | ( | const MachineInstr & | MI | ) | const |
Definition at line 2400 of file HexagonInstrInfo.cpp.
References F(), llvm::MachineInstr::getDesc(), llvm::HexagonII::NewValueMask, llvm::HexagonII::NewValuePos, and llvm::MCInstrDesc::TSFlags.
Referenced by isNewValueJump(), and isPredictedTaken().
Definition at line 2405 of file HexagonInstrInfo.cpp.
References F(), llvm::HexagonII::NewValueMask, and llvm::HexagonII::NewValuePos.
| bool HexagonInstrInfo::isNewValueInst | ( | const MachineInstr & | MI | ) | const |
Definition at line 2410 of file HexagonInstrInfo.cpp.
References isNewValueJump(), and isNewValueStore().
Referenced by isDotNewInst().
| bool HexagonInstrInfo::isNewValueJump | ( | const MachineInstr & | MI | ) | const |
Definition at line 2414 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::isBranch(), and isNewValue().
Referenced by isJumpWithinBranchRange(), and isNewValueInst().
Definition at line 2418 of file HexagonInstrInfo.cpp.
References isBranch(), isNewValue(), and isPredicated().
| bool HexagonInstrInfo::isNewValueStore | ( | const MachineInstr & | MI | ) | const |
Definition at line 2422 of file HexagonInstrInfo.cpp.
References F(), llvm::MachineInstr::getDesc(), llvm::HexagonII::NVStoreMask, llvm::HexagonII::NVStorePos, and llvm::MCInstrDesc::TSFlags.
Referenced by cannotCoexistAsymm(), getDotOldOp(), and isNewValueInst().
Definition at line 2427 of file HexagonInstrInfo.cpp.
References F(), llvm::HexagonII::NVStoreMask, and llvm::HexagonII::NVStorePos.
| bool HexagonInstrInfo::isOperandExtended | ( | const MachineInstr & | MI, |
| unsigned | OperandNum | ||
| ) | const |
Definition at line 2433 of file HexagonInstrInfo.cpp.
References llvm::HexagonII::ExtendableOpMask, llvm::HexagonII::ExtendableOpPos, F(), llvm::MachineInstr::getDesc(), and llvm::MCInstrDesc::TSFlags.
|
override |
Return true for post-incremented instructions.
Definition at line 1545 of file HexagonInstrInfo.cpp.
References getAddrMode(), and llvm::HexagonII::PostInc.
Referenced by areMemAccessesTriviallyDisjoint(), getBaseAndOffset(), getBaseAndOffsetPosition(), getIncrementValue(), and getPostIncrementOperand().
|
override |
Return true if the specified instruction can be predicated.
By default, this returns true for every instruction with a PredicateOperand.
Definition at line 1646 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::isCall(), llvm::MCInstrDesc::isPredicable(), and isTailCall().
|
override |
Returns true if the instruction is already predicated.
Definition at line 1557 of file HexagonInstrInfo.cpp.
References F(), llvm::MachineInstr::getDesc(), llvm::HexagonII::PredicatedMask, llvm::HexagonII::PredicatedPos, and llvm::MCInstrDesc::TSFlags.
Referenced by llvm::HexagonEvaluator::evaluate(), getBaseAndOffsetPosition(), getDotOldOp(), getPredicatedRegister(), getPredicateSense(), isDotNewInst(), isNewValueJump(), isPredicatedNew(), and llvm::rdf::TargetOperandInfo::isPreserving().
Definition at line 2466 of file HexagonInstrInfo.cpp.
References F(), llvm::HexagonII::PredicatedMask, and llvm::HexagonII::PredicatedPos.
| bool HexagonInstrInfo::isPredicatedNew | ( | const MachineInstr & | MI | ) | const |
Definition at line 2440 of file HexagonInstrInfo.cpp.
References assert(), F(), llvm::MachineInstr::getDesc(), isPredicated(), llvm::HexagonII::PredicatedNewMask, llvm::HexagonII::PredicatedNewPos, and llvm::MCInstrDesc::TSFlags.
Referenced by getDotOldOp(), invertAndChangeJumpTarget(), isDotNewInst(), and isPredictedTaken().
Definition at line 2446 of file HexagonInstrInfo.cpp.
References assert(), F(), isPredicated(), llvm::HexagonII::PredicatedNewMask, and llvm::HexagonII::PredicatedNewPos.
| bool HexagonInstrInfo::isPredicatedTrue | ( | const MachineInstr & | MI | ) | const |
Definition at line 2452 of file HexagonInstrInfo.cpp.
References F(), llvm::MachineInstr::getDesc(), llvm::HexagonII::PredicatedFalseMask, llvm::HexagonII::PredicatedFalsePos, and llvm::MCInstrDesc::TSFlags.
Referenced by getInvertedPredicatedOpcode(), and getPredicateSense().
Definition at line 2458 of file HexagonInstrInfo.cpp.
References assert(), F(), llvm::HexagonII::PredicatedFalseMask, llvm::HexagonII::PredicatedFalsePos, llvm::HexagonII::PredicatedMask, and llvm::HexagonII::PredicatedPos.
Definition at line 2471 of file HexagonInstrInfo.cpp.
References F(), llvm::HexagonII::PredicateLateMask, and llvm::HexagonII::PredicateLatePos.
Definition at line 2476 of file HexagonInstrInfo.cpp.
References assert(), F(), isBranch(), isNewValue(), isPredicatedNew(), llvm::HexagonII::TakenMask, and llvm::HexagonII::TakenPos.
Referenced by reversePrediction().
|
override |
Return true if it's profitable for if-converter to duplicate instructions of specified accumulated instruction latencies in the specified MBB to enable if-conversion.
The probability of the instructions being executed is given by Probability, and Confidence is a measure of our confidence that it will be properly predicted.
Definition at line 782 of file HexagonInstrInfo.cpp.
|
override |
Return true if it's profitable to predicate instructions with accumulated instruction latency of "NumCycles" of the specified basic block, where the probability of the instructions being executed is given by Probability, and Confidence is a measure of our confidence that it will be properly predicted.
Definition at line 769 of file HexagonInstrInfo.cpp.
References nonDbgBBSize().
|
override |
Second variant of isProfitableToIfCvt.
This one checks for the case where two basic blocks from true and false path of a if-then-else (diamond) are predicated on mutally exclusive predicates, where the probability of the true path being taken is given by Probability, and Confidence is a measure of our confidence that it will be properly predicted.
Definition at line 775 of file HexagonInstrInfo.cpp.
References nonDbgBBSize().
| bool HexagonInstrInfo::isSaveCalleeSavedRegsCall | ( | const MachineInstr & | MI | ) | const |
Definition at line 2483 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
|
override |
Test if the given instruction should be considered a scheduling boundary.
This primarily includes labels and terminators.
Definition at line 1682 of file HexagonInstrInfo.cpp.
References doesNotReturn(), llvm::MachineInstr::getDesc(), I, llvm::MachineInstr::isCall(), llvm::MachineInstr::isDebugInstr(), llvm::MachineInstr::isInlineAsm(), llvm::MachineInstr::isPosition(), llvm::MCInstrDesc::isTerminator(), ScheduleInlineAsm, and llvm::MachineBasicBlock::successors().
Referenced by INITIALIZE_PASS().
| bool HexagonInstrInfo::isSignExtendingLoad | ( | const MachineInstr & | MI | ) | const |
Definition at line 2490 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
| bool HexagonInstrInfo::isSolo | ( | const MachineInstr & | MI | ) | const |
Definition at line 2568 of file HexagonInstrInfo.cpp.
References F(), llvm::MachineInstr::getDesc(), llvm::HexagonII::SoloMask, llvm::HexagonII::SoloPos, and llvm::MCInstrDesc::TSFlags.
| bool HexagonInstrInfo::isSpillPredRegOp | ( | const MachineInstr & | MI | ) | const |
Definition at line 2573 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
|
override |
If the specified machine instruction is a direct store to a stack slot, return the virtual or physical register number of the source reg along with the FrameIndex of the loaded stack slot.
isStoreToStackSlot - If the specified machine instruction is a direct store to a stack slot, return the virtual or physical register number of the source reg along with the FrameIndex of the loaded stack slot.
If not, return 0. This predicate must return 0 if the instruction has any side effects other than storing to the stack slot.
Definition at line 287 of file HexagonInstrInfo.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isFI(), and llvm::MachineOperand::isImm().
Referenced by dumpMachineInstrRangeWithSlotIndex(), and isFullCopyOf().
|
override |
Definition at line 2583 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::isBranch(), and llvm::MachineInstr::operands().
Referenced by isLibCallInTailPosition(), and isPredicable().
| bool HexagonInstrInfo::isTC1 | ( | const MachineInstr & | MI | ) | const |
Definition at line 2594 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::getSchedClass(), and llvm::is_TC1().
Referenced by isComplex().
| bool HexagonInstrInfo::isTC2 | ( | const MachineInstr & | MI | ) | const |
Definition at line 2599 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::getSchedClass(), and llvm::is_TC2().
| bool HexagonInstrInfo::isTC2Early | ( | const MachineInstr & | MI | ) | const |
Definition at line 2604 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::getSchedClass(), and llvm::is_TC2early().
Referenced by isComplex().
| bool HexagonInstrInfo::isTC4x | ( | const MachineInstr & | MI | ) | const |
Definition at line 2609 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getDesc(), llvm::MCInstrDesc::getSchedClass(), and llvm::is_TC4x().
| bool HexagonInstrInfo::isToBeScheduledASAP | ( | const MachineInstr & | MI1, |
| const MachineInstr & | MI2 | ||
| ) | const |
Definition at line 2615 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), I, llvm::MachineOperand::isReg(), mayBeCurLoad(), mayBeNewStore(), and N.
Referenced by llvm::HexagonSubtarget::adjustSchedDependency(), and getZeroLatency().
Definition at line 2639 of file HexagonInstrInfo.cpp.
References llvm::MVT::f32, llvm::MVT::f64, llvm::EVT::getSimpleVT(), llvm::EVT::getSizeInBits(), llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i64, llvm::MVT::i8, llvm_unreachable, llvm::MVT::SimpleTy, Size, llvm::MVT::v128i8, llvm::MVT::v16i32, llvm::MVT::v16i64, llvm::MVT::v2i16, llvm::MVT::v2i32, llvm::MVT::v32i16, llvm::MVT::v32i32, llvm::MVT::v4i16, llvm::MVT::v4i8, llvm::MVT::v64i16, llvm::MVT::v64i8, llvm::MVT::v8i64, and llvm::MVT::v8i8.
Referenced by llvm::HexagonDAGToDAGISel::SelectIndexedLoad(), and llvm::HexagonDAGToDAGISel::SelectIndexedStore().
| bool HexagonInstrInfo::isValidOffset | ( | unsigned | Opcode, |
| int | Offset, | ||
| const TargetRegisterInfo * | TRI, | ||
| bool | Extend = true |
||
| ) | const |
Definition at line 2676 of file HexagonInstrInfo.cpp.
References assert(), llvm::TargetRegisterInfo::getSpillSize(), Hexagon_ADDI_OFFSET_MAX, Hexagon_MEMB_OFFSET_MAX, Hexagon_MEMD_OFFSET_MAX, Hexagon_MEMH_OFFSET_MAX, Hexagon_MEMW_OFFSET_MAX, llvm::ISD::INLINEASM, llvm::isPowerOf2_32(), llvm_unreachable, and llvm::Log2_32().
| bool HexagonInstrInfo::isVecAcc | ( | const MachineInstr & | MI | ) | const |
Definition at line 2829 of file HexagonInstrInfo.cpp.
References isAccumulator(), and isHVXVec().
Referenced by isVecUsableNextPacket().
| bool HexagonInstrInfo::isVecALU | ( | const MachineInstr & | MI | ) | const |
Definition at line 2833 of file HexagonInstrInfo.cpp.
References F(), llvm::MachineInstr::getOpcode(), llvm::HexagonII::TypeCVI_VA, llvm::HexagonII::TypeCVI_VA_DV, llvm::HexagonII::TypeMask, and llvm::HexagonII::TypePos.
Referenced by isVecUsableNextPacket().
| bool HexagonInstrInfo::isVecUsableNextPacket | ( | const MachineInstr & | ProdMI, |
| const MachineInstr & | ConsMI | ||
| ) | const |
Definition at line 2841 of file HexagonInstrInfo.cpp.
References EnableACCForwarding, EnableALUForwarding, isLateSourceInstr(), isVecAcc(), isVecALU(), and mayBeNewStore().
Referenced by addLatencyToSchedule(), and producesStall().
| bool HexagonInstrInfo::isZeroExtendingLoad | ( | const MachineInstr & | MI | ) | const |
Definition at line 2855 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode().
|
override |
Load the specified register of the given register class from the specified stack frame index.
The load instruction is to be added to the given machine basic block before the specified machine instruction.
Definition at line 930 of file HexagonInstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::BuildMI(), llvm::MachineBasicBlock::findDebugLoc(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectSize(), llvm::MachineBasicBlock::getParent(), llvm_unreachable, and llvm::MachineMemOperand::MOLoad.
Referenced by llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), dumpMachineInstrRangeWithSlotIndex(), and getFrameIndexOperandNum().
| bool HexagonInstrInfo::mayBeCurLoad | ( | const MachineInstr & | MI | ) | const |
Definition at line 3043 of file HexagonInstrInfo.cpp.
References F(), llvm::MachineInstr::getDesc(), llvm::HexagonII::mayCVLoadMask, llvm::HexagonII::mayCVLoadPos, and llvm::MCInstrDesc::TSFlags.
Referenced by llvm::HexagonHazardRecognizer::EmitInstruction(), hasDependence(), and isToBeScheduledASAP().
| bool HexagonInstrInfo::mayBeNewStore | ( | const MachineInstr & | MI | ) | const |
Definition at line 3050 of file HexagonInstrInfo.cpp.
References F(), llvm::MachineInstr::getDesc(), llvm::HexagonII::mayNVStoreMask, llvm::HexagonII::mayNVStorePos, llvm::MachineInstr::mayStore(), and llvm::MCInstrDesc::TSFlags.
Referenced by canExecuteInBundle(), llvm::HexagonHazardRecognizer::EmitInstruction(), llvm::HexagonHazardRecognizer::getHazardType(), isToBeScheduledASAP(), and isVecUsableNextPacket().
| unsigned HexagonInstrInfo::nonDbgBBSize | ( | const MachineBasicBlock * | BB | ) | const |
getInstrTimingClassLatency - Compute the instruction latency of a given instruction using Timing Class information, if available.
Definition at line 4339 of file HexagonInstrInfo.cpp.
References llvm::MachineBasicBlock::instr_begin(), llvm::MachineBasicBlock::instr_end(), and nonDbgMICount().
Referenced by isProfitableToIfCvt().
| unsigned HexagonInstrInfo::nonDbgBundleSize | ( | MachineBasicBlock::const_iterator | BundleHead | ) | const |
Definition at line 4343 of file HexagonInstrInfo.cpp.
References assert(), llvm::getBundleEnd(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getInstrIterator(), and nonDbgMICount().
| bool HexagonInstrInfo::predCanBeUsedAsDotNew | ( | const MachineInstr & | MI, |
| unsigned | PredReg | ||
| ) | const |
Definition at line 3096 of file HexagonInstrInfo.cpp.
References llvm::MachineInstr::getOpcode(), and llvm::MachineInstr::operands().
|
override |
Convert the instruction into a predicated instruction.
It returns true if the operation was successful.
Definition at line 1562 of file HexagonInstrInfo.cpp.
Definition at line 3131 of file HexagonInstrInfo.cpp.
| bool HexagonInstrInfo::predOpcodeHasNot | ( | ArrayRef< MachineOperand > | Cond | ) | const |
Definition at line 3142 of file HexagonInstrInfo.cpp.
| bool HexagonInstrInfo::producesStall | ( | const MachineInstr & | ProdMI, |
| const MachineInstr & | ConsMI | ||
| ) | const |
Definition at line 3058 of file HexagonInstrInfo.cpp.
References isDependent(), isHVXVec(), and isVecUsableNextPacket().
Referenced by producesStall().
| bool HexagonInstrInfo::producesStall | ( | const MachineInstr & | MI, |
| MachineBasicBlock::const_instr_iterator | MII | ||
| ) | const |
Definition at line 3076 of file HexagonInstrInfo.cpp.
References isHVXVec(), and producesStall().
|
override |
Remove the branching code at the end of the specific MBB.
This is only invoked in cases where AnalyzeBranch returns success. It returns the number of instructions that were removed.
Definition at line 555 of file HexagonInstrInfo.cpp.
References assert(), llvm::MachineBasicBlock::back(), llvm::MachineBasicBlock::begin(), llvm::dbgs(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::erase(), I, LLVM_DEBUG, llvm_unreachable, and llvm::printMBBReference().
Referenced by llvm::ModuloScheduleExpander::cleanup().
|
override |
Reverses the branch condition of the specified condition list, returning false on success and true if it cannot be reversed.
Definition at line 1524 of file HexagonInstrInfo.cpp.
Definition at line 4416 of file HexagonInstrInfo.cpp.
References assert(), and isPredictedTaken().
Referenced by invertAndChangeJumpTarget().
| bool HexagonInstrInfo::reversePredSense | ( | MachineInstr & | MI | ) | const |
Definition at line 4409 of file HexagonInstrInfo.cpp.
References llvm::dbgs(), llvm::MachineInstr::dump(), getInvertedPredicatedOpcode(), llvm::MachineInstr::getOpcode(), LLVM_DEBUG, and llvm::MachineInstr::setDesc().
| void HexagonInstrInfo::setBundleNoShuf | ( | MachineBasicBlock::instr_iterator | MIB | ) | const |
Definition at line 4433 of file HexagonInstrInfo.cpp.
References assert(), llvm::MachineOperand::CreateImm(), and llvm::MachineOperand::setImm().
|
override |
Store the specified register of the given register class to the specified stack frame index.
The store instruction is to be added to the given machine basic block before the specified machine instruction. If isKill is true, the register operand is the last use and must be marked kill.
Definition at line 884 of file HexagonInstrInfo.cpp.
References llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineBasicBlock::findDebugLoc(), llvm::MachinePointerInfo::getFixedStack(), llvm::MachineFunction::getFrameInfo(), llvm::getKillRegState(), llvm::MachineFunction::getMachineMemOperand(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectSize(), llvm::MachineBasicBlock::getParent(), llvm_unreachable, and llvm::MachineMemOperand::MOStore.
Referenced by llvm::HexagonFrameLowering::assignCalleeSavedSpillSlots(), getFrameIndexOperandNum(), isFullCopyOf(), and isFullUndefDef().
|
override |
Returns true if the first specified predicate subsumes the second, e.g.
GE subsumes GT.
Definition at line 1613 of file HexagonInstrInfo.cpp.
| bool HexagonInstrInfo::validateBranchCond | ( | const ArrayRef< MachineOperand > & | Cond | ) | const |
Definition at line 4427 of file HexagonInstrInfo.cpp.
1.8.13