Represents a cast operation. It models the llvm::CastInst concept. The exception is bitcast.
Synopsis
Declared in <llvm/CodeGen/GlobalISel/GenericMachineInstrs.h>
class GCastOp
: public GenericMachineInstr
Base Classes
Name |
Description |
A base class for all GenericMachineInstrs. |
Type Aliases
Name |
Description |
Underlying integer type for AsmPrinter CommentFlag bit values. |
|
Const iterator over this instruction's machine operands. |
|
Const iterator range over machine operands. |
|
Filtered const operand range (e.g. all_defs / all_uses). |
|
Filtered mutable operand range (e.g. all_defs / all_uses). |
|
Iterator over MachineMemOperand pointers attached to an instruction. |
|
iterator/begin/end ‐ Iterate over all operands of a machine instruction. |
|
Mutable iterator range over machine operands. |
Enums
Name |
Description |
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. |
|
Controls which operands are compared by isIdenticalTo. |
|
Semantic flags carried on a MachineInstr beyond the MCInstrDesc. |
|
How property queries treat instruction bundles. |
Member Functions
Name |
Description |
|
Assignment is deleted; MachineInstr is not copyable. |
Add all implicit def and use operands to this instruction. |
|
Append MachineMemOperand |
|
|
|
Mark the operand that defines |
|
Ensure this instruction has an operand that defines |
|
Mark the operand that uses |
|
Return true if all the defs of this instruction are dead. |
|
Return true if all the implicit defs of this instruction are dead. |
|
Return a range over all explicit or implicit register def operands. |
|
Return a range over all explicit or implicit register use operands. |
|
Bundle this instruction with its predecessor. This can be an unbundled instruction, or it can be the first instruction in a bundle. |
|
Bundle this instruction with its successor. This can be an unbundled instruction, or it can be the last instruction in a bundle. |
|
Return true if this instruction can be folded as a memory operand. |
|
Retarget DBG_VALUEs that refer to this instruction's def to |
|
Clear AsmPrinter flag |
|
Clear the AsmPrinter bitvector. |
|
Clear MI flag |
|
Clear the MI flags bits specified by |
|
Clears kill flags on all operands. |
|
Clear all dead flags on operands defining register |
|
Clear all kill flags affecting |
|
Clone another instruction's pre‐ and post‐instruction symbols onto this. |
|
Replace our memrefs with a clone of |
|
Replace our memrefs with the merged memrefs of instructions in |
|
Collect matching DBG_VALUEs that immediately follow this instruction. |
|
Copy IR flags from instruction |
|
Copy implicit register operands from |
|
Return operands that determine the variable location for this debug value. |
|
Return true if this instruction fully defines |
|
Return all explicit register definition operands (implicits excluded). |
|
Drop variable‐location debugging information associated with this instruction. |
|
Clear this instruction's memory reference descriptor list. |
|
Clear all poison‐generating flags on this instruction. |
|
Dump this instruction to dbgs(). |
|
Dump this instruction and defining instructions up to |
|
Emit an error referring to this instruction's source location if available. |
|
Emit an error at this instruction's source location for impossible inline asm. |
|
Unlink 'this' from its basic block and delete it. |
|
Unlink 'this' from the containing basic block and delete it. |
|
|
|
|
|
Find the index of the first predicate operand, or ‐1 if none. |
|
Find the inline‐asm flag‐word operand index for operand |
|
|
|
Return the operand index that defines |
|
|
|
Return the operand index that uses |
|
Return the index of the operand tied to register operand |
|
Return whether AsmPrinter flag |
|
Return the asm printer flags bitvector. |
|
Return the number of instructions inside this bundle, excluding the header. |
|
Helper to extract a CFI type hash if one has been added. |
|
Return the deactivation symbol attached to this instruction, if any. |
|
Return the complex address expression referenced by this DBG_VALUE. |
|
|
|
|
|
Return the debug label referenced by this DBG_LABEL instruction. |
|
Returns the debug location of this MachineInstr. |
|
|
|
|
|
Return the index of debug operand |
|
|
|
Return the debug variable referenced by this DBG_VALUE instruction. |
|
|
|
Returns the target instruction descriptor of this MachineInstr. |
|
Return the LLTs of the first two operands. |
|
Return the registers and LLTs of the first two operands. |
|
Return the registers of the first two operands. |
|
Return the LLTs of the first three operands. |
|
Return the registers and LLTs of the first three operands. |
|
Return the registers of the first three operands. |
|
Return the LLTs of the first four operands. |
|
Return the registers and LLTs of the first four operands. |
|
Return the registers of the first four operands. |
|
Return the LLTs of the first five operands. |
|
Return the registers and LLTs of the first five operands. |
|
Return the registers of the first five operands. |
|
Return whether MI flag |
|
Return the MI flags bitvector. |
|
Return a valid size if the instruction is a folded restore instruction. |
|
Return a valid size if the instruction is a folded spill instruction. |
|
Helper to extract a heap alloc marker if one has been added. |
|
Return the inline assembly dialect used by this instruction. |
|
For inline asm, return the !srcloc metadata node if present. |
|
|
|
Helper to extract mmra.op metadata. |
|
Get the next node, or |
|
Returns the total number of operands which are debug locations. |
|
Returns the total number of definitions (explicit and implicit). |
|
Returns the number of non‐implicit definitions. |
|
Returns the number of non‐implicit operands. |
|
Returns the number of implicit operands. |
|
Return the number of memory operands. |
|
Return the total number of operands. |
|
Returns the opcode of this MachineInstr. |
|
|
|
Return the operand index corresponding to iterator |
|
Helper to extract PCSections metadata target sections. |
|
|
|
Helper to extract a post‐instruction symbol if one has been added. |
|
Helper to extract a pre‐instruction symbol if one has been added. |
|
|
|
Access the Idx'th operand as a register and return it. |
|
Compute the static register class constraint for operand |
|
Apply operand |
|
Apply this instruction's constraints on |
|
Return a valid size if the instruction is a restore instruction. |
|
Return a valid size if the instruction is a spill instruction. |
|
Get the source register being cast. |
|
Debugging support @{ Determine the generic type to print for operand |
|
Return true if this instruction has ties not implied by its descriptor. |
|
Return true if this debug value has a debug operand using |
|
Return true if this instruction has a delay slot that must be filled. |
|
Return true if defs have special regalloc requirements beyond classes. |
|
Return true if sources have special regalloc requirements beyond classes. |
|
Returns true if the instruction has an implicit definition. |
|
Return true if this instruction has exactly one MachineMemOperand. |
|
Return true if this instruction has an optional definition. |
|
Return true if this may have an ordered/volatile memory reference. |
|
Return true if this instruction has any poison‐generating flags set. |
|
Return true if this instruction needs a post‐ISel target adjustment hook. |
|
Return true if this instruction (or its bundle) has property |
|
Return true if there is an implicit use of exactly register |
|
Return true if this instruction has side effects beyond mayLoad/mayStore. |
|
|
|
Insert operands |
|
Return true if this is an ANNOTATION_LABEL instruction. |
|
Return true if this instruction costs no more than a move. |
|
Return true if this instruction stops fall‐through to the next instruction. |
|
Return true if this instruction is a bitcast instruction. |
|
Return true if this is a conditional, unconditional, or indirect branch. |
|
Return true if this is a BUNDLE header instruction. |
|
Return true if this instruction is part of a bundle. |
|
Return true if this instruction is bundled with a predecessor. |
|
Return true if this instruction is bundled with a successor. |
|
Return true if this is a CFI_INSTRUCTION. |
|
Return true if this is a call instruction. |
|
Return true if this call may have additional call‐site information. |
|
Return true if this instruction may be commutable (swap source operands). |
|
Return true if this instruction is a comparison. |
|
Return true if this branch may fall through or transfer to another block. |
|
If this PHI always merges the same virtual register, return that register. |
|
Return true if this instruction is convergent. |
|
Return true if this 2‐address instruction can become 3‐address if needed. |
|
Return true if this is a COPY instruction. |
|
Return true if this is a COPY_LANEMASK instruction. |
|
Return true if this instruction behaves like a copy (excluding COPY). |
|
Return true if this instruction is dead. |
|
Return true if this DBG_VALUE is an entry value expression. |
|
Return true if this is any kind of debug instruction. |
|
Return true if this instruction's opcode is DBG_LABEL. |
|
Return true if this non‐list DBG_VALUE has an immediate offset operand. |
|
Return true if |
|
Return true if this is a debug instruction or a pseudo probe. |
|
Return true if this is a DBG_PHI instruction. |
|
Return true if this instruction's opcode is DBG_INSTR_REF. |
|
Return true if the instruction is a DBG_VALUE or DBG_VALUE_LIST. |
|
Return true if this is a debug value or debug instruction reference. |
|
Return true if this is a DBG_VALUE_LIST instruction. |
|
Return true if this load never traps and reads invariant memory. |
|
Return true if this is an EH_LABEL instruction. |
|
Return true if this marks the end of an EH scope (catchpad/cleanuppad). |
|
Return true if this debug instruction represents the same value as |
|
Return true if this is an EXTRACT_SUBREG instruction. |
|
Return true if this behaves like a generic EXTRACT_SUBREG. |
|
Return true if this is a FAKE_USE instruction. |
|
Return true if this is a COPY with no subregister on either operand. |
|
Return true if this is a GC_LABEL instruction. |
|
Return true if this instruction is identical to |
|
Return true if this is an identity copy (same reg and subreg). |
|
Return true if this is an IMPLICIT_DEF instruction. |
|
Return true if this is an indirect branch (e.g. through a register). |
|
Return true if this DBG_VALUE is indirect (reg location + imm offset). |
|
Return true if this is an INLINEASM or INLINEASM_BR instruction. |
|
Return true if this is an INSERT_SUBREG instruction. |
|
Return true if this behaves like a generic INSERT_SUBREG. |
|
Return true if MI is in a bundle (but not the first MI in a bundle). |
|
Return true if this is a JUMP_TABLE_DEBUG_INFO instruction. |
|
Return true if this is a KILL instruction. |
|
Returns true if the MachineInstr represents a label. |
|
Return true if this is a LIFETIME_START or LIFETIME_END marker. |
|
Returns true if it is illegal to fold a load across this instruction. |
|
Return true if this instruction produces no executable output. |
|
Return true if this is a move‐immediate (including conditional moves). |
|
Return true if this instruction is a register move. |
|
Return true if this is a non‐list DBG_VALUE instruction. |
|
Return true if this instruction cannot be safely duplicated. |
|
Return true if operand |
|
Return true if this is a PHI or G_PHI instruction. |
|
Return true if the instruction marks a position in the function. |
|
Return true if this opcode should go through usual legalization steps. |
|
Return true if this instruction has a predicate operand. |
|
Return true if this is a pseudo instruction (not a real machine insn). |
|
Return true if this is a PSEUDO_PROBE instruction. |
|
Return true if this is a REG_SEQUENCE instruction. |
|
Return true if this behaves like a generic REG_SEQUENCE. |
|
Return true if use operand |
|
Return true if def operand |
|
Return true if this instruction is a rematerialization candidate. |
|
Return true if this is a return instruction. |
|
Return true if it is safe to move this instruction. |
|
Return true if this instruction is a select instruction. |
|
Return true if this is inline asm that requests stack alignment. |
|
Return true if this is a SUBREG_TO_REG instruction. |
|
Return true if this instruction is part of a basic‐block terminator. |
|
Return true if this instruction is transient (likely eliminated / free). |
|
Return true if this branch always transfers control to another block. |
|
Return true if this debug value describes part of a variable as unavailable. |
|
Return true if this instruction can have a variable number of operands. |
|
Return true if this instruction kills |
|
|
|
Return true if register operand |
|
Return true if this instruction could possibly read memory. |
|
Return true if this instruction could possibly read or modify memory. |
|
Return true if this instruction could raise a floating‐point exception. |
|
Return true if this instruction could possibly modify memory. |
|
Return this instruction's memory operands. |
|
Return a begin iterator over this instruction's memory operands. |
|
Return true if this instruction has no describing memory operands. |
|
Return a past‐the‐end iterator over this instruction's memory operands. |
|
Return the MIFlags that represent both this instruction and |
|
Return true if this instruction modifies (fully or partially) |
|
Move this instruction before |
|
|
|
|
|
|
|
Examine this instruction's debug number without assigning one. |
|
|
|
Return true if this instruction reads |
|
Return true if this instruction reads virtual register |
|
Return whether this instruction reads and/or writes virtual register |
|
Return true if |
|
Unlink this instruction from its basic block and return it without deleting it. |
|
Unlink this instruction from its basic block and return it without deleting. |
|
Erase operand |
|
Remove all PHI incoming values from basic block |
|
Set AsmPrinter flag |
|
Set the CFI type hash for this instruction. |
|
Set the deactivation symbol value attached to this instruction. |
|
Set this instruction's debug instruction number. |
|
Replace this instruction's debug location with |
|
Sets all register debug operands in this debug value instruction to be undef. |
|
Replace this instruction's descriptor (and thus opcode) with |
|
Set MI flag |
|
Set MI flags from bitvector |
|
Set a heap‐alloc site marker used to emit labels after ISel/opts. |
|
Set mmra.op metadata on this instruction. |
|
Assign this instruction's memory reference descriptor list. |
|
Set metadata naming sections that should receive this instruction address. |
|
Mark every physreg used by this instruction dead except |
|
Set a symbol emitted immediately after this instruction. |
|
Set a symbol emitted immediately before this instruction. |
|
Mark subregister defs of |
|
Return true if additional call‐site info must be updated for this MI. |
|
Replace all occurrences of |
|
Tie register operands at |
|
Break bundle above this instruction. |
|
Break bundle below this instruction. |
|
Break any tie involving operand index |
|
Return operands that may be register uses (may include non‐reg operands). |
|
Return true if DAG scheduling needs a custom insertion hook for this. |
|
Return true if this would be trivially dead if all defined regs were dead. |
Static Member Functions
Name |
Description |
Methods for support type inquiry through isa, cast, and dyn_cast. |
|
Build MIFlags bits corresponding to the IR flags on instruction |
Non-Member Functions
Name |
Description |
Analyze how the current instruction or bundle uses a physical register. |
|
Analyze how the current instruction or bundle uses a virtual register. |
|
Return a pair of lane masks (reads, writes) indicating which lanes this instruction uses with Reg. |
|
Matcher for memcpy‐like instructions. For non‐zero lengths, |
|
Return a range over all operands in the const bundle containing |
|
Constrain selected‐instruction operands to the instruction register classes. |
|
Erase a single dead instruction, optionally notifying a debug observer. |
|
Return the scalar sign‐extended integral splat value defined by |
|
Return the scalar integral splat value defined by |
|
Return the splat index of a G_SHUFFLE_VECTOR when it is a splat. |
|
Examples: |
|
Return true if the value is a constant ‐1 integer or a splatted vector of a constant ‐1 integer (with no undefs if |
|
Returns true if the instruction |
|
Return true if the specified instruction is a G_BUILD_VECTOR or G_BUILD_VECTOR_TRUNC where all of the elements are ~0 or undef. |
|
Return true if the specified instruction is a G_BUILD_VECTOR or G_BUILD_VECTOR_TRUNC where all of the elements are 0 or undef. |
|
Return true if the specified instruction is a G_BUILD_VECTOR or G_BUILD_VECTOR_TRUNC where all of the elements are |
|
Return true if the specified instruction is a G_BUILD_VECTOR or G_BUILD_VECTOR_TRUNC where all of the elements are |
|
Return true if the specified instruction is known to be a constant, or a vector of constants. |
|
Determines if |
|
Return true if the value is a constant 0 integer or a null splat. |
|
Check whether an instruction |
|
Return a range over all operands in the bundle containing |
|
Returns an iterator range over all physical register and mask operands for |
|
Record uses of |
|
Compute a stable hash of machine instruction |
|
Update a DBG_VALUE whose value has been spilled to FrameIndex. Useful when modifying an instruction in place while iterating over a basic block. |
|
Compute whether or not a memory access at |
|
Returns true if the instruction |
|
Binds the matched defining instruction to |
|
Binds the matched defining instruction to const |
|
Match const machine instruction |
|
Match machine instruction |
Derived Classes
Name |
Description |
Represents an any ext. |
|
Represents an integer‐like extending operation. |
|
Represents an integer‐like extending or truncating operation. |
|
Represents a sext. |
|
Represents a trunc. |
|
Represents a zext. |
Created with MrDocs