|
LLVM
3.7.0
|
Representation of each machine instruction. More...
#include <MachineInstr.h>
Public Types | |
| enum | CommentFlag { ReloadReuse = 0x1 } |
| Flags to specify different kinds of comments to output in assembly code. More... | |
| enum | MIFlag { NoFlags = 0, FrameSetup = 1 << 0, BundledPred = 1 << 1, BundledSucc = 1 << 2 } |
| enum | QueryType { IgnoreBundle, AnyInBundle, AllInBundle } |
| API for querying MachineInstr properties. More... | |
| enum | MICheckType { CheckDefs, CheckKillDead, IgnoreDefs, IgnoreVRegDefs } |
| typedef MachineMemOperand ** | mmo_iterator |
| typedef MachineOperand * | mop_iterator |
| iterator/begin/end - Iterate over all operands of a machine instruction. More... | |
| typedef const MachineOperand * | const_mop_iterator |
Public Member Functions | |
| const MachineBasicBlock * | getParent () const |
| MachineBasicBlock * | getParent () |
| uint8_t | getAsmPrinterFlags () const |
| Return the asm printer flags bitvector. More... | |
| void | clearAsmPrinterFlags () |
| Clear the AsmPrinter bitvector. More... | |
| bool | getAsmPrinterFlag (CommentFlag Flag) const |
| Return whether an AsmPrinter flag is set. More... | |
| void | setAsmPrinterFlag (CommentFlag Flag) |
| Set a flag for the AsmPrinter. More... | |
| void | clearAsmPrinterFlag (CommentFlag Flag) |
| Clear specific AsmPrinter flags. More... | |
| uint8_t | getFlags () const |
| Return the MI flags bitvector. More... | |
| bool | getFlag (MIFlag Flag) const |
| Return whether an MI flag is set. More... | |
| void | setFlag (MIFlag Flag) |
| Set a MI flag. More... | |
| void | setFlags (unsigned flags) |
| void | clearFlag (MIFlag Flag) |
| clearFlag - Clear a MI flag. More... | |
| bool | isInsideBundle () const |
| Return true if MI is in a bundle (but not the first MI in a bundle). More... | |
| bool | isBundled () const |
| Return true if this instruction part of a bundle. More... | |
| bool | isBundledWithPred () const |
| Return true if this instruction is part of a bundle, and it is not the first instruction in the bundle. More... | |
| bool | isBundledWithSucc () const |
| Return true if this instruction is part of a bundle, and it is not the last instruction in the bundle. More... | |
| void | bundleWithPred () |
| Bundle this instruction with its predecessor. More... | |
| void | bundleWithSucc () |
| Bundle this instruction with its successor. More... | |
| void | unbundleFromPred () |
| Break bundle above this instruction. More... | |
| void | unbundleFromSucc () |
| Break bundle below this instruction. More... | |
| const DebugLoc & | getDebugLoc () const |
| Returns the debug location id of this MachineInstr. More... | |
| const DILocalVariable * | getDebugVariable () const |
| Return the debug variable referenced by this DBG_VALUE instruction. More... | |
| const DIExpression * | getDebugExpression () const |
| Return the complex address expression referenced by this DBG_VALUE instruction. More... | |
| void | emitError (StringRef Msg) const |
| Emit an error referring to the source location of this instruction. More... | |
| const MCInstrDesc & | getDesc () const |
| Returns the target instruction descriptor of this MachineInstr. More... | |
| unsigned | getOpcode () const |
| Returns the opcode of this MachineInstr. More... | |
| unsigned | getNumOperands () const |
| Access to explicit operands of the instruction. More... | |
| const MachineOperand & | getOperand (unsigned i) const |
| MachineOperand & | getOperand (unsigned i) |
| unsigned | getNumExplicitOperands () const |
| Returns the number of non-implicit operands. More... | |
| mop_iterator | operands_begin () |
| mop_iterator | operands_end () |
| const_mop_iterator | operands_begin () const |
| const_mop_iterator | operands_end () const |
| iterator_range< mop_iterator > | operands () |
| iterator_range < const_mop_iterator > | operands () const |
| iterator_range< mop_iterator > | explicit_operands () |
| iterator_range < const_mop_iterator > | explicit_operands () const |
| iterator_range< mop_iterator > | implicit_operands () |
| iterator_range < const_mop_iterator > | implicit_operands () const |
| iterator_range< mop_iterator > | defs () |
| iterator_range < const_mop_iterator > | defs () const |
| iterator_range< mop_iterator > | uses () |
| iterator_range < const_mop_iterator > | uses () const |
| unsigned | getOperandNo (const_mop_iterator I) const |
Returns the number of the operand iterator I points to. More... | |
| mmo_iterator | memoperands_begin () const |
| Access to memory operands of the instruction. More... | |
| mmo_iterator | memoperands_end () const |
| bool | memoperands_empty () const |
| iterator_range< mmo_iterator > | memoperands () |
| iterator_range< mmo_iterator > | memoperands () const |
| bool | hasOneMemOperand () const |
| Return true if this instruction has exactly one MachineMemOperand. More... | |
| bool | hasProperty (unsigned MCFlag, QueryType Type=AnyInBundle) const |
| Return true if the instruction (or in the case of a bundle, the instructions inside the bundle) has the specified property. More... | |
| bool | isVariadic (QueryType Type=IgnoreBundle) const |
| Return true if this instruction can have a variable number of operands. More... | |
| bool | hasOptionalDef (QueryType Type=IgnoreBundle) const |
| Set if this instruction has an optional definition, e.g. More... | |
| bool | isPseudo (QueryType Type=IgnoreBundle) const |
| Return true if this is a pseudo instruction that doesn't correspond to a real machine instruction. More... | |
| bool | isReturn (QueryType Type=AnyInBundle) const |
| bool | isCall (QueryType Type=AnyInBundle) const |
| bool | isBarrier (QueryType Type=AnyInBundle) const |
| Returns true if the specified instruction stops control flow from executing the instruction immediately following it. More... | |
| bool | isTerminator (QueryType Type=AnyInBundle) const |
| Returns true if this instruction part of the terminator for a basic block. More... | |
| bool | isBranch (QueryType Type=AnyInBundle) const |
| Returns true if this is a conditional, unconditional, or indirect branch. More... | |
| bool | isIndirectBranch (QueryType Type=AnyInBundle) const |
| Return true if this is an indirect branch, such as a branch through a register. More... | |
| bool | isConditionalBranch (QueryType Type=AnyInBundle) const |
| Return true if this is a branch which may fall through to the next instruction or may transfer control flow to some other block. More... | |
| bool | isUnconditionalBranch (QueryType Type=AnyInBundle) const |
| Return true if this is a branch which always transfers control flow to some other block. More... | |
| bool | isPredicable (QueryType Type=AllInBundle) const |
| Return true if this instruction has a predicate operand that controls execution. More... | |
| bool | isCompare (QueryType Type=IgnoreBundle) const |
| Return true if this instruction is a comparison. More... | |
| bool | isMoveImmediate (QueryType Type=IgnoreBundle) const |
| Return true if this instruction is a move immediate (including conditional moves) instruction. More... | |
| bool | isBitcast (QueryType Type=IgnoreBundle) const |
| Return true if this instruction is a bitcast instruction. More... | |
| bool | isSelect (QueryType Type=IgnoreBundle) const |
| Return true if this instruction is a select instruction. More... | |
| bool | isNotDuplicable (QueryType Type=AnyInBundle) const |
| Return true if this instruction cannot be safely duplicated. More... | |
| bool | isConvergent (QueryType Type=AnyInBundle) const |
| Return true if this instruction is convergent. More... | |
| bool | hasDelaySlot (QueryType Type=AnyInBundle) const |
| Returns true if the specified instruction has a delay slot which must be filled by the code generator. More... | |
| bool | canFoldAsLoad (QueryType Type=IgnoreBundle) const |
| Return true for instructions that can be folded as memory operands in other instructions. More... | |
| bool | isRegSequenceLike (QueryType Type=IgnoreBundle) const |
| Return true if this instruction behaves the same way as the generic REG_SEQUENCE instructions. More... | |
| bool | isExtractSubregLike (QueryType Type=IgnoreBundle) const |
| Return true if this instruction behaves the same way as the generic EXTRACT_SUBREG instructions. More... | |
| bool | isInsertSubregLike (QueryType Type=IgnoreBundle) const |
| Return true if this instruction behaves the same way as the generic INSERT_SUBREG instructions. More... | |
| bool | mayLoad (QueryType Type=AnyInBundle) const |
| Return true if this instruction could possibly read memory. More... | |
| bool | mayStore (QueryType Type=AnyInBundle) const |
| Return true if this instruction could possibly modify memory. More... | |
| bool | mayLoadOrStore (QueryType Type=AnyInBundle) const |
| Return true if this instruction could possibly read or modify memory. More... | |
| bool | isCommutable (QueryType Type=IgnoreBundle) const |
| Return true if this may be a 2- or 3-address instruction (of the form "X = op Y, Z, ..."), which produces the same result if Y and Z are exchanged. More... | |
| bool | isConvertibleTo3Addr (QueryType Type=IgnoreBundle) const |
| Return true if this is a 2-address instruction which can be changed into a 3-address instruction if needed. More... | |
| bool | usesCustomInsertionHook (QueryType Type=IgnoreBundle) const |
| Return true if this instruction requires custom insertion support when the DAG scheduler is inserting it into a machine basic block. More... | |
| bool | hasPostISelHook (QueryType Type=IgnoreBundle) const |
| Return true if this instruction requires adjustment after instruction selection by calling a target hook. More... | |
| bool | isRematerializable (QueryType Type=AllInBundle) const |
| Returns true if this instruction is a candidate for remat. More... | |
| bool | isAsCheapAsAMove (QueryType Type=AllInBundle) const |
| Returns true if this instruction has the same cost (or less) than a move instruction. More... | |
| bool | hasExtraSrcRegAllocReq (QueryType Type=AnyInBundle) const |
| Returns true if this instruction source operands have special register allocation requirements that are not captured by the operand register classes. More... | |
| bool | hasExtraDefRegAllocReq (QueryType Type=AnyInBundle) const |
| Returns true if this instruction def operands have special register allocation requirements that are not captured by the operand register classes. More... | |
| bool | isIdenticalTo (const MachineInstr *Other, MICheckType Check=CheckDefs) const |
| Return true if this instruction is identical to (same opcode and same operands as) the specified instruction. More... | |
| MachineInstr * | removeFromParent () |
| Unlink 'this' from the containing basic block, and return it without deleting it. More... | |
| MachineInstr * | removeFromBundle () |
| Unlink this instruction from its basic block and return it without deleting it. More... | |
| void | eraseFromParent () |
| Unlink 'this' from the containing basic block and delete it. More... | |
| void | eraseFromParentAndMarkDBGValuesForRemoval () |
| Unlink 'this' from the containing basic block and delete it. More... | |
| void | eraseFromBundle () |
| Unlink 'this' form its basic block and delete it. More... | |
| bool | isEHLabel () const |
| bool | isGCLabel () const |
| bool | isLabel () const |
| Returns true if the MachineInstr represents a label. More... | |
| bool | isCFIInstruction () const |
| bool | isPosition () const |
| bool | isDebugValue () const |
| bool | isIndirectDebugValue () const |
| A DBG_VALUE is indirect iff the first operand is a register and the second operand is an immediate. More... | |
| bool | isPHI () const |
| bool | isKill () const |
| bool | isImplicitDef () const |
| bool | isInlineAsm () const |
| bool | isMSInlineAsm () const |
| bool | isStackAligningInlineAsm () const |
| InlineAsm::AsmDialect | getInlineAsmDialect () const |
| bool | isInsertSubreg () const |
| bool | isSubregToReg () const |
| bool | isRegSequence () const |
| bool | isBundle () const |
| bool | isCopy () const |
| bool | isFullCopy () const |
| bool | isExtractSubreg () const |
| bool | isCopyLike () const |
| Return true if the instruction behaves like a copy. More... | |
| bool | isIdentityCopy () const |
| Return true is the instruction is an identity copy. More... | |
| bool | isTransient () const |
| Return true if this is a transient instruction that is either very likely to be eliminated during register allocation (such as copy-like instructions), or if this instruction doesn't have an execution-time cost. More... | |
| unsigned | getBundleSize () const |
| Return the number of instructions inside the MI bundle, excluding the bundle header. More... | |
| bool | readsRegister (unsigned Reg, const TargetRegisterInfo *TRI=nullptr) const |
| Return true if the MachineInstr reads the specified register. More... | |
| bool | readsVirtualRegister (unsigned Reg) const |
| Return true if the MachineInstr reads the specified virtual register. More... | |
| std::pair< bool, bool > | readsWritesVirtualRegister (unsigned Reg, SmallVectorImpl< unsigned > *Ops=nullptr) const |
| Return a pair of bools (reads, writes) indicating if this instruction reads or writes Reg. More... | |
| bool | killsRegister (unsigned Reg, const TargetRegisterInfo *TRI=nullptr) const |
| Return true if the MachineInstr kills the specified register. More... | |
| bool | definesRegister (unsigned Reg, const TargetRegisterInfo *TRI=nullptr) const |
| Return true if the MachineInstr fully defines the specified register. More... | |
| bool | modifiesRegister (unsigned Reg, const TargetRegisterInfo *TRI) const |
| Return true if the MachineInstr modifies (fully define or partially define) the specified register. More... | |
| bool | registerDefIsDead (unsigned Reg, const TargetRegisterInfo *TRI=nullptr) const |
| Returns true if the register is dead in this machine instruction. More... | |
| int | findRegisterUseOperandIdx (unsigned Reg, bool isKill=false, const TargetRegisterInfo *TRI=nullptr) const |
| Returns the operand index that is a use of the specific register or -1 if it is not found. More... | |
| MachineOperand * | findRegisterUseOperand (unsigned Reg, bool isKill=false, const TargetRegisterInfo *TRI=nullptr) |
| Wrapper for findRegisterUseOperandIdx, it returns a pointer to the MachineOperand rather than an index. More... | |
| int | findRegisterDefOperandIdx (unsigned Reg, bool isDead=false, bool Overlap=false, const TargetRegisterInfo *TRI=nullptr) const |
| Returns the operand index that is a def of the specified register or -1 if it is not found. More... | |
| MachineOperand * | findRegisterDefOperand (unsigned Reg, bool isDead=false, const TargetRegisterInfo *TRI=nullptr) |
| Wrapper for findRegisterDefOperandIdx, it returns a pointer to the MachineOperand rather than an index. More... | |
| int | findFirstPredOperandIdx () const |
| Find the index of the first operand in the operand list that is used to represent the predicate. More... | |
| int | findInlineAsmFlagIdx (unsigned OpIdx, unsigned *GroupNo=nullptr) const |
| Find the index of the flag word operand that corresponds to operand OpIdx on an inline asm instruction. More... | |
| const TargetRegisterClass * | getRegClassConstraint (unsigned OpIdx, const TargetInstrInfo *TII, const TargetRegisterInfo *TRI) const |
| Compute the static register class constraint for operand OpIdx. More... | |
| const TargetRegisterClass * | getRegClassConstraintEffectForVReg (unsigned Reg, const TargetRegisterClass *CurRC, const TargetInstrInfo *TII, const TargetRegisterInfo *TRI, bool ExploreBundle=false) const |
Applies the constraints (def/use) implied by this MI on Reg to the given CurRC. More... | |
| const TargetRegisterClass * | getRegClassConstraintEffect (unsigned OpIdx, const TargetRegisterClass *CurRC, const TargetInstrInfo *TII, const TargetRegisterInfo *TRI) const |
Applies the constraints (def/use) implied by the OpIdx operand to the given CurRC. More... | |
| void | tieOperands (unsigned DefIdx, unsigned UseIdx) |
| Add a tie between the register operands at DefIdx and UseIdx. More... | |
| unsigned | findTiedOperandIdx (unsigned OpIdx) const |
| Given the index of a tied register operand, find the operand it is tied to. More... | |
| bool | isRegTiedToUseOperand (unsigned DefOpIdx, unsigned *UseOpIdx=nullptr) const |
| Given the index of a register def operand, check if the register def is tied to a source operand, due to either two-address elimination or inline assembly constraints. More... | |
| bool | isRegTiedToDefOperand (unsigned UseOpIdx, unsigned *DefOpIdx=nullptr) const |
| Return true if the use operand of the specified index is tied to a def operand. More... | |
| void | clearKillInfo () |
| Clears kill flags on all operands. More... | |
| void | substituteRegister (unsigned FromReg, unsigned ToReg, unsigned SubIdx, const TargetRegisterInfo &RegInfo) |
| Replace all occurrences of FromReg with ToReg:SubIdx, properly composing subreg indices where necessary. More... | |
| bool | addRegisterKilled (unsigned IncomingReg, const TargetRegisterInfo *RegInfo, bool AddIfNotFound=false) |
| We have determined MI kills a register. More... | |
| void | clearRegisterKills (unsigned Reg, const TargetRegisterInfo *RegInfo) |
| Clear all kill flags affecting Reg. More... | |
| bool | addRegisterDead (unsigned Reg, const TargetRegisterInfo *RegInfo, bool AddIfNotFound=false) |
| We have determined MI defined a register without a use. More... | |
| void | clearRegisterDeads (unsigned Reg) |
Clear all dead flags on operands defining register Reg. More... | |
| void | addRegisterDefReadUndef (unsigned Reg) |
Mark all subregister defs of register Reg with the undef flag. More... | |
| void | addRegisterDefined (unsigned Reg, const TargetRegisterInfo *RegInfo=nullptr) |
| We have determined MI defines a register. More... | |
| void | setPhysRegsDeadExcept (ArrayRef< unsigned > UsedRegs, const TargetRegisterInfo &TRI) |
| Mark every physreg used by this instruction as dead except those in the UsedRegs list. More... | |
| bool | isSafeToMove (AliasAnalysis *AA, bool &SawStore) const |
| Return true if it is safe to move this instruction. More... | |
| bool | hasOrderedMemoryRef () const |
| Return true if this instruction may have an ordered or volatile memory reference, or if the information describing the memory reference is not available. More... | |
| bool | isInvariantLoad (AliasAnalysis *AA) const |
| Return true if this instruction is loading from a location whose value is invariant across the function. More... | |
| unsigned | isConstantValuePHI () const |
| If the specified instruction is a PHI that always merges together the same virtual register, return the register, otherwise return 0. More... | |
| bool | hasUnmodeledSideEffects () const |
| Return true if this instruction has side effects that are not modeled by mayLoad / mayStore, etc. More... | |
| bool | allDefsAreDead () const |
| Return true if all the defs of this instruction are dead. More... | |
| void | copyImplicitOps (MachineFunction &MF, const MachineInstr *MI) |
| Copy implicit register operands from specified instruction to this instruction. More... | |
| void | print (raw_ostream &OS, bool SkipOpers=false) const |
| void | print (raw_ostream &OS, ModuleSlotTracker &MST, bool SkipOpers=false) const |
| void | dump () const |
| void | addOperand (MachineFunction &MF, const MachineOperand &Op) |
| Add the specified operand to the instruction. More... | |
| void | addOperand (const MachineOperand &Op) |
| Add an operand without providing an MF reference. More... | |
| void | setDesc (const MCInstrDesc &tid) |
| Replace the instruction descriptor (thus opcode) of the current instruction with a new one. More... | |
| void | setDebugLoc (DebugLoc dl) |
| Replace current source information with new such. More... | |
| void | RemoveOperand (unsigned i) |
| Erase an operand from an instruction, leaving it with one fewer operand than it started with. More... | |
| void | addMemOperand (MachineFunction &MF, MachineMemOperand *MO) |
| Add a MachineMemOperand to the machine instruction. More... | |
| void | setMemRefs (mmo_iterator NewMemRefs, mmo_iterator NewMemRefsEnd) |
| Assign this MachineInstr's memory reference descriptor list. More... | |
| void | clearMemRefs () |
| Clear this MachineInstr's memory reference descriptor list. More... | |
| void | untieRegOperand (unsigned OpIdx) |
| Break any tie involving OpIdx. More... | |
Public Member Functions inherited from llvm::ilist_node< MachineInstr > | |
| MachineInstr * | getPrevNode () |
| Get the previous node, or 0 for the list head. More... | |
| const MachineInstr * | getPrevNode () const |
| Get the previous node, or 0 for the list head. More... | |
| MachineInstr * | getNextNode () |
| Get the next node, or 0 for the list tail. More... | |
| const MachineInstr * | getNextNode () const |
| Get the next node, or 0 for the list tail. More... | |
Friends | |
| struct | ilist_traits< MachineInstr > |
| struct | ilist_traits< MachineBasicBlock > |
| class | MachineFunction |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::ilist_node< MachineInstr > | |
| ilist_node () | |
Representation of each machine instruction.
This class isn't a POD type, but it must have a trivial destructor. When a MachineFunction is deleted, all the contained MachineInstrs are deallocated without having their destructor called.
Definition at line 51 of file MachineInstr.h.
Definition at line 287 of file MachineInstr.h.
Definition at line 53 of file MachineInstr.h.
iterator/begin/end - Iterate over all operands of a machine instruction.
Definition at line 286 of file MachineInstr.h.
Flags to specify different kinds of comments to output in assembly code.
These flags carry semantic information not otherwise easily derivable from the IR text.
| Enumerator | |
|---|---|
| ReloadReuse | |
Definition at line 59 of file MachineInstr.h.
| Enumerator | |
|---|---|
| CheckDefs | |
| CheckKillDead | |
| IgnoreDefs | |
| IgnoreVRegDefs | |
Definition at line 691 of file MachineInstr.h.
| Enumerator | |
|---|---|
| NoFlags | |
| FrameSetup | |
| BundledPred | |
| BundledSucc | |
Definition at line 63 of file MachineInstr.h.
API for querying MachineInstr properties.
They are the same as MCInstrDesc queries but they are bundle aware.
| Enumerator | |
|---|---|
| IgnoreBundle | |
| AnyInBundle | |
| AllInBundle | |
Definition at line 359 of file MachineInstr.h.
| void MachineInstr::addMemOperand | ( | MachineFunction & | MF, |
| MachineMemOperand * | MO | ||
| ) |
Add a MachineMemOperand to the machine instruction.
addMemOperand - Add a MachineMemOperand to the machine instruction.
This function should be used only occasionally. The setMemRefs function is the primary method for setting up a MachineInstr's MemRefs list.
Definition at line 829 of file MachineInstr.cpp.
References llvm::MachineFunction::allocateMemRefsArray().
Referenced by llvm::MachineInstrBuilder::addMemOperand(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::PPCInstrInfo::loadRegFromStackSlot(), and llvm::PPCInstrInfo::storeRegToStackSlot().
| void MachineInstr::addOperand | ( | MachineFunction & | MF, |
| const MachineOperand & | Op | ||
| ) |
Add the specified operand to the instruction.
addOperand - Add the specified operand to the instruction.
If it is an implicit operand, it is added to the end of the operand list. If it is an explicit operand it is added at the end of the explicit operand list (before the first implicit operand).
MF must be the machine function that was used to allocate this instruction.
MachineInstrBuilder provides a more convenient interface for creating instructions and adding operands.
If it is an implicit operand, it is added to the end of the operand list. If it is an explicit operand it is added at the end of the explicit operand list (before the first implicit operand).
Definition at line 707 of file MachineInstr.cpp.
Referenced by llvm::MachineInstrBuilder::addBlockAddress(), addCalleeSaveRegistersAsImpOperand(), llvm::MachineInstrBuilder::addCFIIndex(), llvm::MachineInstrBuilder::addCImm(), llvm::MachineInstrBuilder::addConstantPoolIndex(), llvm::MachineInstrBuilder::addExternalSymbol(), llvm::MachineInstrBuilder::addFPImm(), llvm::MachineInstrBuilder::addFrameIndex(), llvm::MachineInstrBuilder::addGlobalAddress(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addJumpTableIndex(), llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addMetadata(), llvm::MachineInstrBuilder::addOperand(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstrBuilder::addRegMask(), llvm::MachineInstrBuilder::addSym(), llvm::MachineInstrBuilder::addTargetIndex(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::XCoreFrameLowering::emitEpilogue(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::ARMFrameLowering::fixTCReturn(), INITIALIZE_PASS(), llvm::SIInstrInfo::moveSMRDToVALU(), llvm::SIInstrInfo::moveToVALU(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::HexagonInstrInfo::PredicateInstruction(), and llvm::rewriteT2FrameIndex().
| void MachineInstr::addOperand | ( | const MachineOperand & | Op | ) |
Add an operand without providing an MF reference.
This only works for instructions that are inserted in a basic block.
MachineInstrBuilder and the two-argument addOperand(MF, MO) should be preferred.
Definition at line 684 of file MachineInstr.cpp.
| bool MachineInstr::addRegisterDead | ( | unsigned | Reg, |
| const TargetRegisterInfo * | RegInfo, | ||
| bool | AddIfNotFound = false |
||
| ) |
We have determined MI defined a register without a use.
Look for the operand that defines it and mark it as IsDead. If AddIfNotFound is true, add a implicit operand if it's not found. Returns true if the operand exists / is added.
Definition at line 1845 of file MachineInstr.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::MachineOperand::CreateReg(), llvm::SmallVectorBase::empty(), Found(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isImplicit(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MCRegisterInfo::isSubRegister(), llvm::MCRegisterInfo::isSuperRegister(), llvm::MCRegAliasIterator::isValid(), llvm::SmallVectorTemplateBase< T, isPodLike >::pop_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::MachineOperand::setIsDead().
Referenced by llvm::LiveVariables::addVirtualRegisterDead().
| void MachineInstr::addRegisterDefined | ( | unsigned | Reg, |
| const TargetRegisterInfo * | RegInfo = nullptr |
||
| ) |
We have determined MI defines a register.
Make sure there is an operand defining Reg.
Definition at line 1913 of file MachineInstr.cpp.
References llvm::MachineOperand::CreateReg(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineOperand::isDef(), llvm::TargetRegisterInfo::isPhysicalRegister(), and llvm::MachineOperand::isReg().
Referenced by llvm::SparcInstrInfo::copyPhysReg(), llvm::ARMBaseInstrInfo::copyPhysReg(), and llvm::AArch64InstrInfo::optimizeCompareInstr().
| void MachineInstr::addRegisterDefReadUndef | ( | unsigned | Reg | ) |
Mark all subregister defs of register Reg with the undef flag.
This function is used when we determined to have a subregister def in an otherwise undefined super register.
Definition at line 1905 of file MachineInstr.cpp.
References llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::setIsUndef().
| bool MachineInstr::addRegisterKilled | ( | unsigned | IncomingReg, |
| const TargetRegisterInfo * | RegInfo, | ||
| bool | AddIfNotFound = false |
||
| ) |
We have determined MI kills a register.
Look for the operand that uses it and mark it as IsKill. If AddIfNotFound is true, add a implicit operand if it's not found. Returns true if the operand exists / is added.
Definition at line 1773 of file MachineInstr.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::MachineOperand::CreateReg(), llvm::SmallVectorBase::empty(), Found(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isImplicit(), llvm::MachineOperand::isKill(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MCRegisterInfo::isSubRegister(), llvm::MCRegisterInfo::isSuperRegister(), llvm::MachineOperand::isUndef(), llvm::MachineOperand::isUse(), llvm::MCRegAliasIterator::isValid(), llvm::SmallVectorTemplateBase< T, isPodLike >::pop_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::MachineOperand::setIsKill().
Referenced by llvm::LiveIntervals::addKillFlags(), llvm::LiveVariables::addVirtualRegisterKilled(), llvm::ARMBaseInstrInfo::breakPartialRegDependency(), llvm::X86InstrInfo::breakPartialRegDependency(), llvm::SparcInstrInfo::copyPhysReg(), llvm::ARMBaseInstrInfo::copyPhysReg(), emitAlignedDPRCS2Restores(), emitAlignedDPRCS2Spills(), and llvm::XCoreFrameLowering::emitPrologue().
| bool MachineInstr::allDefsAreDead | ( | ) | const |
Return true if all the defs of this instruction are dead.
allDefsAreDead - Return true if all the defs of this instruction are dead.
Definition at line 1506 of file MachineInstr.cpp.
References llvm::MachineOperand::isDead(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isUse().
| void MachineInstr::bundleWithPred | ( | ) |
Bundle this instruction with its predecessor.
This can be an unbundled instruction, or it can be the first instruction in a bundle.
Definition at line 976 of file MachineInstr.cpp.
Referenced by llvm::MIBundleBuilder::insert(), and llvm::MIBundleBuilder::MIBundleBuilder().
| void MachineInstr::bundleWithSucc | ( | ) |
Bundle this instruction with its successor.
This can be an unbundled instruction, or it can be the last instruction in a bundle.
Definition at line 985 of file MachineInstr.cpp.
Referenced by llvm::MIBundleBuilder::insert().
|
inline |
Return true for instructions that can be folded as memory operands in other instructions.
The most common use for this is instructions that are simple loads from memory that don't modify the loaded value in any way, but it can also be used for instructions that can be expressed as constant-pool loads, such as V_SETALLONES on x86, to allow them to be folded when it is beneficial. This should only be set on instructions that return a value in their only virtual register definition.
Definition at line 512 of file MachineInstr.h.
References llvm::MCID::FoldableAsLoad, and hasProperty().
Referenced by llvm::TargetInstrInfo::foldMemoryOperand().
|
inline |
Clear specific AsmPrinter flags.
Definition at line 140 of file MachineInstr.h.
|
inline |
Clear the AsmPrinter bitvector.
Definition at line 127 of file MachineInstr.h.
|
inline |
clearFlag - Clear a MI flag.
Definition at line 166 of file MachineInstr.h.
Referenced by llvm::MachineBasicBlock::remove_instr().
| void MachineInstr::clearKillInfo | ( | ) |
Clears kill flags on all operands.
clearKillInfo - Clears kill flags on all operands.
Definition at line 1346 of file MachineInstr.cpp.
References llvm::MachineOperand::isReg(), llvm::MachineOperand::isUse(), and llvm::MachineOperand::setIsKill().
Referenced by llvm::ARMBaseInstrInfo::optimizeSelect().
|
inline |
Clear this MachineInstr's memory reference descriptor list.
Definition at line 1163 of file MachineInstr.h.
| void MachineInstr::clearRegisterDeads | ( | unsigned | Reg | ) |
Clear all dead flags on operands defining register Reg.
Definition at line 1897 of file MachineInstr.cpp.
References llvm::MachineOperand::getReg(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), llvm::MachineOperand::Reg, and llvm::MachineOperand::setIsDead().
| void MachineInstr::clearRegisterKills | ( | unsigned | Reg, |
| const TargetRegisterInfo * | RegInfo | ||
| ) |
Clear all kill flags affecting Reg.
If RegInfo is provided, this includes super-register kills.
Definition at line 1832 of file MachineInstr.cpp.
References llvm::MachineOperand::getReg(), llvm::MachineOperand::isKill(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MCRegisterInfo::isSuperRegister(), llvm::MachineOperand::isUse(), and llvm::MachineOperand::setIsKill().
Referenced by llvm::LiveIntervals::addKillFlags().
| void MachineInstr::copyImplicitOps | ( | MachineFunction & | MF, |
| const MachineInstr * | MI | ||
| ) |
Copy implicit register operands from specified instruction to this instruction.
copyImplicitOps - Copy implicit register operands from specified instruction to this instruction.
Definition at line 1518 of file MachineInstr.cpp.
References getDesc(), llvm::MCInstrDesc::getNumOperands(), getNumOperands(), getOperand(), llvm::MachineOperand::isImplicit(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isRegMask().
Referenced by llvm::MachineInstrBuilder::copyImplicitOps().
|
inline |
Return true if the MachineInstr fully defines the specified register.
If TargetRegisterInfo is passed, then it also checks if there is a def of a super-register. NOTE: It's ignoring subreg indices on virtual registers.
Definition at line 866 of file MachineInstr.h.
References findRegisterDefOperandIdx().
Referenced by checkAndUpdateEFLAGSKill(), convertFlagSettingOpcode(), getImplicitSPRUseForDPRUse(), llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), llvm::ARMBaseInstrInfo::isSchedulingBoundary(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::AArch64InstrInfo::optimizeCompareInstr(), and llvm::PPCInstrInfo::optimizeCompareInstr().
|
inline |
Definition at line 317 of file MachineInstr.h.
References getDesc(), llvm::MCInstrDesc::getNumDefs(), and operands_begin().
|
inline |
Definition at line 321 of file MachineInstr.h.
References getDesc(), llvm::MCInstrDesc::getNumDefs(), and operands_begin().
| void MachineInstr::dump | ( | ) | const |
Definition at line 1528 of file MachineInstr.cpp.
References llvm::dbgs().
Referenced by llvm::AggressiveAntiDepBreaker::BreakAntiDependencies(), llvm::ScheduleDAGInstrs::dumpNode(), llvm::AMDGPUAsmPrinter::EmitInstruction(), llvm::AArch64TargetLowering::EmitInstrWithCustomInserter(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::HexagonLowerToMC(), llvm::MSP430MCInstLower::Lower(), llvm::BPFMCInstLower::Lower(), llvm::LowerPPCMachineInstrToMCInst(), llvm::AggressiveAntiDepBreaker::Observe(), and llvm::HexagonInstrInfo::PredicateInstruction().
| void MachineInstr::emitError | ( | StringRef | Msg | ) | const |
Emit an error referring to the source location of this instruction.
This should only be used for inline assembly that is somehow impossible to compile. Other errors should have been handled much earlier.
If this method returns, the caller should try to recover from the error.
Definition at line 1972 of file MachineInstr.cpp.
References llvm::MachineOperand::CI, llvm::MachineOperand::getMetadata(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getParent(), llvm::ConstantInt::getZExtValue(), llvm::MachineOperand::isMetadata(), llvm::MachineOperand::MBB, and llvm::report_fatal_error().
Referenced by llvm::RegAllocBase::allocatePhysRegs().
| void MachineInstr::eraseFromBundle | ( | ) |
Unlink 'this' form its basic block and delete it.
If the instruction is part of a bundle, the other instructions in the bundle remain bundled.
Definition at line 956 of file MachineInstr.cpp.
References llvm::MachineOperand::getParent().
| void MachineInstr::eraseFromParent | ( | ) |
Unlink 'this' from the containing basic block and delete it.
If this instruction is the header of a bundle, the whole bundle is erased. This function can not be used for instructions inside a bundle, use eraseFromBundle() to erase individual bundled instructions.
Definition at line 931 of file MachineInstr.cpp.
References llvm::MachineOperand::getParent().
Referenced by llvm::XCoreInstrInfo::AnalyzeBranch(), llvm::NVPTXInstrInfo::AnalyzeBranch(), llvm::HexagonInstrInfo::AnalyzeBranch(), llvm::MipsInstrInfo::AnalyzeBranch(), llvm::SparcInstrInfo::AnalyzeBranch(), llvm::ARMBaseInstrInfo::AnalyzeBranch(), llvm::AArch64InstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::SIRegisterInfo::eliminateFrameIndex(), llvm::PPCTargetLowering::emitEHSjLjLongJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), EmitMonitor(), llvm::TargetLoweringBase::emitPatchPoint(), EmitPCMPSTRI(), EmitPCMPSTRM(), llvm::MSP430TargetLowering::EmitShiftInstr(), EmitXBegin(), eraseFromParentAndMarkDBGValuesForRemoval(), eraseIfDead(), llvm::SparcTargetLowering::expandAtomicRMW(), llvm::SIInstrInfo::expandPostRAPseudo(), llvm::SparcTargetLowering::expandSelectCC(), llvm::SIInstrInfo::FoldImmediate(), llvm::PPCInstrInfo::FoldImmediate(), llvm::ARMBaseInstrInfo::FoldImmediate(), foldImmediates(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), HandleVRSaveUpdate(), INITIALIZE_PASS(), llvm::SIInstrInfo::moveSMRDToVALU(), llvm::SIInstrInfo::moveToVALU(), llvm::AArch64InstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::AArch64InstrInfo::optimizeCondBranch(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::FastISel::removeDeadCode(), removeIPMBasedCompare(), RemoveVRSaveCode(), llvm::rewriteAArch64FrameIndex(), llvm::FastISel::selectPatchpoint(), tryOrrMovk(), trySequenceOfOnes(), and tryToreplicateChunks().
| void MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval | ( | ) |
Unlink 'this' from the containing basic block and delete it.
For all definitions mark their uses in DBG_VALUE nodes as undefined. Otherwise like eraseFromParent().
Definition at line 936 of file MachineInstr.cpp.
References eraseFromParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getParent(), llvm::MachineFunction::getRegInfo(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::MachineRegisterInfo::markUsesInDebugValueAsUndef(), llvm::MachineOperand::MBB, llvm::AArch64CC::MI, operands(), and llvm::MachineOperand::Reg.
|
inline |
Definition at line 301 of file MachineInstr.h.
References getNumExplicitOperands(), and operands_begin().
Referenced by implicit_operands(), and llvm::AMDGPUMCInstLower::lower().
|
inline |
Definition at line 305 of file MachineInstr.h.
References getNumExplicitOperands(), and operands_begin().
| int MachineInstr::findFirstPredOperandIdx | ( | ) | const |
Find the index of the first operand in the operand list that is used to represent the predicate.
findFirstPredOperandIdx() - Find the index of the first operand in the operand list that is used to represent the predicate.
It returns -1 if none is found.
Definition at line 1234 of file MachineInstr.cpp.
References llvm::HexagonMCInstrInfo::getDesc(), llvm::MCInstrDesc::isPredicable(), llvm::MCOperandInfo::isPredicate(), and llvm::MCInstrDesc::OpInfo.
Referenced by llvm::ARMBaseInstrInfo::commuteInstruction(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::getInstrPredicate(), llvm::ARMBaseInstrInfo::getPredicate(), llvm::ARMBaseInstrInfo::isPredicated(), llvm::R600InstrInfo::isPredicated(), llvm::ARMBaseInstrInfo::PredicateInstruction(), and llvm::R600InstrInfo::PredicateInstruction().
Find the index of the flag word operand that corresponds to operand OpIdx on an inline asm instruction.
Returns -1 if getOperand(OpIdx) does not belong to an inline asm operand group.
If GroupNo is not NULL, it will receive the number of the operand group containing OpIdx.
The flag operand is an immediate that can be decoded with methods like InlineAsm::hasRegClassConstraint().
Definition at line 1027 of file MachineInstr.cpp.
References llvm::MachineOperand::getImm(), llvm::InlineAsm::getNumOperandRegisters(), llvm::MachineOperand::isImm(), and llvm::InlineAsm::MIOp_FirstOperand.
|
inline |
Wrapper for findRegisterDefOperandIdx, it returns a pointer to the MachineOperand rather than an index.
Definition at line 912 of file MachineInstr.h.
References findRegisterDefOperandIdx(), and getOperand().
Referenced by llvm::AggressiveAntiDepBreaker::BreakAntiDependencies().
| int MachineInstr::findRegisterDefOperandIdx | ( | unsigned | Reg, |
| bool | isDead = false, |
||
| bool | Overlap = false, |
||
| const TargetRegisterInfo * | TRI = nullptr |
||
| ) | const |
Returns the operand index that is a def of the specified register or -1 if it is not found.
findRegisterDefOperandIdx() - Returns the operand index that is a def of the specified register or -1 if it is not found.
If isDead is true, defs that are not dead are skipped. If Overlap is true, then it also looks for defs that merely overlap the specified register. If TargetRegisterInfo is non-null, then it also checks if there is a def of a super-register. This may also return a register mask operand when Overlap is true.
If isDead is true, defs that are not dead are skipped. If TargetRegisterInfo is non-null, then it also checks if there is a def of a super-register.
Definition at line 1205 of file MachineInstr.cpp.
References llvm::MachineOperand::clobbersPhysReg(), Found(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isDef(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isRegMask(), llvm::MCRegisterInfo::isSubRegister(), llvm::MachineOperand::Reg, and llvm::TargetRegisterInfo::regsOverlap().
Referenced by llvm::ScheduleDAGInstrs::addVRegUseDeps(), canFoldIntoCSel(), llvm::R600InstrInfo::definesAddressRegister(), definesRegister(), llvm::ARMBaseInstrInfo::expandPostRAPseudo(), findRegisterDefOperand(), llvm::AArch64InstrInfo::getMachineCombinerPatterns(), modifiesRegister(), llvm::AArch64InstrInfo::optimizeCompareInstr(), llvm::AArch64InstrInfo::optimizeCondBranch(), and registerDefIsDead().
|
inline |
Wrapper for findRegisterUseOperandIdx, it returns a pointer to the MachineOperand rather than an index.
Definition at line 894 of file MachineInstr.h.
References findRegisterUseOperandIdx(), getOperand(), and isKill().
| int MachineInstr::findRegisterUseOperandIdx | ( | unsigned | Reg, |
| bool | isKill = false, |
||
| const TargetRegisterInfo * | TRI = nullptr |
||
| ) | const |
Returns the operand index that is a use of the specific register or -1 if it is not found.
findRegisterUseOperandIdx() - Returns the MachineOperand that is a use of the specific register or -1 if it is not found.
It further tightens the search criteria to a use that kills the register if isKill is true.
Definition at line 1152 of file MachineInstr.cpp.
References llvm::MachineOperand::getReg(), llvm::MachineOperand::isKill(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MCRegisterInfo::isSubRegister(), and llvm::MachineOperand::isUse().
Referenced by findRegisterUseOperand(), llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), killsRegister(), readsRegister(), and llvm::R600InstrInfo::usesAddressRegister().
Given the index of a tied register operand, find the operand it is tied to.
Defs are tied to uses and vice versa. Returns the index of the tied operand which must exist.
Definition at line 1289 of file MachineInstr.cpp.
References llvm::MachineOperand::getImm(), llvm::InlineAsm::getNumOperandRegisters(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isTied(), llvm::MachineOperand::isUse(), llvm::InlineAsm::isUseOperandTiedToDef(), llvm_unreachable, llvm::InlineAsm::MIOp_FirstOperand, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by isRegTiedToDefOperand(), isRegTiedToUseOperand(), and untieRegOperand().
|
inline |
Return whether an AsmPrinter flag is set.
Definition at line 130 of file MachineInstr.h.
Referenced by emitComments().
|
inline |
Return the asm printer flags bitvector.
Definition at line 124 of file MachineInstr.h.
| unsigned MachineInstr::getBundleSize | ( | ) | const |
Return the number of instructions inside the MI bundle, excluding the bundle header.
Return the number of instructions inside the MI bundle, not counting the header instruction.
This is the number of instructions that MachineBasicBlock::iterator skips, 0 for unbundled instructions.
Definition at line 1141 of file MachineInstr.cpp.
References I.
|
inline |
Return the complex address expression referenced by this DBG_VALUE instruction.
Definition at line 249 of file MachineInstr.h.
References llvm::MachineOperand::getMetadata(), getOperand(), and isDebugValue().
Referenced by emitDebugValueComment(), getDebugLocValue(), llvm::DbgVariable::initializeDbgValue(), and llvm::SelectionDAGISel::runOnMachineFunction().
Returns the debug location id of this MachineInstr.
Definition at line 238 of file MachineInstr.h.
Referenced by llvm::WinCodeViewLineTables::beginInstruction(), llvm::DwarfDebug::beginInstruction(), llvm::X86InstrInfo::classifyLEAReg(), CombineCVTAToLocal(), llvm::PPCInstrInfo::commuteInstruction(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::Thumb1FrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(), llvm::BPFRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::emitEHSjLjLongJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::NVPTXAsmPrinter::emitLineNumberAsDotLoc(), EmitMonitor(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::TargetLoweringBase::emitPatchPoint(), EmitPCMPSTRI(), EmitPCMPSTRM(), llvm::MSP430TargetLowering::EmitShiftInstr(), EmitXBegin(), llvm::SparcTargetLowering::expandAtomicRMW(), expandLoadStackGuard(), llvm::SparcTargetLowering::expandSelectCC(), llvm::ARMBaseInstrInfo::FoldImmediate(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), foldPatchpoint(), forceReg(), FuseInst(), FuseTwoAddrInst(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), genMadd(), genMaddR(), HandleVRSaveUpdate(), llvm::DbgVariable::initializeDbgValue(), insertCopy(), insertDivByZeroTrap(), InsertFPConstInst(), InsertFPImmInst(), insertNopBeforeInstruction(), InsertSPConstInst(), InsertSPImmInst(), isIdenticalTo(), llvm::SIInstrInfo::legalizeOperands(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::PPCRegisterInfo::lowerVRSAVESpilling(), MakeM0Inst(), llvm::SIInstrInfo::moveSMRDToVALU(), llvm::SIInstrInfo::moveToVALU(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::AArch64InstrInfo::optimizeCondBranch(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::HexagonInstrInfo::PredicateInstruction(), reassociateOps(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), llvm::rewriteAArch64FrameIndex(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::SIInstrInfo::splitSMRD(), tryOrrMovk(), trySequenceOfOnes(), tryToreplicateChunks(), and llvm::X86InstrInfo::unfoldMemoryOperand().
|
inline |
Return the debug variable referenced by this DBG_VALUE instruction.
Definition at line 242 of file MachineInstr.h.
References llvm::MachineOperand::getMetadata(), getOperand(), and isDebugValue().
Referenced by llvm::MachineInstrBuilder::addMetadata(), emitDebugValueComment(), llvm::DbgVariable::initializeDbgValue(), and llvm::SelectionDAGISel::runOnMachineFunction().
|
inline |
Returns the target instruction descriptor of this MachineInstr.
Definition at line 264 of file MachineInstr.h.
Referenced by llvm::addFrameReference(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::TargetInstrInfo::analyzeSelect(), llvm::X86InstrInfo::canFoldMemoryOperand(), llvm::DFAPacketizer::canReserveResources(), llvm::PPCInstrInfo::commuteInstruction(), llvm::TargetInstrInfo::commuteInstruction(), llvm::TargetSchedModel::computeOperandLatency(), llvm::TargetInstrInfo::computeOperandLatency(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), copyImplicitOps(), defs(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::SIInstrInfo::findCommutedOpIndices(), llvm::TargetInstrInfo::findCommutedOpIndices(), llvm::PPCInstrInfo::FoldImmediate(), llvm::ARMBaseInstrInfo::FoldImmediate(), llvm::X86InstrInfo::foldMemoryOperandImpl(), FuseTwoAddrInst(), llvm::HexagonInstrInfo::getAddrMode(), llvm::HexagonInstrInfo::getCExtOpNum(), llvm::ARMBaseInstrInfo::getExecutionDomain(), llvm::X86InstrInfo::getExecutionDomain(), llvm::ARMBaseInstrInfo::getExtractSubregLikeInputs(), llvm::ARMBaseRegisterInfo::getFrameIndexInstrOffset(), llvm::ARMHazardRecognizer::getHazardType(), llvm::ARMBaseInstrInfo::getInsertSubregLikeInputs(), llvm::ScheduleDAG::getInstrDesc(), llvm::PPCInstrInfo::getInstrLatency(), llvm::TargetInstrInfo::getInstrLatency(), llvm::AArch64InstrInfo::GetInstSizeInBytes(), llvm::MSP430InstrInfo::GetInstSizeInBytes(), llvm::MipsInstrInfo::GetInstSizeInBytes(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), llvm::SystemZInstrInfo::getInstSizeInBytes(), getLSMultipleTransferSize(), llvm::HexagonInstrInfo::getMaxValue(), llvm::AArch64InstrInfo::getMemOpBaseRegImmOfs(), llvm::X86InstrInfo::getMemOpBaseRegImmOfs(), getMemoryOpOffset(), llvm::HexagonInstrInfo::getMinValue(), llvm::HexagonInstrInfo::getNonExtOpcode(), llvm::TargetSchedModel::getNumMicroOps(), llvm::ARMBaseInstrInfo::getNumMicroOps(), llvm::TargetInstrInfo::getNumMicroOps(), getNumMicroOpsSwiftLdSt(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::TargetInstrInfo::getOperandLatency(), GetPostIncrementOperand(), llvm::ARMBaseInstrInfo::getRegSequenceLikeInputs(), llvm::HexagonInstrInfo::getSize(), getTargetMBB(), getTruncatedShiftCount(), llvm::TargetInstrInfo::hasLowDefLatency(), hasProperty(), hasRAWHazard(), llvm::HexagonInstrInfo::isBranch(), llvm::HexagonInstrInfo::isConstExtended(), IsControlFlow(), llvm::HexagonInstrInfo::isExtendable(), llvm::HexagonInstrInfo::isExtended(), llvm::AArch64InstrInfo::isFPRCopy(), llvm::ARMBaseRegisterInfo::isFrameOffsetLegal(), llvm::AArch64InstrInfo::isGPRCopy(), llvm::AArch64InstrInfo::isGPRZero(), llvm::NVPTXInstrInfo::isLoadInstr(), llvm::NVPTXInstrInfo::isMoveInstr(), llvm::HexagonInstrInfo::isNewValue(), llvm::HexagonInstrInfo::isNewValueStore(), llvm::HexagonInstrInfo::isOperandExtended(), llvm::HexagonInstrInfo::isPredicable(), llvm::AMDGPUInstrInfo::isPredicable(), llvm::ARMBaseInstrInfo::isPredicable(), llvm::TargetInstrInfo::isPredicable(), llvm::HexagonInstrInfo::isPredicated(), llvm::HexagonInstrInfo::isPredicatedNew(), llvm::HexagonInstrInfo::isPredicatedTrue(), llvm::HexagonInstrInfo::isSchedulingBoundary(), isSimpleBD12Move(), isSimpleMove(), llvm::NVPTXInstrInfo::isStoreInstr(), llvm::TargetInstrInfo::isTriviallyReMaterializable(), llvm::HexagonInstrInfo::mayBeNewStore(), llvm::HexagonInstrInfo::NonExtEquivalentExists(), llvm::SystemZInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeLoadInstr(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::TargetInstrInfo::PredicateInstruction(), llvm::DFAPacketizer::reserveResources(), llvm::PPCRegisterInfo::resolveFrameIndex(), llvm::TargetSchedModel::resolveSchedClass(), llvm::rewriteARMFrameIndex(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), llvm::rewriteT2FrameIndex(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::X86InstrInfo::setExecutionDomain(), transferImpOps(), and uses().
Return whether an MI flag is set.
Definition at line 150 of file MachineInstr.h.
Referenced by llvm::WinCodeViewLineTables::beginInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), isBundledWithPred(), isBundledWithSucc(), and isInsideBundle().
|
inline |
Return the MI flags bitvector.
Definition at line 145 of file MachineInstr.h.
| InlineAsm::AsmDialect MachineInstr::getInlineAsmDialect | ( | ) | const |
Definition at line 1021 of file MachineInstr.cpp.
References llvm::InlineAsm::Extra_AsmDialect, and llvm::InlineAsm::MIOp_ExtraInfo.
Referenced by isMSInlineAsm().
| unsigned MachineInstr::getNumExplicitOperands | ( | ) | const |
Returns the number of non-implicit operands.
getNumExplicitOperands - Returns the number of non-implicit operands.
Definition at line 963 of file MachineInstr.cpp.
References llvm::MachineOperand::isImplicit(), and llvm::MachineOperand::isReg().
Referenced by llvm::HexagonInstrInfo::AnalyzeBranch(), llvm::SystemZInstrInfo::analyzeCompare(), explicit_operands(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), isCompareZero(), and llvm::SIInstrInfo::verifyInstruction().
|
inline |
Access to explicit operands of the instruction.
Definition at line 271 of file MachineInstr.h.
Referenced by llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), llvm::ScheduleDAGInstrs::buildSchedGraph(), callClobbersAnyYmmReg(), llvm::EHStreamer::callToNoUnwindFunction(), canCombineWithMUL(), canFoldCopy(), canFoldIntoMOVCC(), clobbersCTR(), llvm::SIInstrInfo::commuteInstruction(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), copyImplicitOps(), llvm::ARMBaseInstrInfo::DefinesPredicate(), llvm::HexagonInstrInfo::DefinesPredicate(), llvm::PPCInstrInfo::DefinesPredicate(), llvm::BPFRegisterInfo::eliminateFrameIndex(), emitDebugValueComment(), EmitGCCInlineAsmStr(), llvm::X86AsmPrinter::EmitInstruction(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), emitKill(), EmitMSInlineAsmStr(), llvm::TargetLoweringBase::emitPatchPoint(), EmitPCMPSTRI(), EmitPCMPSTRM(), eraseGPOpnd(), llvm::HexagonEvaluator::evaluate(), findCorrespondingPred(), finishConvertToThreeAddress(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::PPCInstrInfo::FoldImmediate(), foldPatchpoint(), FuseInst(), FuseTwoAddrInst(), getCallTargetRegOpnd(), getDebugLocValue(), llvm::MachineInstrExpressionTrait::getHashValue(), llvm::PPCInstrInfo::getInstrLatency(), getLSMultipleTransferSize(), llvm::AArch64InstrInfo::getMemOpBaseRegImmOfsWidth(), llvm::ARMBaseInstrInfo::getNumMicroOps(), getOperand(), getPHIDeps(), getPHISrcRegOpIdx(), GetPostIncrementOperand(), llvm::TargetInstrInfo::getRegSequenceInputs(), GetStoreValueOperand(), HandleVRSaveUpdate(), HashMachineInstr(), hasLiveCondCodeDef(), hasVGPROperands(), hasVirtualRegDefsInBasicBlock(), hasYmmReg(), llvm::HexagonLowerToMC(), INITIALIZE_PASS(), isCSRestore(), isDescribedByReg(), isIdenticalTo(), llvm::isLeaMem(), llvm::isMem(), isMemoryOp(), llvm::SIInstrInfo::isOperandLegal(), isSourceDefinedByImplicitDef(), llvm::ARMBaseInstrInfo::isSwiftFastImmShift(), isTwoAddrUse(), llvm::SIInstrInfo::legalizeOperands(), llvm::XCoreMCInstLower::Lower(), llvm::SystemZMCInstLower::lower(), llvm::MSP430MCInstLower::Lower(), llvm::MipsMCInstLower::Lower(), llvm::BPFMCInstLower::Lower(), llvm::AArch64MCInstLower::Lower(), llvm::LowerARMMachineInstrToMCInst(), llvm::LowerPPCMachineInstrToMCInst(), llvm::LowerSparcMachineInstrToMCInst(), MaySpeculate(), llvm::SIInstrInfo::moveToVALU(), llvm::AArch64InstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::PatchPointOpers::PatchPointOpers(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::TargetInstrInfo::PredicateInstruction(), llvm::MipsAsmPrinter::PrintAsmMemoryOperand(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::printMemOperand(), llvm::MipsAsmPrinter::printRegisterList(), llvm::ARMBaseInstrInfo::produceSameValue(), removeKillInfo(), removeOperands(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), llvm::ThumbRegisterInfo::resolveFrameIndex(), llvm::AArch64RegisterInfo::resolveFrameIndex(), llvm::PPCRegisterInfo::resolveFrameIndex(), llvm::ARMBaseRegisterInfo::resolveFrameIndex(), resultTests(), llvm::rewriteT2FrameIndex(), sizeOfSPAdjustment(), TrackDefUses(), trackRegDefsUses(), transferImpOps(), llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs(), llvm::tryFoldSPUpdateIntoPushPop(), llvm::X86InstrInfo::unfoldMemoryOperand(), UpdateOperandRegClass(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::ValueIsNewPHI(), VerifyLowRegs(), and llvm::MachineRegisterInfo::verifyUseList().
|
inline |
Returns the opcode of this MachineInstr.
Definition at line 267 of file MachineInstr.h.
References llvm::MCInstrDesc::Opcode.
Referenced by llvm::R600InstrInfo::addFlag(), llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::XCoreInstrInfo::AnalyzeBranch(), llvm::NVPTXInstrInfo::AnalyzeBranch(), llvm::HexagonInstrInfo::AnalyzeBranch(), llvm::MipsInstrInfo::AnalyzeBranch(), llvm::AArch64InstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::R600InstrInfo::AnalyzeBranch(), llvm::HexagonInstrInfo::analyzeCompare(), llvm::AArch64InstrInfo::analyzeCompare(), llvm::PPCInstrInfo::analyzeCompare(), llvm::ARMBaseInstrInfo::analyzeCompare(), llvm::X86InstrInfo::analyzeCompare(), llvm::ARMBaseInstrInfo::analyzeSelect(), areCombinableOperations(), llvm::SIInstrInfo::areMemAccessesTriviallyDisjoint(), BBIsJumpedOver(), branchTargetOperand(), llvm::R600InstrInfo::buildSlotOfVectorInstruction(), llvm::R600InstrInfo::canBeConsideredALU(), canCombineWithMUL(), canCompareBeNewValueJump(), canDefBePartOfLOH(), canFoldIntoCSel(), llvm::X86InstrInfo::canFoldMemoryOperand(), llvm::SIInstrInfo::canReadVGPR(), canShrink(), llvm::NVPTXInstrInfo::CanTailMerge(), llvm::R600InstrInfo::clearFlag(), llvm::SIInstrInfo::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::ARMBaseInstrInfo::commuteInstruction(), llvm::X86InstrInfo::commuteInstruction(), llvm::SIInstrInfo::commuteOpcode(), computeOthers(), convertFlagSettingOpcode(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::TargetInstrInfo::defaultDefLatency(), llvm::R600InstrInfo::DefinesPredicate(), llvm::ARMBaseInstrInfo::duplicate(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::SparcFrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::HexagonFrameLowering::eliminateCallFramePseudoInstr(), llvm::Thumb1FrameLowering::eliminateCallFramePseudoInstr(), llvm::BPFRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::Thumb1FrameLowering::emitEpilogue(), llvm::SystemZAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::PPCHazardRecognizer970::EmitInstruction(), llvm::X86AsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::Mips16TargetLowering::EmitInstrWithCustomInserter(), llvm::MipsSETargetLowering::EmitInstrWithCustomInserter(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::SparcTargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::HexagonTargetLowering::EmitInstrWithCustomInserter(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), llvm::AArch64TargetLowering::EmitInstrWithCustomInserter(), llvm::SystemZTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::TargetLoweringBase::emitPatchPoint(), EmitPCMPSTRI(), EmitPCMPSTRM(), llvm::MSP430TargetLowering::EmitShiftInstr(), llvm::HexagonEvaluator::evaluate(), llvm::BitTracker::MachineEvaluator::evaluate(), llvm::SIInstrInfo::findCommutedOpIndices(), llvm::PPCInstrInfo::findCommutedOpIndices(), llvm::X86InstrInfo::findCommutedOpIndices(), findFirstPredicateSetterFrom(), llvm::R600InstrInfo::fitsConstReadLimitations(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::SIInstrInfo::FoldImmediate(), llvm::PPCInstrInfo::FoldImmediate(), llvm::ARMBaseInstrInfo::FoldImmediate(), foldImmediates(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::X86InstrInfo::foldMemoryOperandImpl(), foldPatchpoint(), llvm::SystemZInstrInfo::getBranchInfo(), getCopyRewriter(), getDestBlock(), llvm::HexagonInstrInfo::GetDotNewOp(), llvm::HexagonInstrInfo::getDotNewPredJumpOp(), llvm::HexagonInstrInfo::GetDotNewPredOp(), llvm::ARMBaseInstrInfo::getExecutionDomain(), llvm::X86InstrInfo::getExecutionDomain(), llvm::ARMBaseInstrInfo::getExtractSubregLikeInputs(), llvm::R600InstrInfo::getFlagOp(), getFPOffsetInPrologue(), llvm::MachineInstrExpressionTrait::getHashValue(), llvm::ARMHazardRecognizer::getHazardType(), llvm::PPCHazardRecognizer970::getHazardType(), llvm::ARMBaseInstrInfo::getInsertSubregLikeInputs(), llvm::AArch64InstrInfo::GetInstSizeInBytes(), llvm::MSP430InstrInfo::GetInstSizeInBytes(), llvm::MipsInstrInfo::GetInstSizeInBytes(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), llvm::SystemZInstrInfo::getInstSizeInBytes(), llvm::PPCInstrInfo::GetInstSizeInBytes(), llvm::getITInstrPredicate(), getLSMultipleTransferSize(), llvm::AArch64InstrInfo::getMachineCombinerPatterns(), llvm::SIInstrInfo::getMemOpBaseRegImmOfs(), llvm::AArch64InstrInfo::getMemOpBaseRegImmOfs(), llvm::X86InstrInfo::getMemOpBaseRegImmOfs(), llvm::AArch64InstrInfo::getMemOpBaseRegImmOfsWidth(), getMemoryOpOffset(), llvm::SIInstrInfo::getNamedOperand(), getNewValueJumpOpcode(), llvm::HexagonInstrInfo::getNonExtOpcode(), llvm::ARMBaseInstrInfo::getNumMicroOps(), getNumMicroOpsSwiftLdSt(), getOffsetONFromFION(), llvm::R600InstrInfo::getOperandIdx(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::SIInstrInfo::getOpRegClass(), llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), llvm::X86InstrInfo::getPartialRegUpdateClearance(), llvm::ARMBaseInstrInfo::getRegSequenceLikeInputs(), llvm::TargetInstrInfo::getSPAdjust(), llvm::X86InstrInfo::getSPAdjust(), getSrcFromCopy(), llvm::R600InstrInfo::getSrcs(), llvm::X86InstrInfo::getUndefRegClearance(), llvm::SIInstrInfo::getVALUOp(), llvm::AArch64InstrInfo::hasExtendedReg(), llvm::R600InstrInfo::hasFlagOperand(), llvm::X86InstrInfo::hasHighOperandLatency(), HashMachineInstr(), hasReassocSibling(), llvm::AArch64InstrInfo::hasShiftedReg(), llvm::HexagonLowerToMC(), llvm::NVPTXAsmPrinter::ignoreLoc(), INITIALIZE_PASS(), InsertFPConstInst(), InsertFPImmInst(), InsertSPConstInst(), InsertSPImmInst(), invertBccCondition(), llvm::isAArch64FrameOffsetLegal(), llvm::AArch64InstrInfo::isAsCheapAsAMove(), isBundle(), isCandidate(), isCandidateLoad(), isCandidateStore(), isCFIInstruction(), llvm::AArch64InstrInfo::isCoalescableExtInstr(), llvm::PPCInstrInfo::isCoalescableExtInstr(), llvm::X86InstrInfo::isCoalescableExtInstr(), isCompareZero(), llvm::HexagonInstrInfo::isConditionalALU32(), llvm::HexagonInstrInfo::isConditionalLoad(), llvm::HexagonInstrInfo::isConditionalStore(), llvm::HexagonInstrInfo::isConditionalTransfer(), isCopy(), isCopy(), isCSRestore(), isCSSave(), isCVTAToLocalCombinationCandidate(), llvm::HexagonInstrInfo::isDeallocRet(), isDebugValue(), isDefConvertible(), IsDirectJump(), isEHLabel(), isEligibleForITBlock(), llvm::HexagonInstrInfo::isExtendable(), isExtractSubreg(), isFirstInstructionInSequence(), llvm::AArch64InstrInfo::isFPRCopy(), llvm::PPCRegisterInfo::isFrameOffsetLegal(), isGCLabel(), llvm::AArch64InstrInfo::isGPRCopy(), llvm::AArch64InstrInfo::isGPRZero(), isGreaterThanNBitTFRI(), isHardwareLoop(), isHighLatencyCPSR(), isIdenticalTo(), llvm::SIInstrInfo::isImmOperandLegal(), isImplicitDef(), IsIndirectCall(), isInlineAsm(), isInsertSubreg(), isKill(), llvm::MipsSEInstrInfo::isLoadFromStackSlot(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::HexagonInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::AArch64InstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlotPostFE(), IsLoopN(), isMatchingDecrement(), isMatchingIncrement(), isMatchingUpdateInsn(), llvm::HexagonInstrInfo::isMemOp(), isMemoryOp(), isMla(), isMSInlineAsm(), isMul(), llvm::HexagonInstrInfo::isNewValueJumpCandidate(), isNonFoldablePartialRegisterLoad(), llvm::SIInstrInfo::isOperandLegal(), isPHI(), isPhysicalRegCopy(), llvm::HexagonInstrInfo::isPredicable(), llvm::SystemZInstrInfo::isPredicable(), llvm::R600InstrInfo::isPredicable(), llvm::PPCInstrInfo::isPredicable(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::NVPTXInstrInfo::isReadSpecialReg(), llvm::SIInstrInfo::isReallyTriviallyReMaterializable(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), isReassocCandidate(), isRedundantFlagInstr(), llvm::AMDGPUInstrInfo::isRegisterLoad(), llvm::AMDGPUInstrInfo::isRegisterStore(), isRegSequence(), llvm::VLIWResourceModel::isResourceAvailable(), llvm::HexagonInstrInfo::isSaveCalleeSavedRegsCall(), llvm::AArch64InstrInfo::isScaledAddr(), IsSchedBarrier(), isSecondInstructionInSequence(), isSExtLoad(), isShift(), isSimpleIndexCalc(), llvm::HexagonInstrInfo::isSpillPredRegOp(), llvm::SystemZInstrInfo::isStackSlotCopy(), llvm::MipsSEInstrInfo::isStoreToStackSlot(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::HexagonInstrInfo::isStoreToStackSlot(), llvm::AArch64InstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlotPostFE(), isSubregToReg(), isSuitableForMask(), isTransformable(), isTransient(), llvm::R600InstrInfo::isTransOnly(), llvm::R600InstrInfo::isTrig(), llvm::TargetInstrInfo::isTriviallyReMaterializable(), llvm::SIInstrInfo::isTriviallyReMaterializable(), isUseDefConvertible(), llvm::R600InstrInfo::isVector(), llvm::R600InstrInfo::isVectorOnly(), isZExtLoad(), llvm::SIInstrInfo::legalizeOperands(), llvm::SIInstrInfo::legalizeOpWithMove(), llvm::AMDGPUMCInstLower::lower(), llvm::XCoreMCInstLower::Lower(), llvm::SystemZMCInstLower::lower(), llvm::MSP430MCInstLower::Lower(), llvm::MipsMCInstLower::Lower(), llvm::BPFMCInstLower::Lower(), llvm::AArch64MCInstLower::Lower(), llvm::LowerARMMachineInstrToMCInst(), llvm::LowerPPCMachineInstrToMCInst(), llvm::LowerSparcMachineInstrToMCInst(), MatchingStackOffset(), llvm::SIInstrInfo::moveSMRDToVALU(), llvm::SIInstrInfo::moveToVALU(), llvm::PPCRegisterInfo::needsFrameBaseReg(), llvm::ARMBaseRegisterInfo::needsFrameBaseReg(), llvm::HexagonInstrInfo::NonExtEquivalentExists(), llvm::AArch64InstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::AArch64InstrInfo::optimizeCondBranch(), llvm::ARMBaseInstrInfo::optimizeSelect(), parseCondBranch(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::ARMBaseInstrInfo::PredicateInstruction(), llvm::SystemZInstrInfo::PredicateInstruction(), llvm::R600InstrInfo::PredicateInstruction(), llvm::PPCInstrInfo::PredicateInstruction(), llvm::MipsAsmPrinter::printMemOperand(), llvm::ARMBaseInstrInfo::produceSameValue(), reachedUsesToDefs(), llvm::R600InstrInfo::readsLDSSrcReg(), reassociateOps(), llvm::StackMaps::recordPatchPoint(), llvm::StackMaps::recordStackMap(), llvm::StackMaps::recordStatepoint(), regIsPICBase(), registerADRCandidate(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), removeIPMBasedCompare(), removeModOperands(), llvm::VLIWResourceModel::reserveResources(), resultTests(), llvm::rewriteAArch64FrameIndex(), llvm::rewriteARMFrameIndex(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), llvm::rewriteT2FrameIndex(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::X86InstrInfo::setExecutionDomain(), llvm::SIInstrInfo::shouldClusterLoads(), llvm::AArch64InstrInfo::shouldClusterLoads(), llvm::AArch64InstrInfo::shouldScheduleAdjacent(), llvm::X86InstrInfo::shouldScheduleAdjacent(), sizeOfSPAdjustment(), supportLoadFromLiteral(), toggleBundleKillFlag(), tryAddToFoldList(), llvm::tryFoldSPUpdateIntoPushPop(), llvm::X86InstrInfo::unfoldMemoryOperand(), usesIXAddr(), llvm::R600InstrInfo::usesTextureCache(), llvm::R600InstrInfo::usesVertexCache(), llvm::SIInstrInfo::verifyInstruction(), and VerifyLowRegs().
|
inline |
Definition at line 273 of file MachineInstr.h.
References getNumOperands(), and Operands.
Referenced by llvm::ScheduleDAGInstrs::addPhysRegDataDeps(), llvm::ScheduleDAGInstrs::addPhysRegDeps(), llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::ScheduleDAGInstrs::addVRegDefDeps(), llvm::ScheduleDAGInstrs::addVRegUseDeps(), adjustDefLatency(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::XCoreInstrInfo::AnalyzeBranch(), llvm::NVPTXInstrInfo::AnalyzeBranch(), llvm::HexagonInstrInfo::AnalyzeBranch(), llvm::MipsInstrInfo::AnalyzeBranch(), llvm::AArch64InstrInfo::AnalyzeBranch(), llvm::PPCInstrInfo::AnalyzeBranch(), llvm::R600InstrInfo::AnalyzeBranch(), llvm::HexagonInstrInfo::analyzeCompare(), llvm::SystemZInstrInfo::analyzeCompare(), llvm::AArch64InstrInfo::analyzeCompare(), llvm::PPCInstrInfo::analyzeCompare(), llvm::ARMBaseInstrInfo::analyzeCompare(), llvm::X86InstrInfo::analyzeCompare(), llvm::ARMBaseInstrInfo::analyzeSelect(), BBIsJumpedOver(), biasPhysRegCopy(), llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::R600InstrInfo::buildSlotOfVectorInstruction(), callClobbersAnyYmmReg(), llvm::EHStreamer::callToNoUnwindFunction(), canCombineWithMUL(), canCompareBeNewValueJump(), canDefBePartOfLOH(), canFoldCopy(), canFoldIntoCSel(), canFoldIntoMOVCC(), llvm::X86InstrInfo::canFoldMemoryOperand(), clobbersCTR(), collectDebugValues(), CombineCVTAToLocal(), llvm::SIInstrInfo::commuteInstruction(), llvm::PPCInstrInfo::commuteInstruction(), llvm::ARMBaseInstrInfo::commuteInstruction(), llvm::TargetInstrInfo::commuteInstruction(), llvm::X86InstrInfo::commuteInstruction(), llvm::TargetSchedModel::computeOperandLatency(), computeOthers(), llvm::TargetSchedModel::computeOutputLatency(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), copyHint(), copyImplicitOps(), llvm::R600InstrInfo::copyPhysReg(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::CreateEmptyPHI(), llvm::ARMBaseInstrInfo::DefinesPredicate(), llvm::HexagonInstrInfo::DefinesPredicate(), llvm::PPCInstrInfo::DefinesPredicate(), llvm::ARMBaseInstrInfo::duplicate(), llvm::SparcFrameLowering::eliminateCallFramePseudoInstr(), llvm::MSP430FrameLowering::eliminateCallFramePseudoInstr(), llvm::XCoreFrameLowering::eliminateCallFramePseudoInstr(), llvm::Thumb1FrameLowering::eliminateCallFramePseudoInstr(), llvm::BPFRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::NVPTXRegisterInfo::eliminateFrameIndex(), llvm::SystemZRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::AsmPrinter::emitCFIInstruction(), emitDebugValueComment(), llvm::PPCTargetLowering::emitEHSjLjLongJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::MSP430FrameLowering::emitEpilogue(), llvm::AArch64TargetLowering::EmitF128CSEL(), llvm::AsmPrinter::emitFrameAlloc(), EmitGCCInlineAsmStr(), llvm::AsmPrinter::emitImplicitDef(), emitIncrement(), llvm::SystemZAsmPrinter::EmitInstruction(), llvm::ARMAsmPrinter::EmitInstruction(), llvm::X86AsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::R600TargetLowering::EmitInstrWithCustomInserter(), llvm::BPFTargetLowering::EmitInstrWithCustomInserter(), llvm::SITargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreTargetLowering::EmitInstrWithCustomInserter(), llvm::MSP430TargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::ARMAsmPrinter::EmitJumpTableAddrs(), llvm::ARMAsmPrinter::EmitJumpTableInsts(), llvm::ARMAsmPrinter::EmitJumpTableTBInst(), emitKill(), EmitMonitor(), EmitMSInlineAsmStr(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::TargetLoweringBase::emitPatchPoint(), EmitPCMPSTRI(), EmitPCMPSTRM(), llvm::MSP430FrameLowering::emitPrologue(), llvm::MSP430TargetLowering::EmitShiftInstr(), llvm::X86FrameLowering::emitSPUpdate(), EmitXBegin(), eraseGPOpnd(), eraseIfDead(), llvm::HexagonEvaluator::evaluate(), llvm::BitTracker::MachineEvaluator::evaluate(), Expand2AddrUndef(), llvm::SparcTargetLowering::expandAtomicRMW(), expandLoadStackGuard(), llvm::SparcTargetLowering::expandSelectCC(), llvm::SIInstrInfo::findCommutedOpIndices(), llvm::TargetInstrInfo::findCommutedOpIndices(), llvm::X86InstrInfo::findCommutedOpIndices(), findCorrespondingPred(), findDefIdx(), findRegisterDefOperand(), findRegisterUseOperand(), findUseIdx(), finishConvertToThreeAddress(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::SIInstrInfo::FoldImmediate(), llvm::PPCInstrInfo::FoldImmediate(), llvm::ARMBaseInstrInfo::FoldImmediate(), foldImmediates(), llvm::AArch64InstrInfo::foldMemoryOperandImpl(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::X86InstrInfo::foldMemoryOperandImpl(), foldPatchpoint(), FuseInst(), FuseTwoAddrInst(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), llvm::X86InstrInfo::genAlternativeCodeSequence(), genMadd(), genMaddR(), llvm::SystemZInstrInfo::getBranchInfo(), llvm::StatepointOpers::getCallTarget(), getCallTargetRegOpnd(), llvm::SystemZInstrInfo::getCompareAndBranch(), getDebugExpression(), getDebugLocValue(), getDebugVariable(), getDestBlock(), llvm::HexagonInstrInfo::getDotNewPredJumpOp(), llvm::TargetInstrInfo::getExtractSubregInputs(), llvm::ARMBaseInstrInfo::getExtractSubregLikeInputs(), llvm::R600InstrInfo::getFlagOp(), getFPOffsetInPrologue(), llvm::ARMBaseRegisterInfo::getFrameIndexInstrOffset(), getFrameIndexOperandNum(), llvm::StatepointOpers::getID(), llvm::TargetInstrInfo::getInsertSubregInputs(), llvm::ARMBaseInstrInfo::getInsertSubregLikeInputs(), llvm::PPCInstrInfo::getInstrLatency(), llvm::getInstrPredicate(), llvm::AArch64InstrInfo::GetInstSizeInBytes(), llvm::MSP430InstrInfo::GetInstSizeInBytes(), llvm::MipsInstrInfo::GetInstSizeInBytes(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), llvm::SystemZInstrInfo::getInstSizeInBytes(), llvm::PPCInstrInfo::GetInstSizeInBytes(), llvm::NVPTXInstrInfo::getLdStCodeAddrSpace(), getLoadStoreBaseOp(), getLoadStoreRegOp(), llvm::AArch64InstrInfo::getMachineCombinerPatterns(), llvm::AArch64InstrInfo::getMemOpBaseRegImmOfs(), llvm::X86InstrInfo::getMemOpBaseRegImmOfs(), llvm::AArch64InstrInfo::getMemOpBaseRegImmOfsWidth(), getMemoryOpOffset(), llvm::PatchPointOpers::getMetaOper(), llvm::SIInstrInfo::getNamedOperand(), getNumMicroOpsSwiftLdSt(), llvm::StatepointOpers::getNumPatchBytes(), llvm::PPCInstrInfo::getOperandLatency(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::MachineRegisterInfo::defusechain_iterator< Uses, Defs, SkipDebug, ByOperand, ByInstr, ByBundle >::getOperandNo(), llvm::SIInstrInfo::getOpRegClass(), llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), llvm::X86InstrInfo::getPartialRegUpdateClearance(), getPHIDeps(), getPHISrcRegOpIdx(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetPHIValue(), GetPostIncrementOperand(), llvm::ARMBaseInstrInfo::getPredicate(), llvm::TargetInstrInfo::getRegSequenceInputs(), llvm::ARMBaseInstrInfo::getRegSequenceLikeInputs(), llvm::TargetInstrInfo::getSPAdjust(), llvm::X86InstrInfo::getSPAdjust(), getSrcFromCopy(), llvm::R600InstrInfo::getSrcs(), GetStoreValueOperand(), getTargetMBB(), getTruncatedShiftCount(), llvm::X86InstrInfo::getUndefRegClearance(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::GetUndefVal(), llvm::MachineSSAUpdater::GetValueInMiddleOfBlock(), llvm::SIInstrInfo::getVALUOp(), llvm::PatchPointOpers::getVarIdx(), llvm::StatepointOpers::getVarIdx(), HandleVRSaveUpdate(), llvm::AArch64InstrInfo::hasExtendedReg(), HashMachineInstr(), hasLiveCondCodeDef(), hasRAWHazard(), hasReassocSibling(), llvm::AArch64InstrInfo::hasShiftedReg(), hasVGPROperands(), hasVirtualRegDefsInBasicBlock(), hasYmmReg(), llvm::HexagonLowerToMC(), llvm::HexagonInstrInfo::immediateExtend(), INITIALIZE_PASS(), llvm::HexagonInstrInfo::InsertBranch(), llvm::R600InstrInfo::InsertBranch(), insertDivByZeroTrap(), InsertFPConstInst(), InsertFPImmInst(), InsertSPConstInst(), InsertSPImmInst(), invertBccCondition(), llvm::isAArch64FrameOffsetLegal(), llvm::AArch64InstrInfo::isAsCheapAsAMove(), isCandidateLoad(), isCandidateStore(), llvm::AArch64InstrInfo::isCoalescableExtInstr(), llvm::PPCInstrInfo::isCoalescableExtInstr(), llvm::X86InstrInfo::isCoalescableExtInstr(), isCompareZero(), llvm::HexagonInstrInfo::isConstExtended(), isCopyToReg(), isCSRestore(), isCVTAToLocalCombinationCandidate(), isDescribedByReg(), llvm::AArch64InstrInfo::isFPRCopy(), llvm::PPCRegisterInfo::isFrameOffsetLegal(), llvm::ARMBaseRegisterInfo::isFrameOffsetLegal(), isFullCopy(), isFullCopyOf(), llvm::AArch64InstrInfo::isGPRCopy(), llvm::AArch64InstrInfo::isGPRZero(), isGreaterThanNBitTFRI(), isIdenticalTo(), isIdentityCopy(), isIndirectDebugValue(), llvm::isLeaMem(), llvm::MipsSEInstrInfo::isLoadFromStackSlot(), llvm::XCoreInstrInfo::isLoadFromStackSlot(), llvm::HexagonInstrInfo::isLoadFromStackSlot(), llvm::SparcInstrInfo::isLoadFromStackSlot(), llvm::AArch64InstrInfo::isLoadFromStackSlot(), llvm::PPCInstrInfo::isLoadFromStackSlot(), llvm::ARMBaseInstrInfo::isLoadFromStackSlot(), llvm::X86InstrInfo::isLoadFromStackSlot(), isLocalCopy(), isMatchingDecrement(), isMatchingIncrement(), isMatchingUpdateInsn(), llvm::isMem(), isMemoryOp(), llvm::NVPTXInstrInfo::isMoveInstr(), isNonFoldablePartialRegisterLoad(), isNopCopy(), llvm::SIInstrInfo::isOperandLegal(), isPhysicalRegCopy(), llvm::HexagonInstrInfo::isPredicable(), llvm::R600InstrInfo::isPredicable(), llvm::ARMBaseInstrInfo::isPredicated(), llvm::R600InstrInfo::isPredicated(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), isRedundantFlagInstr(), isRegTiedToDefOperand(), isRegTiedToUseOperand(), llvm::AArch64InstrInfo::isScaledAddr(), isSecondInstructionInSequence(), isShift(), isSimpleBD12Move(), isSimpleIndexCalc(), isSimpleMove(), isSourceDefinedByImplicitDef(), llvm::SystemZInstrInfo::isStackSlotCopy(), llvm::MipsSEInstrInfo::isStoreToStackSlot(), llvm::XCoreInstrInfo::isStoreToStackSlot(), llvm::HexagonInstrInfo::isStoreToStackSlot(), llvm::AArch64InstrInfo::isStoreToStackSlot(), llvm::SparcInstrInfo::isStoreToStackSlot(), llvm::PPCInstrInfo::isStoreToStackSlot(), llvm::ARMBaseInstrInfo::isStoreToStackSlot(), llvm::X86InstrInfo::isStoreToStackSlot(), isSuitableForMask(), llvm::ARMBaseInstrInfo::isSwiftFastImmShift(), llvm::SIInstrInfo::isTriviallyReMaterializable(), isTwoAddrUse(), llvm::SIInstrInfo::legalizeOperands(), llvm::SIInstrInfo::legalizeOpWithMove(), llvm::SystemZMCInstLower::lower(), llvm::XCoreMCInstLower::Lower(), llvm::MipsMCInstLower::Lower(), llvm::MSP430MCInstLower::Lower(), llvm::BPFMCInstLower::Lower(), llvm::AArch64MCInstLower::Lower(), llvm::LowerARMMachineInstrToMCInst(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::LowerPPCMachineInstrToMCInst(), lowerRIEfLow(), lowerRIHigh(), lowerRILow(), llvm::LowerSparcMachineInstrToMCInst(), lowerSubvectorLoad(), lowerSubvectorStore(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::PPCRegisterInfo::lowerVRSAVESpilling(), llvm::MachineRegisterInfo::markUsesInDebugValueAsUndef(), MatchingStackOffset(), mayLoad(), MaySpeculate(), mayStore(), llvm::SIInstrInfo::moveSMRDToVALU(), llvm::SIInstrInfo::moveToVALU(), llvm::AArch64RegisterInfo::needsFrameBaseReg(), llvm::PPCRegisterInfo::needsFrameBaseReg(), llvm::ARMBaseRegisterInfo::needsFrameBaseReg(), llvm::AArch64InstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::AArch64InstrInfo::optimizeCondBranch(), llvm::X86InstrInfo::optimizeLoadInstr(), llvm::ARMBaseInstrInfo::optimizeSelect(), parseCondBranch(), llvm::PatchPointOpers::PatchPointOpers(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::ARMBaseInstrInfo::PredicateInstruction(), llvm::R600InstrInfo::PredicateInstruction(), llvm::PPCInstrInfo::PredicateInstruction(), llvm::TargetInstrInfo::PredicateInstruction(), llvm::SystemZAsmPrinter::PrintAsmMemoryOperand(), llvm::HexagonAsmPrinter::PrintAsmMemoryOperand(), llvm::ARMAsmPrinter::PrintAsmMemoryOperand(), llvm::MipsAsmPrinter::PrintAsmMemoryOperand(), llvm::SystemZAsmPrinter::PrintAsmOperand(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::AMDGPUAsmPrinter::PrintAsmOperand(), llvm::X86AsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), llvm::AsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::printFCCOperand(), printIntelMemReference(), printLeaMemReference(), printMemReference(), llvm::HexagonAsmPrinter::printOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), printOperand(), printPCRelImm(), llvm::MipsAsmPrinter::printUnsignedImm(), llvm::MipsAsmPrinter::printUnsignedImm8(), llvm::ARMBaseInstrInfo::produceSameValue(), reassociateOps(), llvm::MachineRegisterInfo::recomputeRegClass(), llvm::StackMaps::recordStackMap(), registerADRCandidate(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), llvm::X86InstrInfo::reMaterialize(), removeCopies(), removeIPMBasedCompare(), removeKillInfo(), llvm::LiveVariables::removeVirtualRegisterDead(), llvm::LiveVariables::removeVirtualRegisterKilled(), llvm::LiveVariables::removeVirtualRegistersKilled(), replaceFI(), llvm::ThumbRegisterInfo::resolveFrameIndex(), llvm::AArch64RegisterInfo::resolveFrameIndex(), llvm::PPCRegisterInfo::resolveFrameIndex(), llvm::ARMBaseRegisterInfo::resolveFrameIndex(), resultTests(), llvm::rewriteAArch64FrameIndex(), llvm::rewriteARMFrameIndex(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), llvm::rewriteT2FrameIndex(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::R600InstrInfo::setImmOperand(), llvm::AArch64InstrInfo::shouldClusterLoads(), llvm::SIInstrInfo::splitSMRD(), TrackDefUses(), trackRegDefsUses(), transferImpOps(), llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs(), llvm::tryFoldSPUpdateIntoPushPop(), tryOrrMovk(), trySequenceOfOnes(), tryToreplicateChunks(), llvm::X86InstrInfo::unfoldMemoryOperand(), untieRegOperand(), llvm::AntiDepBreaker::UpdateDbgValue(), updateOperand(), UpdateOperandRegClass(), updatePhysDepsDownwards(), updatePhysDepsUpwards(), llvm::SIInstrInfo::verifyInstruction(), VerifyLowRegs(), and llvm::MachineRegisterInfo::verifyUseList().
|
inline |
Definition at line 277 of file MachineInstr.h.
References getNumOperands(), and Operands.
|
inline |
Returns the number of the operand iterator I points to.
Definition at line 335 of file MachineInstr.h.
References operands_begin().
Referenced by getDataDeps(), updatePhysDepsDownwards(), and updatePhysDepsUpwards().
|
inline |
Definition at line 120 of file MachineInstr.h.
Referenced by llvm::addFrameReference(), llvm::LiveIntervals::addSegmentToEndOfBlock(), llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::VirtRegAuxInfo::calculateSpillWeightAndHint(), canCombineWithMUL(), canFoldCopy(), llvm::X86InstrInfo::classifyLEAReg(), collectDebugValues(), CombineCVTAToLocal(), llvm::PPCInstrInfo::commuteInstruction(), llvm::TargetInstrInfo::commuteInstruction(), llvm::X86InstrInfo::commuteInstruction(), llvm::TargetSchedModel::computeOutputLatency(), concatenateMemOperands(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::SystemZInstrInfo::convertToThreeAddress(), llvm::X86InstrInfo::convertToThreeAddress(), DoesModifyCalleeSavedReg(), llvm::MachineDominatorTree::dominates(), llvm::BPFRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::NVPTXRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), emitComments(), llvm::HexagonAsmPrinter::EmitInstruction(), llvm::AMDGPUAsmPrinter::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::ScheduleDAGSDNodes::EmitSchedule(), llvm::DbgValueHistoryMap::endInstrRange(), llvm::SplitEditor::enterIntvAfter(), llvm::SplitEditor::enterIntvBefore(), eraseGPOpnd(), expandLoadStackGuard(), findOnlyInterestingUse(), llvm::ARMBaseInstrInfo::FoldImmediate(), forceReg(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), llvm::X86InstrInfo::genAlternativeCodeSequence(), getBundledUseMI(), getConstantFromPool(), llvm::HexagonInstrInfo::getDotNewPredJumpOp(), llvm::ARMHazardRecognizer::getHazardType(), getImplicitSPRUseForDPRUse(), llvm::SlotIndexes::getIndexAfter(), llvm::SlotIndexes::getIndexBefore(), llvm::MachineTraceMetrics::Trace::getInstrSlack(), llvm::AArch64InstrInfo::GetInstSizeInBytes(), llvm::MSP430InstrInfo::GetInstSizeInBytes(), llvm::MipsInstrInfo::GetInstSizeInBytes(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), llvm::SystemZInstrInfo::getInstSizeInBytes(), llvm::PPCInstrInfo::GetInstSizeInBytes(), llvm::AArch64InstrInfo::getMachineCombinerPatterns(), llvm::X86InstrInfo::getMachineCombinerPatterns(), llvm::AArch64InstrInfo::getMemOpBaseRegImmOfs(), getNewValueJumpOpcode(), llvm::PPCInstrInfo::getOperandLatency(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::SIInstrInfo::getOpRegClass(), getRegClassConstraint(), llvm::TargetInstrInfo::getSPAdjust(), llvm::X86InstrInfo::getSPAdjust(), llvm::LiveIntervals::getSpillWeight(), GetSymbolRef(), llvm::LiveIntervals::handleMove(), llvm::LiveVariables::HandleVirtRegUse(), HandleVRSaveUpdate(), hasReassocSibling(), hasVGPROperands(), hasVirtualRegDefsInBasicBlock(), insertCopy(), InsertFPConstInst(), InsertFPImmInst(), llvm::SlotIndexes::insertMachineInstrInMaps(), insertNopBeforeInstruction(), InsertSPConstInst(), InsertSPImmInst(), isAnySubRegLive(), isCVTAToLocalCombinationCandidate(), isDefLiveOut(), llvm::MachineTraceMetrics::Trace::isDepInTrace(), isIdenticalTo(), isInvariantLoad(), llvm::LiveVariables::VarInfo::isLiveIn(), isNoReturnDef(), llvm::SIInstrInfo::isOperandLegal(), llvm::ARMBaseInstrInfo::isPredicable(), llvm::R600InstrInfo::isPredicable(), llvm::ARMBaseInstrInfo::isPredicated(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), isReassocCandidate(), llvm::SystemZInstrInfo::isStackSlotCopy(), jumpTableFollowsTB(), llvm::SplitEditor::leaveIntvAfter(), llvm::SplitEditor::leaveIntvBefore(), llvm::SIInstrInfo::legalizeOperands(), llvm::SIInstrInfo::legalizeOpWithMove(), llvm::AMDGPUMCInstLower::lower(), llvm::PPCRegisterInfo::lowerCRBitRestore(), llvm::PPCRegisterInfo::lowerCRBitSpilling(), llvm::PPCRegisterInfo::lowerCRRestore(), llvm::PPCRegisterInfo::lowerCRSpilling(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::PPCRegisterInfo::lowerVRSAVERestore(), llvm::PPCRegisterInfo::lowerVRSAVESpilling(), llvm::MachineOperandIteratorBase::MachineOperandIteratorBase(), MIsNeedChainEdge(), modifiesConditionCode(), llvm::SIInstrInfo::moveSMRDToVALU(), llvm::SIInstrInfo::moveToVALU(), llvm::AArch64RegisterInfo::needsFrameBaseReg(), llvm::PPCRegisterInfo::needsFrameBaseReg(), llvm::ARMBaseRegisterInfo::needsFrameBaseReg(), NoInterveningSideEffect(), llvm::AArch64InstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::AArch64InstrInfo::optimizeCondBranch(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::ARMBaseInstrInfo::PredicateInstruction(), llvm::SystemZInstrInfo::PredicateInstruction(), llvm::R600InstrInfo::PredicateInstruction(), llvm::PPCInstrInfo::PredicateInstruction(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::ARMBaseInstrInfo::produceSameValue(), reassociateOps(), removeIPMBasedCompare(), RemoveVRSaveCode(), replaceFI(), llvm::ThumbRegisterInfo::resolveFrameIndex(), llvm::AArch64RegisterInfo::resolveFrameIndex(), llvm::PPCRegisterInfo::resolveFrameIndex(), llvm::ARMBaseRegisterInfo::resolveFrameIndex(), llvm::rewriteAArch64FrameIndex(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), llvm::rewriteT2FrameIndex(), llvm::MachineSSAUpdater::RewriteUse(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::CoalescerPair::setRegisters(), llvm::ARMBaseRegisterInfo::shouldCoalesce(), llvm::LiveIntervals::shrinkToUses(), llvm::SIInstrInfo::splitSMRD(), llvm::FastISel::tryToFoldLoad(), UpdateOperandRegClass(), UpdatePredRedefs(), llvm::R600InstrInfo::usesTextureCache(), llvm::R600InstrInfo::usesVertexCache(), and llvm::SIInstrInfo::verifyInstruction().
|
inline |
Definition at line 121 of file MachineInstr.h.
| const TargetRegisterClass * MachineInstr::getRegClassConstraint | ( | unsigned | OpIdx, |
| const TargetInstrInfo * | TII, | ||
| const TargetRegisterInfo * | TRI | ||
| ) | const |
Compute the static register class constraint for operand OpIdx.
For normal instructions, this is derived from the MCInstrDesc. For inline assembly it is derived from the flag words.
Returns NULL if the static register class constraint cannot be determined.
Definition at line 1056 of file MachineInstr.cpp.
References llvm::HexagonMCInstrInfo::getDesc(), llvm::InlineAsm::getKind(), getParent(), llvm::MachineOperand::getParent(), llvm::TargetRegisterInfo::getPointerRegClass(), llvm::TargetInstrInfo::getRegClass(), llvm::TargetRegisterInfo::getRegClass(), llvm::InlineAsm::hasRegClassConstraint(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isUse(), and llvm::InlineAsm::Kind_Mem.
Referenced by reassociateOps(), and UpdateOperandRegClass().
| const TargetRegisterClass * MachineInstr::getRegClassConstraintEffect | ( | unsigned | OpIdx, |
| const TargetRegisterClass * | CurRC, | ||
| const TargetInstrInfo * | TII, | ||
| const TargetRegisterInfo * | TRI | ||
| ) | const |
Applies the constraints (def/use) implied by the OpIdx operand to the given CurRC.
Returns the register class that satisfies both CurRC and the constraints set by OpIdx MI. Returns NULL if such a register class does not exist.
OpIdx must be a register. Definition at line 1121 of file MachineInstr.cpp.
References llvm::TargetRegisterInfo::getCommonSubClass(), llvm::TargetRegisterInfo::getMatchingSuperRegClass(), llvm::TargetRegisterInfo::getSubClassWithSubReg(), llvm::MachineOperand::getSubReg(), and llvm::MachineOperand::isReg().
Referenced by llvm::MachineRegisterInfo::recomputeRegClass().
| const TargetRegisterClass * MachineInstr::getRegClassConstraintEffectForVReg | ( | unsigned | Reg, |
| const TargetRegisterClass * | CurRC, | ||
| const TargetInstrInfo * | TII, | ||
| const TargetRegisterInfo * | TRI, | ||
| bool | ExploreBundle = false |
||
| ) | const |
Applies the constraints (def/use) implied by this MI on Reg to the given CurRC.
If ExploreBundle is set and MI is part of a bundle, all the instructions inside the bundle will be taken into account. In other words, this method accumulates all the constraints of the operand of this MI and the related bundle if MI is a bundle or inside a bundle.
Returns the register class that satisfies both CurRC and the constraints set by MI. Returns NULL if such a register class does not exist.
Definition at line 1092 of file MachineInstr.cpp.
References llvm::MachineOperandIteratorBase::isValid(), llvm::MachineOperand::Reg, and TII.
Referenced by getNumAllocatableRegsForConstraints().
|
inline |
Returns true if the specified instruction has a delay slot which must be filled by the code generator.
Definition at line 500 of file MachineInstr.h.
References llvm::MCID::DelaySlot, and hasProperty().
Referenced by hasUnoccupiedSlot().
|
inline |
Returns true if this instruction def operands have special register allocation requirements that are not captured by the operand register classes.
e.g. ARM::LDRD's two def registers must be an even / odd pair, ARM::LDM registers have to be in ascending order. Post-register allocation passes should not attempt to change allocations for definitions of instructions with this flag.
Definition at line 686 of file MachineInstr.h.
References llvm::MCID::ExtraDefRegAllocReq, and hasProperty().
Referenced by llvm::CriticalAntiDepBreaker::BreakAntiDependencies().
|
inline |
Returns true if this instruction source operands have special register allocation requirements that are not captured by the operand register classes.
e.g. ARM::STRD's two source registers must be an even / odd pair, ARM::STM registers have to be in ascending order. Post-register allocation passes should not attempt to change allocations for sources of instructions with this flag.
Definition at line 676 of file MachineInstr.h.
References llvm::MCID::ExtraSrcRegAllocReq, and hasProperty().
|
inline |
Return true if this instruction has exactly one MachineMemOperand.
Definition at line 352 of file MachineInstr.h.
Referenced by EmitPCMPSTRI(), EmitPCMPSTRM(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::ARMBaseInstrInfo::getNumMicroOps(), llvm::ARMBaseInstrInfo::getOperandLatency(), getUnderlyingObjectsForInstr(), isMemoryOp(), MIsNeedChainEdge(), llvm::X86InstrInfo::optimizeCompareInstr(), and llvm::X86InstrInfo::unfoldMemoryOperand().
|
inline |
Set if this instruction has an optional definition, e.g.
ARM instructions which can set condition code if 's' bit is set.
Definition at line 389 of file MachineInstr.h.
References llvm::MCID::HasOptionalDef, and hasProperty().
Referenced by llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), and llvm::ARMBaseInstrInfo::optimizeSelect().
| bool MachineInstr::hasOrderedMemoryRef | ( | ) | const |
Return true if this instruction may have an ordered or volatile memory reference, or if the information describing the memory reference is not available.
hasOrderedMemoryRef - Return true if this instruction may have an ordered or volatile memory reference, or if the information describing the memory reference is not available.
Return false if it is known to have no ordered or volatile memory references.
Return false if it is known to have no ordered memory references.
Definition at line 1410 of file MachineInstr.cpp.
References I.
Referenced by llvm::AArch64InstrInfo::areMemAccessesTriviallyDisjoint(), llvm::SIInstrInfo::areMemAccessesTriviallyDisjoint(), and isGlobalMemoryObject().
|
inline |
Return true if this instruction requires adjustment after instruction selection by calling a target hook.
For example, this can be used to fill in ARM 's' optional operand depending on whether the conditional flag register is used.
Definition at line 645 of file MachineInstr.h.
References llvm::MCID::HasPostISelHook, and hasProperty().
Referenced by llvm::TargetLowering::AdjustInstrPostInstrSelection().
|
inline |
Return true if the instruction (or in the case of a bundle, the instructions inside the bundle) has the specified property.
The first argument is the property being queried. The second argument indicates whether the query should look inside instruction bundles.
Definition at line 370 of file MachineInstr.h.
References getDesc(), llvm::MCInstrDesc::getFlags(), IgnoreBundle, isBundled(), and isBundledWithPred().
Referenced by canFoldAsLoad(), hasDelaySlot(), hasExtraDefRegAllocReq(), hasExtraSrcRegAllocReq(), hasOptionalDef(), hasPostISelHook(), isAsCheapAsAMove(), isBarrier(), isBitcast(), isBranch(), isCall(), isCommutable(), isCompare(), isConvergent(), isConvertibleTo3Addr(), isExtractSubregLike(), isIndirectBranch(), isInsertSubregLike(), isMoveImmediate(), isNotDuplicable(), isPredicable(), isPseudo(), isRegSequenceLike(), isRematerializable(), isReturn(), isSelect(), isTerminator(), isVariadic(), mayLoad(), mayStore(), and usesCustomInsertionHook().
| bool MachineInstr::hasUnmodeledSideEffects | ( | ) | const |
Return true if this instruction has side effects that are not modeled by mayLoad / mayStore, etc.
For all instructions, the property is encoded in MCInstrDesc::Flags (see MCInstrDesc::hasUnmodeledSideEffects(). The only exception is INLINEASM instruction, in which case the side effect property is encoded in one of its operands (see InlineAsm::Extra_HasSideEffect).
Definition at line 1492 of file MachineInstr.cpp.
References llvm::InlineAsm::Extra_HasSideEffects, llvm::InlineAsm::MIOp_ExtraInfo, and llvm::MCID::UnmodeledSideEffects.
Referenced by llvm::AArch64InstrInfo::areMemAccessesTriviallyDisjoint(), llvm::SIInstrInfo::areMemAccessesTriviallyDisjoint(), CanMovePastDMB(), isGlobalMemoryObject(), isUnsafeMemoryObject(), and isUnsafeToMoveAcross().
|
inline |
Definition at line 309 of file MachineInstr.h.
References explicit_operands(), and operands_end().
|
inline |
Definition at line 313 of file MachineInstr.h.
References explicit_operands(), and operands_end().
|
inline |
Returns true if this instruction has the same cost (or less) than a move instruction.
This is useful during certain types of optimizations (e.g., remat during two-address conversion or machine licm) where we would like to remat or hoist the instruction, but not if it costs more than moving the instruction into the appropriate register. Note, we are not marking copies from and to the same register class with this flag.
Definition at line 665 of file MachineInstr.h.
References llvm::MCID::CheapAsAMove, and hasProperty().
Referenced by llvm::AArch64InstrInfo::isAsCheapAsAMove(), and llvm::TargetInstrInfo::isAsCheapAsAMove().
|
inline |
Returns true if the specified instruction stops control flow from executing the instruction immediately following it.
Examples include unconditional branches and return instructions.
Definition at line 410 of file MachineInstr.h.
References llvm::MCID::Barrier, and hasProperty().
Referenced by llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::MachineBasicBlock::canFallThrough(), llvm::ARMHazardRecognizer::getHazardType(), isConditionalBranch(), isUnconditionalBranch(), llvm::MSP430InstrInfo::isUnpredicatedTerminator(), llvm::PPCInstrInfo::isUnpredicatedTerminator(), llvm::X86InstrInfo::isUnpredicatedTerminator(), llvm::TargetInstrInfo::isUnpredicatedTerminator(), and ProfitableToMerge().
|
inline |
Return true if this instruction is a bitcast instruction.
Definition at line 475 of file MachineInstr.h.
References llvm::MCID::Bitcast, and hasProperty().
|
inline |
Returns true if this is a conditional, unconditional, or indirect branch.
Predicates below can be used to discriminate between these cases, and the TargetInstrInfo::AnalyzeBranch method can be used to get more information.
Definition at line 427 of file MachineInstr.h.
References llvm::MCID::Branch, and hasProperty().
Referenced by llvm::PPCInstrInfo::getOperandLatency(), llvm::ARMBaseInstrInfo::getOperandLatency(), isConditionalBranch(), isUnconditionalBranch(), llvm::MSP430InstrInfo::isUnpredicatedTerminator(), llvm::PPCInstrInfo::isUnpredicatedTerminator(), llvm::X86InstrInfo::isUnpredicatedTerminator(), llvm::TargetInstrInfo::isUnpredicatedTerminator(), and llvm::X86InstrInfo::optimizeCompareInstr().
|
inline |
Definition at line 775 of file MachineInstr.h.
References llvm::TargetOpcode::BUNDLE, and getOpcode().
Referenced by llvm::HexagonInstrInfo::AnalyzeBranch(), llvm::TargetSchedModel::computeInstrLatency(), llvm::HexagonAsmPrinter::EmitInstruction(), llvm::AMDGPUAsmPrinter::EmitInstruction(), llvm::TargetInstrInfo::findCommutedOpIndices(), llvm::ARMBaseInstrInfo::getOperandLatency(), INITIALIZE_PASS(), llvm::ARMBaseInstrInfo::isPredicated(), and llvm::TargetInstrInfo::PredicateInstruction().
|
inline |
Return true if this instruction part of a bundle.
This is true if either itself or its following instruction is marked "InsideBundle".
Definition at line 211 of file MachineInstr.h.
References isBundledWithPred(), and isBundledWithSucc().
Referenced by llvm::LiveIntervals::handleMove(), and hasProperty().
|
inline |
Return true if this instruction is part of a bundle, and it is not the first instruction in the bundle.
Definition at line 217 of file MachineInstr.h.
References BundledPred, and getFlag().
Referenced by hasProperty(), llvm::MachineBasicBlock::insert(), llvm::MachineBasicBlock::insertAfter(), isBundled(), and unbundleSingleMI().
|
inline |
Return true if this instruction is part of a bundle, and it is not the last instruction in the bundle.
Definition at line 221 of file MachineInstr.h.
References BundledSucc, and getFlag().
Referenced by hasUnoccupiedSlot(), llvm::MachineBasicBlock::insert(), llvm::MachineBasicBlock::insertAfter(), isBundled(), and unbundleSingleMI().
|
inline |
Definition at line 403 of file MachineInstr.h.
References llvm::MCID::Call, and hasProperty().
Referenced by llvm::ScheduleDAGInstrs::addSchedBarrierDeps(), llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), callClobbersAnyYmmReg(), llvm::EHStreamer::callToNoUnwindFunction(), CanMovePastDMB(), llvm::X86AsmPrinter::EmitInstruction(), llvm::X86InstrInfo::getSPAdjust(), hasYmmReg(), llvm::ScheduleDAGInstrs::initSUnits(), isGlobalMemoryObject(), isNoReturnDef(), and llvm::ARMBaseInstrInfo::isSchedulingBoundary().
|
inline |
Definition at line 741 of file MachineInstr.h.
References llvm::TargetOpcode::CFI_INSTRUCTION, and getOpcode().
Referenced by isPosition().
|
inline |
Return true if this may be a 2- or 3-address instruction (of the form "X = op Y, Z, ..."), which produces the same result if Y and Z are exchanged.
If this flag is set, then the TargetInstrInfo::commuteInstruction method may be used to hack on the instruction.
Note that this flag may be set on instructions that are only commutable sometimes. In these cases, the call to commuteInstruction will fail. Also note that some instructions require non-trivial modification to commute them.
Definition at line 607 of file MachineInstr.h.
References llvm::MCID::Commutable, and hasProperty().
Referenced by llvm::TargetInstrInfo::commuteInstruction(), foldImmediates(), llvm::ScheduleDAGInstrs::initSUnits(), and llvm::SIInstrInfo::legalizeOperands().
|
inline |
Return true if this instruction is a comparison.
Definition at line 464 of file MachineInstr.h.
References llvm::MCID::Compare, and hasProperty().
Referenced by llvm::SystemZInstrInfo::analyzeCompare(), lowerRIHigh(), and lowerRILow().
|
inline |
Return true if this is a branch which may fall through to the next instruction or may transfer control flow to some other block.
The TargetInstrInfo::AnalyzeBranch method can be used to get more information about this branch.
Definition at line 441 of file MachineInstr.h.
References isBarrier(), isBranch(), and isIndirectBranch().
| unsigned MachineInstr::isConstantValuePHI | ( | ) | const |
If the specified instruction is a PHI that always merges together the same virtual register, return the register, otherwise return 0.
isConstantValuePHI - If the specified instruction is a PHI that always merges together the same virtual register, return the register, otherwise return 0.
Definition at line 1479 of file MachineInstr.cpp.
References llvm::MachineOperand::getReg(), and llvm::MachineOperand::Reg.
Referenced by llvm::MachineSSAUpdater::GetValueInMiddleOfBlock().
|
inline |
Return true if this instruction is convergent.
Convergent instructions can only be moved to locations that are control-equivalent to their initial position.
Definition at line 494 of file MachineInstr.h.
References llvm::MCID::Convergent, and hasProperty().
|
inline |
Return true if this is a 2-address instruction which can be changed into a 3-address instruction if needed.
Doing this transformation can be profitable in the register allocator, because it means that the instruction can use a 2-address form if possible, but degrade into a less efficient form if the source and dest register cannot be assigned to the same register. For example, this allows the x86 backend to turn a "shl reg, 3" instruction into an LEA instruction, which is the same speed as the shift but has bigger code size.
If this returns true, then the target must implement the TargetInstrInfo::convertToThreeAddress method for this instruction, which is allowed to fail if the transformation isn't valid for this specific instruction (e.g. shl reg, 4 on x86).
Definition at line 625 of file MachineInstr.h.
References llvm::MCID::ConvertibleTo3Addr, and hasProperty().
|
inline |
Definition at line 778 of file MachineInstr.h.
References llvm::TargetOpcode::COPY, and getOpcode().
Referenced by biasPhysRegCopy(), llvm::VirtRegAuxInfo::calculateSpillWeightAndHint(), canFoldCopy(), llvm::TargetInstrInfo::canFoldMemoryOperand(), llvm::HexagonEvaluator::evaluate(), llvm::AArch64InstrInfo::foldMemoryOperandImpl(), llvm::X86InstrInfo::foldMemoryOperandImpl(), INITIALIZE_PASS(), isCopyLike(), isCopyToReg(), isFullCopy(), isIdentityCopy(), isLocalCopy(), MIIsInTerminatorSequence(), llvm::GenericScheduler::reschedulePhysRegCopies(), and llvm::SelectionDAGISel::runOnMachineFunction().
|
inline |
Return true if the instruction behaves like a copy.
This does not include native copy instructions.
Definition at line 790 of file MachineInstr.h.
References isCopy(), and isSubregToReg().
Referenced by llvm::ARMBaseInstrInfo::getOperandLatency(), isTerminalReg(), and llvm::SplitAnalysis::shouldSplitSingleBlock().
|
inline |
Definition at line 748 of file MachineInstr.h.
References llvm::TargetOpcode::DBG_VALUE, and getOpcode().
Referenced by llvm::MachineInstrBuilder::addMetadata(), llvm::WinCodeViewLineTables::beginInstruction(), llvm::DwarfDebug::beginInstruction(), llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), llvm::AggressiveAntiDepBreaker::BreakAntiDependencies(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), llvm::VirtRegAuxInfo::calculateSpillWeightAndHint(), llvm::ConnectedVNInfoEqClasses::Distribute(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::AArch64RegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::ARMHazardRecognizer::EmitInstruction(), llvm::PPCHazardRecognizer970::EmitInstruction(), llvm::MipsAsmPrinter::EmitInstruction(), llvm::DwarfDebug::endInstruction(), findUseBetween(), llvm::ScheduleDAGInstrs::fixupKills(), getDataDeps(), getDebugExpression(), getDebugVariable(), llvm::ARMHazardRecognizer::getHazardType(), llvm::PPCHazardRecognizer970::getHazardType(), llvm::HexagonInstrInfo::getSize(), llvm::ScheduleDAGInstrs::initSUnits(), llvm::SlotIndexes::insertMachineInstrInMaps(), isDefLiveOut(), isDescribedByReg(), isIndirectDebugValue(), llvm::HexagonInstrInfo::isSchedulingBoundary(), llvm::ARMBaseInstrInfo::isSchedulingBoundary(), isUnsafeToMoveAcross(), llvm::MachineRegisterInfo::markUsesInDebugValueAsUndef(), MIIsInTerminatorSequence(), llvm::CriticalAntiDepBreaker::Observe(), llvm::SlotIndexes::repairIndexesInRange(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::SlotIndexes::runOnMachineFunction(), llvm::LiveIntervals::shrinkToUses(), llvm::DbgValueHistoryMap::startInstrRange(), llvm::RegScavenger::unprocess(), and llvm::AntiDepBreaker::UpdateDbgValue().
|
inline |
Definition at line 736 of file MachineInstr.h.
References llvm::TargetOpcode::EH_LABEL, and getOpcode().
Referenced by isLabel().
|
inline |
Definition at line 784 of file MachineInstr.h.
References llvm::TargetOpcode::EXTRACT_SUBREG, and getOpcode().
Referenced by llvm::TargetInstrInfo::getExtractSubregInputs().
|
inline |
Return true if this instruction behaves the same way as the generic EXTRACT_SUBREG instructions.
E.g., on ARM, rX, rY VMOVRRD dZ is equivalent to two EXTRACT_SUBREG: rX = EXTRACT_SUBREG dZ, ssub_0 rY = EXTRACT_SUBREG dZ, ssub_1
Note that for the optimizers to be able to take advantage of this property, TargetInstrInfo::getExtractSubregLikeInputs has to be override accordingly.
Definition at line 541 of file MachineInstr.h.
References llvm::MCID::ExtractSubreg, and hasProperty().
Referenced by llvm::TargetInstrInfo::getExtractSubregInputs(), and llvm::ARMBaseInstrInfo::getExtractSubregLikeInputs().
|
inline |
Definition at line 781 of file MachineInstr.h.
References getOperand(), llvm::MachineOperand::getSubReg(), and isCopy().
Referenced by isFullCopyOf(), and removeCopies().
|
inline |
Definition at line 737 of file MachineInstr.h.
References llvm::TargetOpcode::GC_LABEL, and getOpcode().
Referenced by isLabel().
| bool MachineInstr::isIdenticalTo | ( | const MachineInstr * | Other, |
| MICheckType | Check = CheckDefs |
||
| ) | const |
Return true if this instruction is identical to (same opcode and same operands as) the specified instruction.
Definition at line 858 of file MachineInstr.cpp.
References getDebugLoc(), getNumOperands(), getOpcode(), getOperand(), getParent(), llvm::MachineOperand::getParent(), llvm::MachineOperand::getReg(), llvm::MachineBasicBlock::instr_end(), llvm::HexagonMCInstrInfo::isBundle(), llvm::MachineOperand::isDead(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isIdenticalTo(), llvm::MachineOperand::isKill(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), and Other.
Referenced by llvm::MachineInstrExpressionTrait::isEqual(), llvm::ARMBaseInstrInfo::produceSameValue(), and llvm::TargetInstrInfo::produceSameValue().
|
inline |
Return true is the instruction is an identity copy.
Definition at line 795 of file MachineInstr.h.
References getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), and isCopy().
Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint().
|
inline |
Definition at line 759 of file MachineInstr.h.
References getOpcode(), and llvm::TargetOpcode::IMPLICIT_DEF.
Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint(), llvm::ARMBaseInstrInfo::getOperandLatency(), and MIIsInTerminatorSequence().
|
inline |
Return true if this is an indirect branch, such as a branch through a register.
Definition at line 433 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::IndirectBranch.
Referenced by llvm::MipsInstrInfo::AnalyzeBranch(), isConditionalBranch(), and isUnconditionalBranch().
|
inline |
A DBG_VALUE is indirect iff the first operand is a register and the second operand is an immediate.
Definition at line 751 of file MachineInstr.h.
References getOperand(), isDebugValue(), llvm::MachineOperand::isImm(), and llvm::MachineOperand::isReg().
Referenced by llvm::SelectionDAGISel::runOnMachineFunction().
|
inline |
Definition at line 760 of file MachineInstr.h.
References getOpcode(), and llvm::TargetOpcode::INLINEASM.
Referenced by llvm::RegAllocBase::allocatePhysRegs(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), getOffsetONFromFION(), llvm::HexagonInstrInfo::isSchedulingBoundary(), isUnsafeToMoveAcross(), mayLoad(), and mayStore().
|
inline |
Definition at line 766 of file MachineInstr.h.
References getOpcode(), and llvm::TargetOpcode::INSERT_SUBREG.
Referenced by AvoidsSinking(), llvm::TargetInstrInfo::getInsertSubregInputs(), llvm::ARMBaseInstrInfo::getOperandLatency(), and isCopyToReg().
|
inline |
Return true if this instruction behaves the same way as the generic INSERT_SUBREG instructions.
E.g., on ARM, dX = VSETLNi32 dY, rZ, Imm is equivalent to a INSERT_SUBREG: dX = INSERT_SUBREG dY, rZ, translateImmToSubIdx(Imm)
Note that for the optimizers to be able to take advantage of this property, TargetInstrInfo::getInsertSubregLikeInputs has to be override accordingly.
Definition at line 555 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::InsertSubreg.
Referenced by llvm::TargetInstrInfo::getInsertSubregInputs(), and llvm::ARMBaseInstrInfo::getInsertSubregLikeInputs().
|
inline |
Return true if MI is in a bundle (but not the first MI in a bundle).
In this case, the first MI starts a bundle but is not inside a bundle, the next 2 MIs are considered "inside" the bundle.
The first instruction has the special opcode "BUNDLE". It's not "inside" a bundle, but the next three MIs are.
Definition at line 205 of file MachineInstr.h.
References BundledPred, and getFlag().
Referenced by llvm::BuildMI(), and llvm::SlotIndexes::insertMachineInstrInMaps().
| bool MachineInstr::isInvariantLoad | ( | AliasAnalysis * | AA | ) | const |
Return true if this instruction is loading from a location whose value is invariant across the function.
isInvariantLoad - Return true if this instruction is loading from a location whose value is invariant across the function.
For example, loading a value from the constant pool or from the argument area of a function if it does not change. This should only return true of all loads the instruction does are invariant (if it does multiple loads).
Definition at line 1436 of file MachineInstr.cpp.
References getParent(), llvm::MachineOperand::getParent(), I, and llvm::AliasAnalysis::pointsToConstantMemory().
Referenced by llvm::ScheduleDAGInstrs::buildSchedGraph(), isGlobalMemoryObject(), and llvm::X86InstrInfo::isReallyTriviallyReMaterializable().
|
inline |
Definition at line 758 of file MachineInstr.h.
References getOpcode(), and llvm::TargetOpcode::KILL.
Referenced by llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), llvm::AggressiveAntiDepBreaker::BreakAntiDependencies(), findRegisterUseOperand(), and llvm::CriticalAntiDepBreaker::Observe().
|
inline |
Returns true if the MachineInstr represents a label.
Definition at line 740 of file MachineInstr.h.
References isEHLabel(), and isGCLabel().
Referenced by isPosition().
|
inline |
Return true if this instruction is a move immediate (including conditional moves) instruction.
Definition at line 470 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::MoveImm.
Referenced by foldImmediates().
|
inline |
Definition at line 761 of file MachineInstr.h.
References getInlineAsmDialect(), getOpcode(), and llvm::TargetOpcode::INLINEASM.
|
inline |
Return true if this instruction cannot be safely duplicated.
For example, if the instruction has a unique labels attached to it, duplicating it would cause multiple definition errors.
Definition at line 487 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::NotDuplicable.
Referenced by llvm::TargetInstrInfo::duplicate().
|
inline |
Definition at line 757 of file MachineInstr.h.
References getOpcode(), and llvm::TargetOpcode::PHI.
Referenced by getPHIDeps(), llvm::SSAUpdaterTraits< MachineSSAUpdater >::InstrIsPHI(), ProcessSourceNode(), llvm::MachineSSAUpdater::RewriteUse(), and llvm::MachineBasicBlock::transferSuccessorsAndUpdatePHIs().
|
inline |
Definition at line 746 of file MachineInstr.h.
References isCFIInstruction(), and isLabel().
Referenced by llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::HexagonInstrInfo::getSize(), llvm::HexagonInstrInfo::isSchedulingBoundary(), llvm::ARMBaseInstrInfo::isSchedulingBoundary(), and llvm::TargetInstrInfo::isSchedulingBoundary().
|
inline |
Return true if this instruction has a predicate operand that controls execution.
It may be set to 'always', or may be set to other values. There are various methods in TargetInstrInfo that can be used to control and modify the predicate in this instruction.
Definition at line 457 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::Predicable.
Referenced by canFoldIntoMOVCC(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseInstrInfo::isPredicable(), llvm::MSP430InstrInfo::isUnpredicatedTerminator(), llvm::X86InstrInfo::isUnpredicatedTerminator(), llvm::TargetInstrInfo::isUnpredicatedTerminator(), and llvm::TargetInstrInfo::PredicateInstruction().
|
inline |
Return true if this is a pseudo instruction that doesn't correspond to a real machine instruction.
Definition at line 395 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::Pseudo.
|
inline |
Definition at line 772 of file MachineInstr.h.
References getOpcode(), and llvm::TargetOpcode::REG_SEQUENCE.
Referenced by AvoidsSinking(), llvm::ARMBaseInstrInfo::getOperandLatency(), and llvm::TargetInstrInfo::getRegSequenceInputs().
|
inline |
Return true if this instruction behaves the same way as the generic REG_SEQUENCE instructions.
E.g., on ARM, dX VMOVDRR rY, rZ is equivalent to dX = REG_SEQUENCE rY, ssub_0, rZ, ssub_1.
Note that for the optimizers to be able to take advantage of this property, TargetInstrInfo::getRegSequenceLikeInputs has to be override accordingly.
Definition at line 526 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::RegSequence.
Referenced by llvm::TargetInstrInfo::getRegSequenceInputs(), and llvm::ARMBaseInstrInfo::getRegSequenceLikeInputs().
|
inline |
Return true if the use operand of the specified index is tied to a def operand.
It also returns the def operand index by reference if DefOpIdx is not null.
Definition at line 1008 of file MachineInstr.h.
References findTiedOperandIdx(), getOperand(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isTied(), and llvm::MachineOperand::isUse().
Referenced by llvm::MachineOperandIteratorBase::analyzeVirtReg(), and isTwoAddrUse().
|
inline |
Given the index of a register def operand, check if the register def is tied to a source operand, due to either two-address elimination or inline assembly constraints.
Returns the first tied use operand index by reference if UseOpIdx is not null.
Definition at line 995 of file MachineInstr.h.
References findTiedOperandIdx(), getOperand(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isTied().
Referenced by llvm::ScheduleDAGInstrs::fixupKills().
|
inline |
Returns true if this instruction is a candidate for remat.
This flag is deprecated, please don't use it anymore. If this flag is set, the isReallyTriviallyReMaterializable() method is called to verify the instruction is really rematable.
Definition at line 653 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::Rematerializable.
|
inline |
Definition at line 399 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::Return.
Referenced by CanMovePastDMB(), HandleVRSaveUpdate(), llvm::CriticalAntiDepBreaker::StartBlock(), and llvm::AggressiveAntiDepBreaker::StartBlock().
| bool MachineInstr::isSafeToMove | ( | AliasAnalysis * | AA, |
| bool & | SawStore | ||
| ) | const |
Return true if it is safe to move this instruction.
isSafeToMove - Return true if it is safe to move this instruction.
If SawStore is set to true, it means that there is a store (or call) between the instruction's location and its intended destination.
Definition at line 1377 of file MachineInstr.cpp.
References SawStore.
Referenced by canFoldIntoMOVCC(), MaySpeculate(), and llvm::X86InstrInfo::optimizeLoadInstr().
|
inline |
Return true if this instruction is a select instruction.
Definition at line 480 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::Select.
| bool MachineInstr::isStackAligningInlineAsm | ( | ) | const |
Definition at line 1012 of file MachineInstr.cpp.
References llvm::InlineAsm::Extra_IsAlignStack, and llvm::InlineAsm::MIOp_ExtraInfo.
|
inline |
Definition at line 769 of file MachineInstr.h.
References getOpcode(), and llvm::TargetOpcode::SUBREG_TO_REG.
Referenced by AvoidsSinking(), isCopyLike(), and isCopyToReg().
|
inline |
Returns true if this instruction part of the terminator for a basic block.
Typically this is things like return and branch instructions.
Various passes use this to insert code into the bottom of a basic block, but before control flow occurs.
Definition at line 419 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::Terminator.
Referenced by llvm::ScheduleDAGInstrs::buildSchedGraph(), findInsertLocation(), llvm::ARMBaseInstrInfo::isSchedulingBoundary(), llvm::TargetInstrInfo::isSchedulingBoundary(), llvm::MSP430InstrInfo::isUnpredicatedTerminator(), llvm::PPCInstrInfo::isUnpredicatedTerminator(), llvm::X86InstrInfo::isUnpredicatedTerminator(), and llvm::TargetInstrInfo::isUnpredicatedTerminator().
|
inline |
Return true if this is a transient instruction that is either very likely to be eliminated during register allocation (such as copy-like instructions), or if this instruction doesn't have an execution-time cost.
Definition at line 804 of file MachineInstr.h.
References llvm::TargetOpcode::CFI_INSTRUCTION, llvm::TargetOpcode::COPY, llvm::TargetOpcode::DBG_VALUE, llvm::TargetOpcode::EH_LABEL, llvm::TargetOpcode::GC_LABEL, getOpcode(), llvm::TargetOpcode::IMPLICIT_DEF, llvm::TargetOpcode::INSERT_SUBREG, llvm::TargetOpcode::KILL, llvm::TargetOpcode::PHI, llvm::TargetOpcode::REG_SEQUENCE, and llvm::TargetOpcode::SUBREG_TO_REG.
Referenced by llvm::TargetSchedModel::computeOperandLatency(), llvm::TargetInstrInfo::defaultDefLatency(), llvm::TargetSchedModel::getNumMicroOps(), updatePhysDepsUpwards(), llvm::SchedDFSImpl::visitPostorderNode(), and llvm::SchedDFSImpl::visitPreorder().
|
inline |
Return true if this is a branch which always transfers control flow to some other block.
The TargetInstrInfo::AnalyzeBranch method can be used to get more information about this branch.
Definition at line 449 of file MachineInstr.h.
References isBarrier(), isBranch(), and isIndirectBranch().
|
inline |
Return true if this instruction can have a variable number of operands.
In this case, the variable operands will be after the normal operands but before the implicit definitions and uses (if any are present).
Definition at line 383 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::Variadic.
Referenced by llvm::SIInstrInfo::getOpRegClass().
|
inline |
Return true if the MachineInstr kills the specified register.
If TargetRegisterInfo is passed, then it also checks if there is a kill of a super-register.
Definition at line 857 of file MachineInstr.h.
References findRegisterUseOperandIdx().
Referenced by llvm::X86InstrInfo::classifyLEAReg(), isPlainlyKilled(), and llvm::X86InstrInfo::optimizeCompareInstr().
|
inline |
Return true if this instruction could possibly read memory.
Instructions with this flag set are not necessarily simple load instructions, they may load a value and modify it, for example.
Definition at line 566 of file MachineInstr.h.
References llvm::InlineAsm::Extra_MayLoad, llvm::MachineOperand::getImm(), getOperand(), hasProperty(), isInlineAsm(), llvm::MCID::MayLoad, and llvm::InlineAsm::MIOp_ExtraInfo.
Referenced by llvm::SIInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::TargetInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::ScheduleDAGInstrs::buildSchedGraph(), CanMovePastDMB(), llvm::TargetInstrInfo::defaultDefLatency(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::TargetLoweringBase::emitPatchPoint(), llvm::HexagonEvaluator::evaluate(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::TargetInstrInfo::getInstrLatency(), llvm::SIInstrInfo::getMemOpBaseRegImmOfs(), isGlobalMemoryObject(), isLoadFromGOTOrConstantPool(), llvm::ARMBaseInstrInfo::isLoadFromStackSlotPostFE(), mayLoadOrStore(), MIsNeedChainEdge(), llvm::AArch64RegisterInfo::needsFrameBaseReg(), and llvm::X86InstrInfo::optimizeLoadInstr().
|
inline |
Return true if this instruction could possibly read or modify memory.
Definition at line 589 of file MachineInstr.h.
References mayLoad(), and mayStore().
Referenced by llvm::AArch64InstrInfo::areMemAccessesTriviallyDisjoint(), llvm::ARMHazardRecognizer::getHazardType(), isFirstInstructionInSequence(), and mayAlias().
|
inline |
Return true if this instruction could possibly modify memory.
Instructions with this flag set are not necessarily simple store instructions, they may store a modified value based on their operands, or may not actually modify anything, for example.
Definition at line 579 of file MachineInstr.h.
References llvm::InlineAsm::Extra_MayStore, llvm::MachineOperand::getImm(), getOperand(), hasProperty(), isInlineAsm(), llvm::MCID::MayStore, and llvm::InlineAsm::MIOp_ExtraInfo.
Referenced by llvm::SIInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::TargetInstrInfo::areMemAccessesTriviallyDisjoint(), llvm::ScheduleDAGInstrs::buildSchedGraph(), CanMovePastDMB(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::SIInstrInfo::getMemOpBaseRegImmOfs(), hasRAWHazard(), llvm::ARMBaseInstrInfo::isStoreToStackSlotPostFE(), mayAlias(), mayLoadOrStore(), MIsNeedChainEdge(), and llvm::AArch64RegisterInfo::needsFrameBaseReg().
|
inline |
Definition at line 344 of file MachineInstr.h.
References memoperands_begin(), and memoperands_end().
Referenced by llvm::AArch64InstrInfo::isLdStPairSuppressed().
|
inline |
Definition at line 347 of file MachineInstr.h.
References memoperands_begin(), and memoperands_end().
|
inline |
Access to memory operands of the instruction.
Definition at line 340 of file MachineInstr.h.
Referenced by concatenateMemOperands(), emitComments(), llvm::PPCTargetLowering::emitEHSjLjLongJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::PPCHazardRecognizer970::EmitInstruction(), llvm::TargetLoweringBase::emitPatchPoint(), EmitPCMPSTRI(), EmitPCMPSTRM(), expandLoadStackGuard(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::SystemZInstrInfo::foldMemoryOperandImpl(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::PPCHazardRecognizer970::getHazardType(), llvm::ARMBaseInstrInfo::getNumLDMAddresses(), llvm::ARMBaseInstrInfo::getNumMicroOps(), llvm::ARMBaseInstrInfo::getOperandLatency(), getUnderlyingObjectsForInstr(), hasIdenticalMMOs(), llvm::TargetInstrInfo::hasLoadFromStackSlot(), llvm::TargetInstrInfo::hasStoreToStackSlot(), InsertFPConstInst(), InsertFPImmInst(), InsertSPConstInst(), InsertSPImmInst(), InstructionStoresToFI(), isLoadFromGOTOrConstantPool(), isMemoryOp(), isUnsafeMemoryObject(), memoperands(), MIsNeedChainEdge(), llvm::ARMBaseInstrInfo::reMaterialize(), llvm::AArch64InstrInfo::suppressLdStPair(), and llvm::X86InstrInfo::unfoldMemoryOperand().
|
inline |
Definition at line 342 of file MachineInstr.h.
Referenced by concatenateMemOperands(), llvm::PPCHazardRecognizer970::getHazardType(), isUnsafeMemoryObject(), and llvm::AArch64InstrInfo::suppressLdStPair().
|
inline |
Definition at line 341 of file MachineInstr.h.
Referenced by concatenateMemOperands(), llvm::PPCTargetLowering::emitEHSjLjLongJmp(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::TargetLoweringBase::emitPatchPoint(), EmitPCMPSTRI(), EmitPCMPSTRM(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::ARMBaseInstrInfo::getNumLDMAddresses(), hasIdenticalMMOs(), llvm::TargetInstrInfo::hasLoadFromStackSlot(), llvm::TargetInstrInfo::hasStoreToStackSlot(), InstructionStoresToFI(), isLoadFromGOTOrConstantPool(), memoperands(), llvm::ARMBaseInstrInfo::reMaterialize(), and llvm::X86InstrInfo::unfoldMemoryOperand().
|
inline |
Return true if the MachineInstr modifies (fully define or partially define) the specified register.
NOTE: It's ignoring subreg indices on virtual registers.
Definition at line 874 of file MachineInstr.h.
References findRegisterDefOperandIdx().
Referenced by DoesModifyCalleeSavedReg(), llvm::TargetInstrInfo::isSchedulingBoundary(), isUnsafeToMoveAcross(), modifiesConditionCode(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), and removeIPMBasedCompare().
|
inline |
Definition at line 295 of file MachineInstr.h.
References operands_begin(), and operands_end().
Referenced by llvm::LiveIntervals::addKillFlags(), applyToClobberedRegisters(), ClearKillFlags(), definesCPSR(), definesFullReg(), eraseFromParentAndMarkDBGValuesForRemoval(), getCalledFunction(), llvm::MachineInstrExpressionTrait::getHashValue(), isCPSRDefined(), llvm::LiveIntervals::HMEditor::updateAllRanges(), UpdateCPSRDef(), and UpdateCPSRUse().
|
inline |
Definition at line 298 of file MachineInstr.h.
References operands_begin(), and operands_end().
|
inline |
Definition at line 289 of file MachineInstr.h.
References Operands.
Referenced by defs(), explicit_operands(), llvm::X86InstrInfo::foldMemoryOperandImpl(), getDataDeps(), getOperandNo(), getPredicatedRegister(), llvm::HexagonInstrInfo::isExtended(), MIIsInTerminatorSequence(), operands(), llvm::R600InstrInfo::readsLDSSrcReg(), llvm::StackMaps::recordPatchPoint(), llvm::StackMaps::recordStackMap(), llvm::StackMaps::recordStatepoint(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::R600SchedStrategy::schedNode(), llvm::MachineBasicBlock::SplitCriticalEdge(), updatePhysDepsDownwards(), updatePhysDepsUpwards(), and uses().
|
inline |
Definition at line 292 of file MachineInstr.h.
References Operands.
|
inline |
Definition at line 290 of file MachineInstr.h.
References Operands.
Referenced by getDataDeps(), getPredicatedRegister(), implicit_operands(), llvm::HexagonInstrInfo::isExtended(), MIIsInTerminatorSequence(), operands(), llvm::R600InstrInfo::readsLDSSrcReg(), llvm::StackMaps::recordPatchPoint(), llvm::StackMaps::recordStackMap(), llvm::StackMaps::recordStatepoint(), llvm::LiveIntervals::repairIntervalsInRange(), llvm::R600SchedStrategy::schedNode(), llvm::MachineBasicBlock::SplitCriticalEdge(), updatePhysDepsDownwards(), updatePhysDepsUpwards(), and uses().
|
inline |
Definition at line 293 of file MachineInstr.h.
References Operands.
| void MachineInstr::print | ( | raw_ostream & | OS, |
| bool | SkipOpers = false |
||
| ) | const |
Definition at line 1534 of file MachineInstr.cpp.
References llvm::Module::getFunction(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getParent(), llvm::GlobalValue::getParent(), llvm::MachineOperand::MBB, and llvm::MachineOperand::print().
Referenced by llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::ScheduleDAGInstrs::getGraphNodeLabel(), llvm::operator<<(), and printReachingDef().
| void MachineInstr::print | ( | raw_ostream & | OS, |
| ModuleSlotTracker & | MST, | ||
| bool | SkipOpers = false |
||
| ) | const |
Definition at line 1544 of file MachineInstr.cpp.
References llvm::InlineAsm::AD_ATT, llvm::InlineAsm::AD_Intel, llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::dyn_cast(), llvm::SmallVectorBase::empty(), llvm::SmallVectorImpl< T >::erase(), llvm::InlineAsm::Extra_HasSideEffects, llvm::InlineAsm::Extra_IsAlignStack, llvm::InlineAsm::Extra_MayLoad, llvm::InlineAsm::Extra_MayStore, llvm::HexagonMCInstrInfo::getDesc(), llvm::MachineOperand::getImm(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::InlineAsm::getKind(), llvm::MachineOperand::getMetadata(), llvm::MCInstrInfo::getName(), llvm::InlineAsm::getNumOperandRegisters(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getParent(), llvm::MachineOperand::getReg(), llvm::MachineRegisterInfo::getRegClass(), llvm::TargetRegisterInfo::getRegClass(), llvm::TargetRegisterInfo::getRegClassName(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::TargetRegisterInfo::getSubRegIndexName(), llvm::MachineFunction::getSubtarget(), llvm::InlineAsm::hasRegClassConstraint(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isImplicit(), llvm::MachineOperand::isMetadata(), llvm::MCOperandInfo::isOptionalDef(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MCOperandInfo::isPredicate(), llvm::MachineOperand::isReg(), llvm::InlineAsm::isUseOperandTiedToDef(), llvm::MCRegAliasIterator::isValid(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::InlineAsm::Kind_Clobber, llvm::InlineAsm::Kind_Imm, llvm::InlineAsm::Kind_Mem, llvm::InlineAsm::Kind_RegDef, llvm::InlineAsm::Kind_RegDefEarlyClobber, llvm::InlineAsm::Kind_RegUse, llvm::MachineOperand::MBB, llvm::InlineAsm::MIOp_AsmString, llvm::InlineAsm::MIOp_ExtraInfo, llvm::InlineAsm::MIOp_FirstOperand, llvm::MCInstrDesc::NumOperands, llvm::MCInstrDesc::OpInfo, llvm::DebugLoc::print(), llvm::MachineOperand::print(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::MachineRegisterInfo::use_empty().
|
inline |
Return true if the MachineInstr reads the specified register.
If TargetRegisterInfo is passed, then it also checks if there is a read of a super-register. This does not count partial redefines of virtual registers as reads: reg1024:6 = OP.
Definition at line 836 of file MachineInstr.h.
References findRegisterUseOperandIdx().
Referenced by checkAndUpdateEFLAGSKill(), llvm::TargetSchedModel::computeOutputLatency(), llvm::ARMBaseInstrInfo::convertToThreeAddress(), getImplicitSPRUseForDPRUse(), llvm::X86InstrInfo::getPartialRegUpdateClearance(), hasRAWHazard(), isUnsafeToMoveAcross(), modifiesConditionCode(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::ARMBaseInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), and llvm::ARMBaseInstrInfo::setExecutionDomain().
Return true if the MachineInstr reads the specified virtual register.
Take into account that a partial define is a read-modify-write operation.
Definition at line 844 of file MachineInstr.h.
References readsWritesVirtualRegister().
Referenced by llvm::ARMBaseInstrInfo::getPartialRegUpdateClearance(), llvm::X86InstrInfo::getPartialRegUpdateClearance(), llvm::SplitEditor::leaveIntvAfter(), and llvm::LiveIntervals::shrinkToUses().
| std::pair< bool, bool > MachineInstr::readsWritesVirtualRegister | ( | unsigned | Reg, |
| SmallVectorImpl< unsigned > * | Ops = nullptr |
||
| ) | const |
Return a pair of bools (reads, writes) indicating if this instruction reads or writes Reg.
readsWritesVirtualRegister - Return a pair of bools (reads, writes) indicating if this instruction reads or writes Reg.
This also considers partial defines. If Ops is not null, all operand indices for Reg are added.
This also considers partial defines.
Definition at line 1176 of file MachineInstr.cpp.
References llvm::MachineOperand::getReg(), llvm::MachineOperand::getSubReg(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isUndef(), llvm::MachineOperand::isUse(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::MachineOperand::Reg.
Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint(), and readsVirtualRegister().
|
inline |
Returns true if the register is dead in this machine instruction.
If TargetRegisterInfo is passed, then it also checks if there is a dead def of a super-register.
Definition at line 881 of file MachineInstr.h.
References findRegisterDefOperandIdx().
Referenced by llvm::ScheduleDAGInstrs::addPhysRegDeps(), and llvm::X86InstrInfo::optimizeCompareInstr().
| MachineInstr * MachineInstr::removeFromBundle | ( | ) |
Unlink this instruction from its basic block and return it without deleting it.
If the instruction is part of a bundle, the other instructions in the bundle remain bundled.
Definition at line 926 of file MachineInstr.cpp.
References llvm::MachineOperand::getParent().
| MachineInstr * MachineInstr::removeFromParent | ( | ) |
Unlink 'this' from the containing basic block, and return it without deleting it.
This function can not be used on bundled instructions, use removeFromBundle() to remove individual instructions from a bundle.
Definition at line 921 of file MachineInstr.cpp.
References llvm::MachineOperand::getParent().
Referenced by llvm::SIInstrInfo::legalizeOperands().
| void MachineInstr::RemoveOperand | ( | unsigned | i | ) |
Erase an operand from an instruction, leaving it with one fewer operand than it started with.
RemoveOperand - Erase an operand from an instruction, leaving it with one fewer operand than it started with.
Definition at line 802 of file MachineInstr.cpp.
References llvm::MachineOperand::isReg(), llvm::MachineOperand::isTied(), moveOperands(), N, Operands, and llvm::MachineRegisterInfo::removeRegOperandFromUseList().
Referenced by llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), eraseGPOpnd(), llvm::SIInstrInfo::FoldImmediate(), INITIALIZE_PASS(), llvm::SIInstrInfo::moveToVALU(), llvm::AArch64InstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::PPCInstrInfo::PredicateInstruction(), removeModOperands(), removeOperands(), llvm::rewriteARMFrameIndex(), llvm::rewriteT2FrameIndex(), llvm::ARMBaseInstrInfo::setExecutionDomain(), and llvm::tryFoldSPUpdateIntoPushPop().
|
inline |
Set a flag for the AsmPrinter.
Definition at line 135 of file MachineInstr.h.
|
inline |
Replace current source information with new such.
Avoid using this, the constructor argument is preferable.
Definition at line 1140 of file MachineInstr.h.
References llvm::DebugLoc::hasTrivialDestructor().
Referenced by expandLoadStackGuard().
|
inline |
Replace the instruction descriptor (thus opcode) of the current instruction with a new one.
Definition at line 1136 of file MachineInstr.h.
Referenced by llvm::SITargetLowering::AdjustInstrPostInstrSelection(), llvm::ARMTargetLowering::AdjustInstrPostInstrSelection(), llvm::SIInstrInfo::commuteInstruction(), llvm::X86InstrInfo::commuteInstruction(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::ThumbRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), Expand2AddrUndef(), expandLoadStackGuard(), llvm::SIInstrInfo::FoldImmediate(), llvm::ARMBaseInstrInfo::FoldImmediate(), llvm::X86InstrInfo::foldMemoryOperandImpl(), INITIALIZE_PASS(), llvm::SIInstrInfo::moveSMRDToVALU(), llvm::SIInstrInfo::moveToVALU(), llvm::AArch64InstrInfo::optimizeCompareInstr(), llvm::PPCInstrInfo::optimizeCompareInstr(), llvm::X86InstrInfo::optimizeCompareInstr(), llvm::HexagonInstrInfo::PredicateInstruction(), llvm::ARMBaseInstrInfo::PredicateInstruction(), llvm::SystemZInstrInfo::PredicateInstruction(), llvm::PPCInstrInfo::PredicateInstruction(), llvm::rewriteAArch64FrameIndex(), llvm::rewriteARMFrameIndex(), llvm::ThumbRegisterInfo::rewriteFrameIndex(), llvm::rewriteT2FrameIndex(), llvm::ARMBaseInstrInfo::setExecutionDomain(), llvm::X86InstrInfo::setExecutionDomain(), tryAddToFoldList(), and llvm::X86InstrInfo::unfoldMemoryOperand().
|
inline |
Set a MI flag.
Definition at line 155 of file MachineInstr.h.
Referenced by llvm::X86FrameLowering::emitPrologue(), llvm::X86FrameLowering::emitSPUpdate(), llvm::MIBundleBuilder::insert(), llvm::MachineBasicBlock::insert(), and llvm::MachineInstrBuilder::setMIFlag().
|
inline |
Definition at line 159 of file MachineInstr.h.
References BundledPred, and BundledSucc.
Referenced by llvm::MachineInstrBuilder::setMIFlags().
|
inline |
Assign this MachineInstr's memory reference descriptor list.
This does not transfer ownership.
Definition at line 1156 of file MachineInstr.h.
Referenced by concatenateMemOperands(), llvm::TargetLoweringBase::emitPatchPoint(), EmitPCMPSTRI(), EmitPCMPSTRM(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::ARMBaseInstrInfo::reMaterialize(), and llvm::MachineInstrBuilder::setMemRefs().
| void MachineInstr::setPhysRegsDeadExcept | ( | ArrayRef< unsigned > | UsedRegs, |
| const TargetRegisterInfo & | TRI | ||
| ) |
Mark every physreg used by this instruction as dead except those in the UsedRegs list.
On instructions with register mask operands, also add implicit-def operands for all registers in UsedRegs.
Definition at line 1931 of file MachineInstr.cpp.
References llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::end(), llvm::MachineOperand::getReg(), I, llvm::MachineOperand::isDef(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MachineOperand::isRegMask(), llvm::TargetRegisterInfo::regsOverlap(), and llvm::MachineOperand::setIsDead().
Referenced by llvm::FastISel::lowerCallTo(), and llvm::FastISel::selectPatchpoint().
| void MachineInstr::substituteRegister | ( | unsigned | FromReg, |
| unsigned | ToReg, | ||
| unsigned | SubIdx, | ||
| const TargetRegisterInfo & | RegInfo | ||
| ) |
Replace all occurrences of FromReg with ToReg:SubIdx, properly composing subreg indices where necessary.
Definition at line 1353 of file MachineInstr.cpp.
References llvm::MachineOperand::getReg(), llvm::MCRegisterInfo::getSubReg(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::MachineOperand::substPhysReg(), and llvm::MachineOperand::substVirtReg().
Referenced by llvm::ARMBaseInstrInfo::reMaterialize(), llvm::TargetInstrInfo::reMaterialize(), and llvm::X86InstrInfo::reMaterialize().
Add a tie between the register operands at DefIdx and UseIdx.
tieOperands - Mark operands at DefIdx and UseIdx as tied to each other.
The tie will cause the register allocator to ensure that the two operands are assigned the same physical register.
Tied operands are managed automatically for explicit operands in the MCInstrDesc. This method is for exceptional cases like inline asm.
Use and def operands can be tied together, indicated by a non-zero TiedTo field. TiedTo can have these values:
0: Operand is not tied to anything. 1 to TiedMax-1: Tied to getOperand(TiedTo-1). TiedMax: Tied to an operand >= TiedMax-1.
The tied def must be one of the first TiedMax operands on a normal instruction. INLINEASM instructions allow more tied defs.
Definition at line 1264 of file MachineInstr.cpp.
References llvm::MachineOperand::isDef(), llvm::MachineOperand::isTied(), llvm::MachineOperand::isUse(), fuzzer::min(), and TiedMax.
Referenced by llvm::ARMBaseInstrInfo::optimizeSelect().
| void MachineInstr::unbundleFromPred | ( | ) |
Break bundle above this instruction.
Definition at line 994 of file MachineInstr.cpp.
Referenced by unbundleSingleMI().
| void MachineInstr::unbundleFromSucc | ( | ) |
Break bundle below this instruction.
Definition at line 1003 of file MachineInstr.cpp.
Referenced by unbundleSingleMI().
|
inline |
Break any tie involving OpIdx.
Definition at line 1169 of file MachineInstr.h.
References findTiedOperandIdx(), getOperand(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::isTied().
Referenced by llvm::SIInstrInfo::FoldImmediate(), and tryAddToFoldList().
|
inline |
Definition at line 325 of file MachineInstr.h.
References getDesc(), llvm::MCInstrDesc::getNumDefs(), operands_begin(), and operands_end().
|
inline |
Definition at line 329 of file MachineInstr.h.
References getDesc(), llvm::MCInstrDesc::getNumDefs(), operands_begin(), and operands_end().
|
inline |
Return true if this instruction requires custom insertion support when the DAG scheduler is inserting it into a machine basic block.
If this is true for the instruction, it basically means that it is a pseudo instruction used at SelectionDAG time that is expanded out into magic code by the target when MachineInstrs are formed.
If this is true, the TargetLoweringInfo::InsertAtEndOfBasicBlock method is used to insert this into the MachineBasicBlock.
Definition at line 637 of file MachineInstr.h.
References hasProperty(), and llvm::MCID::UsesCustomInserter.
Referenced by INITIALIZE_PASS().
|
friend |
Definition at line 103 of file MachineInstr.h.
|
friend |
Definition at line 102 of file MachineInstr.h.
|
friend |
Definition at line 117 of file MachineInstr.h.
1.8.6