Represents calls to the gc.relocate intrinsic.

Synopsis

Declared in <llvm/IR/IntrinsicInst.h>

class GCRelocateInst
    : public GCProjectionInst

Base Classes

Name

Description

GCProjectionInst

Common base class for representing values projected from a statepoint. Currently, the only projections available are gc.result and gc.relocate.

Types

Name

Description

BundleOpInfo

Descriptor for one contiguous operand bundle in the Use list.

const_succ_iterator

The const version of succ_iterator.

const_value_op_iterator

Const iterator for directly iterating over the operand Values.

succ_iterator

Iterator type that casts an operand to a basic block.

value_op_iterator

Iterator for directly iterating over the operand Values.

Type Aliases

Name

Description

InstListType

Intrusive instruction list type used by BasicBlock.

TailCallKindField

Bitfield storing the tail‐call kind in SubclassData. Bitfield element storing the TailCallKind in SubclassData.

bundle_op_iterator

Iterator over mutable BundleOpInfo descriptors for this call.

const_bundle_op_iterator

Iterator over const BundleOpInfo descriptors for this call.

const_op_iterator

Const iterator over this user's operand Use objects.

const_op_range

Range of const operand Use iterators.

const_use_iterator

Const iterator over this value's uses.

const_user_iterator

Const iterator over this value's users.

op_iterator

Iterator over this user's operand Use objects.

op_range

Range of mutable operand Use iterators.

use_iterator

Iterator over this value's uses.

user_iterator

Iterator over this value's users.

Enums

Name

Description

BinaryOps

Opcodes for binary operators (arithmetic, shifts, and bitwise logic).

CastOps

Opcodes for cast instructions (trunc, zext, bitcast, addrspacecast, etc.).

FuncletPadOps

Opcodes for funclet pad instructions (cleanuppad, catchpad).

MemoryOps

Opcodes for memory instructions (alloca, load, store, GEP, atomics, etc.).

OperationEquivalenceFlags

When checking for operation equivalence (using isSameOperationAs) it is sometimes useful to ignore certain attributes.

OtherOps

Opcodes for other non‐terminating instructions (cmp, phi, call, select, etc.).

TailCallKind

Kind of tail‐call marker on a call instruction.

TermOps

Opcodes that terminate a basic block (return, branch, switch, etc.).

UnaryOps

Opcodes for unary instructions (e.g. fneg).

ValueTy

Concrete subclass of this.

Member Functions

Name

Description

operator=

Assignment operators

DoPHITranslation

DoPHITranslation overloads

addAnnotationMetadata

addAnnotationMetadata overloads

addAttributeAtIndex

addAttributeAtIndex overloads

addDereferenceableParamAttr

Add a dereferenceable‐bytes attribute to parameter i.

addDereferenceableRetAttr

Add a dereferenceable‐bytes attribute to the return value.

addFnAttr

addFnAttr overloads

addParamAttr

addParamAttr overloads

addParamAttrs

Add parameter attributes from builder B to argument ArgNo.

addRangeRetAttr

Add a range attribute to the return value.

addRetAttr

addRetAttr overloads

addRetAttrs

Add return attributes from builder B to this call.

addUse

This method should only be used by the Use class.

adoptDbgRecords

Transfer any DbgRecords on the position It onto this instruction.

andIRFlags

Intersect wrapping, exact, and fast‐math flags of V with this instruction.

applyMergedLocation

Merge two debug locations and apply the result to this instruction.

arg_begin

arg_begin overloads

arg_empty

Return true if this call has no arguments.

arg_end

arg_end overloads

arg_size

Return the number of call arguments.

args

args overloads

assertModuleIsMaterialized

Assert in debug builds that modules containing this value are materialized.

assertModuleIsMaterializedImpl

Assert that every module containing this value is fully materialized.

bundleOperandHasAttr

Return whether the bundle operand at index OpIdx has attribute A.

bundle_op_info_begin

bundle_op_info_begin overloads

bundle_op_info_end

bundle_op_info_end overloads

bundle_op_infos

bundle_op_infos overloads

canBeFreed

Return true if this pointer's memory may be freed in its defining scope.

canReturnTwice

Return true if the call can return twice

cannotDuplicate

Return true if this invoke cannot be duplicated.

cannotMerge

Return true if this call cannot be tail merged.

clone

Create a copy of this instruction that is identical except it has no parent and no name.

cloneDebugInfoFrom

Clone any debug‐info attached to From onto this instruction.

comesBefore

Return true if this instruction comes before Other in the same block.

copyFastMathFlags

copyFastMathFlags overloads

copyIRFlags

Copy supported exact, fast‐math, and optionally wrapping flags from V.

copyMetadata

Copy metadata from SrcInst onto this instruction.

copyProfileAndDebugMetadata

Copy debug, profile, and memprof metadata from SrcInst.

countOperandBundlesOfType

countOperandBundlesOfType overloads

dataOperandHasImpliedAttr

Return true if data operand i has implied attribute Kind.

data_operands_begin

data_operands_begin overloads

data_operands_empty

Return true if this call has no data operands.

data_operands_end

data_operands_end overloads

data_operands_size

Return the number of data operands (arguments plus bundle inputs).

data_ops

data_ops overloads

deleteValue

Delete a pointer to a generic Value.

doesNoCfCheck

Return true if this call skips indirect branch tracking.

doesNotAccessMemory

doesNotAccessMemory overloads

doesNotCapture

Return true if data operand OpNo does not capture memory.

doesNotReturn

Return true if this call cannot return to its caller.

doesNotThrow

Return true if this call cannot unwind.

dropAllReferences

Drop all references to operands.

dropDbgRecords

Erase any DbgRecords attached to this instruction.

dropDroppableUses

Remove every uses that can safely be removed.

dropDroppableUsesIn

Remove every use of this value in User that can safely be removed.

dropLocation

Drop the instruction's debug location.

dropOneDbgRecord

Erase a single DbgRecord I that is attached to this instruction.

dropPoisonGeneratingAnnotations

Drops flags, attributes and metadata that may generate poison.

dropPoisonGeneratingAttributes

Drops attributes that may generate poison.

dropPoisonGeneratingFlags

Drops flags that may cause this instruction to evaluate to poison despite having non‐poison inputs.

dropPoisonGeneratingMetadata

Drops metadata that may generate poison.

dropUBImplyingAttrsAndMetadata

Drop attributes or metadata that can cause immediate undefined behavior.

dropUBImplyingAttrsAndUnknownMetadata

Drop non‐debug unknown metadata and UB‐implying call attributes.

dropUnknownNonDebugMetadata

Drop all unknown metadata except for debug locations.

dump

Support for debugging, callable in GDB: V‐>dump()

eraseFromParent

This method unlinks 'this' from the containing basic block and deletes it.

eraseMetadataIf

Erase all metadata that matches the predicate.

extractProfTotalWeight

Retrieve total raw weight values of a branch.

getAAMetadata

Return the AA metadata for this instruction.

getAccessType

Return the type this instruction accesses in memory, if any.

getAllMetadata

Get all metadata attached to this Instruction.

getAllMetadataOtherThanDebugLoc

Get all metadata attached to this Instruction except the debug location.

getArgOperand

Return the i‐th call argument operand.

getArgOperandNo

getArgOperandNo overloads

getArgOperandUse

Return the Use for call argument i.

getArgOperandWithAttribute

Return the first argument with attribute Kind.

getAttributeAtIndex

Return attribute Kind at attribute index i.

getAttributes

Return the attributes for this call.

getBasePtr

Return the base pointer being relocated.

getBasePtrIndex

The index into the associate statepoint's argument list which contains the base pointer of the pointer whose relocation this gc.relocate describes.

getBundleOpInfoForOperand

getBundleOpInfoForOperand overloads

getBundleOperandsEndIndex

Return the index one past the last bundle operand in the Use array.

getBundleOperandsStartIndex

Return the index of the first bundle operand in the Use array.

getCalledFunction

Return the directly called Function, if known.

getCalledOperand

Return the called function or value operand.

getCalledOperandUse

Return the Use for the called operand.

getCaller

Return the function containing this call.

getCallingConv

Return the calling convention of this call.

getCaptureInfo

Return which pointer components data operand OpNo may capture.

getContext

All values hold a context through their type.

getConvergenceControlToken

Return the convergence control token for this call, if it exists.

getDataLayout

Return the data layout of the module this instruction belongs to.

getDataOperandNo

getDataOperandNo overloads

getDbgRecordRange

Return a range over the DbgRecords attached to this instruction.

getDbgReinsertionPosition

Return an iterator to the next DbgRecord after this instruction.

getDebugLoc

Return the debug location for this node as a DebugLoc.

getDerivedPtr

Return the derived pointer being relocated.

getDerivedPtrIndex

The index into the associate statepoint's argument list which contains the pointer whose relocation this gc.relocate describes.

getDescriptor

Returns the descriptor co‐allocated with this User instance.

getFastMathFlags

Return all fast‐math flags for this instruction.

getFastMathFlagsOrNone

Return fast‐math flags, or default flags when not a FPMathOperator.

getFnAttr

Return function attribute Kind, including callee lookup if needed.

getFunction

Return the function this instruction belongs to.

getFunctionType

Return the function type of this call.

getInsertionPointAfterDef

Return the first insertion point at which this instruction's result is defined.

getIntrinsicID

Return the intrinsic ID of this intrinsic.

getMemoryEffects

Return the memory effects of this call.

getMetadata

Get the metadata of given kind attached to this Instruction.

getModule

getModule overloads

getName

Return a constant reference to the value's name.

getNameOrAsOperand

Return this value's name, or a printed operand string if it is unnamed.

getNextNode

Get the next node, or nullptr for the list tail.

getNumOperandBundles

Return the number of operand bundles on this call.

getNumOperands

Return the total number of operands (arguments, called value, and extras).

getNumSuccessors

Return the number of successors that this terminator has.

getNumTotalBundleOperands

Return the total number of bundle input operands on this call.

getNumUses

This method computes the number of uses of this Value.

getOpcode

Return the opcode of this instruction as a member of the opcode enums.

getOpcodeName

Return the mnemonic name for this instruction's opcode.

getOperand

getOperand overloads

getOperandBundle

getOperandBundle overloads

getOperandBundleAt

Return the operand bundle at a specific index.

getOperandBundleForOperand

Return the operand bundle containing the operand at index OpIdx.

getOperandBundlesAsDefs

Copy operand bundles on this call into Defs.

getOperandList

getOperandList overloads

getOperandUse

getOperandUse overloads

getParamAlign

Return the alignment for argument ArgNo, if known.

getParamAttr

Return parameter attribute Kind for argument ArgNo.

getParamAttributes

Return the param attributes for argument ArgNo.

getParamByRefType

Return the byref type for argument ArgNo.

getParamByValType

Return the byval type for argument ArgNo.

getParamDereferenceableBytes

Return dereferenceable bytes for argument i.

getParamDereferenceableOrNullBytes

Return dereferenceable_or_null bytes for argument i.

getParamElementType

Return the elementtype for argument ArgNo.

getParamInAllocaType

Return the inalloca type for argument ArgNo.

getParamNoFPClass

Return disallowed FP classes for argument i.

getParamPreallocatedType

Return the preallocated type for argument ArgNo.

getParamStackAlign

Return the stack alignment for argument ArgNo, if specified.

getParamStructRetType

Return the sret type for argument ArgNo.

getPointerAlignment

Returns an alignment of the pointer value.

getPointerDereferenceableBytes

Returns the number of bytes known to be dereferenceable for the pointer value.

getPointerOffsetFrom

If this ptr is provably equal to Other plus a constant offset, return that offset in bytes. Essentially ptr this subtract ptr Other.

getPrevNode

getPrevNode overloads

getRange

Return the constant range of the return value, if any.

getRawSubclassOptionalData

Return the raw optional flags value contained in this value.

getRetAlign

Return the alignment of the return value, if known.

getRetAttr

Return return attribute Kind, including callee lookup if needed.

getRetAttributes

Return the return attributes for this call.

getRetDereferenceableBytes

Return dereferenceable bytes for the return value.

getRetDereferenceableOrNullBytes

Return dereferenceable_or_null bytes for the return value.

getRetNoFPClass

Return disallowed FP classes for the return value.

getReturnedArgOperand

Return the argument marked with the returned attribute.

getSingleUndroppableUse

getSingleUndroppableUse overloads

getStableDebugLoc

Return a stable debug location for this instruction.

getStatepoint

The statepoint with which this gc.relocate is associated.

getSuccessor

Return the successor at index Idx.

getTailCallKind

Return the tail‐call kind.

getType

All values are typed, get the type of this value.

getUniqueUndroppableUser

getUniqueUndroppableUser overloads

getValueID

Return an ID for the concrete type of this object.

getValueName

Return the symbol‐table name entry for this value, if any.

handleMarkerRemoval

Handle the debug‐info implications of this instruction being removed. Any attached DbgRecords need to "fall" down onto the next instruction.

hasAllowContract

Determine whether the allow‐contract flag is set.

hasAllowReassoc

Determine whether the allow‐reassociation flag is set.

hasAllowReciprocal

Determine whether the allow‐reciprocal flag is set.

hasApproxFunc

Determine whether the approximate‐math‐functions flag is set.

hasArgument

Return true if V is passed as an argument to the called function.

hasArgumentWithAdditionalReturnCaptureComponents

Return true if some argument has extra return capture components.

hasAtomicLoad

Return true if this atomic instruction loads from memory.

hasAtomicStore

Return true if this atomic instruction stores to memory.

hasByValArgument

Return true if any call argument has the byval attribute.

hasClobberingOperandBundles

Return whether any operand bundle on this call may write to the heap.

hasDbgRecords

Return true if any DbgRecords are attached to this instruction.

hasDeoptState

Return whether this call has a deopt‐state operand bundle.

hasFnAttr

Return true if this call has function attribute Kind.

hasIdenticalOperandBundleSchema

Return whether this call has the same operand bundle layout as Other.

hasInAllocaArgument

Return true if the last argument has the inalloca attribute.

hasMetadata

hasMetadata overloads

hasMetadataOtherThanDebugLoc

Return true if this instruction has metadata attached to it other than a debug location.

hasNUndroppableUses

Return true if this value has exactly N undroppable uses.

hasNUndroppableUsesOrMore

Return true if this value has N undroppable uses or more.

hasNUses

Return true if this Value has exactly N uses.

hasNUsesOrMore

Return true if this value has N uses or more.

hasName

Return true if this value has a name in the symbol table.

hasNoInfs

Determine whether the no‐infs flag is set.

hasNoNaNs

Determine whether the no‐NaNs flag is set.

hasNoSignedWrap

Determine whether the no signed wrap flag is set.

hasNoSignedZeros

Determine whether the no‐signed‐zeros flag is set.

hasNoUnsignedWrap

Determine whether the no unsigned wrap flag is set.

hasNonDebugLocLoopMetadata

Return true if this instruction contains loop metadata other than a debug location.

hasNonNeg

Determine whether the nneg flag is set.

hasOneUse

Return true if there is exactly one use of this value.

hasOneUser

Return true if there is exactly one user of this value.

hasOperandBundles

Return whether this call has any operand bundles.

hasOperandBundlesOtherThan

Return whether this call has operand bundles whose tags are not in IDs.

hasPoisonGeneratingAnnotations

Return true if this instruction has poison‐generating flags, attributes or metadata.

hasPoisonGeneratingAttributes

Return true if this instruction has poison‐generating attribute.

hasPoisonGeneratingFlags

Return true if this operator has flags which may cause poison.

hasPoisonGeneratingMetadata

Return true if this instruction has poison‐generating metadata.

hasReadingOperandBundles

Return whether any operand bundle on this call may read from the heap.

hasRetAttr

Return true if the return value has attribute Kind.

hasSameSpecialState

Return true if I2 has the same opcode‐specific state as this instruction.

hasStructRetAttr

Return true if the call returns a structure via the first pointer arg.

hasUBImplyingAttrs

Return true if this instruction has UB‐implying attributes that can cause immediate undefined behavior.

hasUseList

Check if this Value has a use‐list.

hasValueHandle

Return true if there is a value handle associated with this value.

insertAfter

insertAfter overloads

insertBefore

insertBefore overloads

insertInto

Insert an unlinked instruction into ParentBB at position It.

isArgOperand

isArgOperand overloads

isArithmeticShift

Return true if this is an arithmetic shift right.

isAssociative

Return true if this intrinsic is an associative operation.

isAssumeLikeIntrinsic

Checks if the intrinsic is an annotation.

isAtomic

Return true if this instruction has an AtomicOrdering of unordered or higher.

isBinaryOp

Return true if this instruction is a binary operator.

isBitwiseLogicOp

Return true if this is and/or/xor.

isBundleOperand

isBundleOperand overloads

isByValArgument

Return true if argument ArgNo is passed by value.

isCallee

isCallee overloads

isCast

Return true if this instruction is a cast.

isCommutableOperand

Return true if operand Op participates in a commutative intrinsic.

isCommutative

Return true if swapping the first two arguments to the intrinsic produces the same result.

isConvergent

Return true if this call is convergent.

isDataOperand

isDataOperand overloads

isDebugOrPseudoInst

Return true if the instruction is a DbgInfoIntrinsic or PseudoProbeInst.

isDroppable

Return whether this user's uses may be dropped without affecting correctness.

isEHPad

Return true if the instruction is a variety of EH‐block.

isExact

Determine whether the exact flag is set.

isFPDivRem

Return true if this instruction is a floating‐point division or remainder.

isFast

Determine whether all fast‐math‐flags are set.

isFenceLike

Return true if this instruction behaves like a memory fence.

isFuncletPad

Return true if this instruction is a funclet pad.

isIdempotent

Return true if the instruction is idempotent.

isIdenticalTo

Return true if I is exactly identical to this instruction.

isIdenticalToWhenDefined

Return true if I matches this instruction ignoring undefined‐result flags.

isInAllocaArgument

Return true if argument ArgNo is passed in an alloca.

isIndirectCall

Return true if the callsite is an indirect call.

isInlineAsm

Return true if this call targets inline assembly.

isIntDivRem

Return true if this instruction is an integer division or remainder.

isLaunderOrStripInvariantGroup

Return true if the instruction is a llvm.launder.invariant.group or llvm.strip.invariant.group.

isLifetimeStartOrEnd

Return true if the instruction is a llvm.lifetime.start or llvm.lifetime.end marker.

isLogicalShift

Return true if this is a logical shift left or a logical shift right.

isMustTailCall

Return true if this call is marked musttail.

isNilpotent

Return true if the instruction is nilpotent.

isNoBuiltin

Return true if this call must not be treated as a library builtin.

isNoInline

Return true if this call must not be inlined.

isNoTailCall

Return true if this call is marked notail.

isNonContinuableTrap

Return true if the call is for a noreturn trap intrinsic.

isOnlyUserOfAnyOperand

Return true if this instruction is the only user of at least one operand.

isOperandBundleOfType

Return whether the operand at index Idx belongs to a bundle with tag ID ID.

isPassPointeeByValueArgument

Return true if argument ArgNo is passed by value on the stack.

isPassingUndefUB

Return true if passing undef to argument ArgNo is undefined behavior.

isReturnNonNull

Return true if the return value is known non‐null.

isSafeToRemove

Return true if the instruction can be removed if the result is unused.

isSameOperationAs

Return true if I executes the same operation as this instruction.

isShift

Return true if this instruction is a shift.

isSpecialTerminator

Return true if this instruction is a special terminator.

isStrictFP

Return true if this call requires strict floating‐point semantics.

isSwiftError

Return true if this value is a swifterror value.

isTailCall

Return true if this is a tail call.

isTerminator

Return true if this instruction is a terminator.

isTiedToInvoke

Return true if this relocate is tied to the invoke statepoint. This includes relocates which are on the unwinding path.

isUnaryOp

Return true if this instruction is a unary operator.

isUsedByMetadata

Return true if there is metadata referencing this value.

isUsedInBasicBlock

Check if this value is used in the specified basic block.

isUsedOutsideOfBlock

Return true if any use of this instruction is outside BB.

isVolatile

Return true if this instruction has a volatile memory access.

materialized_use_begin

materialized_use_begin overloads

materialized_use_empty

Return true if there are no currently materialized uses.

materialized_user_begin

materialized_user_begin overloads

materialized_users

materialized_users overloads

materialized_uses

materialized_uses overloads

mayHaveSideEffects

Return true if the instruction may have side effects.

mayReadFromMemory

Return true if this instruction may read memory.

mayReadOrWriteMemory

Return true if this instruction may read or write memory.

maySynchronize

Return true if this instruction may synchronize.

mayThrow

Return true if this instruction may throw an exception.

mayWriteToMemory

Return true if this instruction may modify memory.

mergeDIAssignID

Merge DIAssignID metadata from this instruction and SourceInstructions.

moveAfter

Unlink this instruction from its current basic block and insert it into the basic block that MovePos lives in, right after MovePos.

moveAfterPreserving

Move this instruction after MovePos while preserving instruction order.

moveBefore

moveBefore overloads

moveBeforePreserving

moveBeforePreserving overloads

mutateFunctionType

Change the function type of this call and update the result type.

mutateType

Mutate the type of this Value to be of the specified type.

onlyAccessesArgMemory

Return true if this call may only access argument‐pointee memory.

onlyAccessesInaccessibleMemOrArgMem

Return true if this call may only access arg or inaccessible memory.

onlyAccessesInaccessibleMemory

Return true if this call may only access inaccessible memory.

onlyReadsMemory

onlyReadsMemory overloads

onlyWritesMemory

onlyWritesMemory overloads

op_begin

op_begin overloads

op_end

op_end overloads

operandBundleFromBundleOpInfo

Map a BOI descriptor to an OperandBundleUse view.

operand_bundles

Iterate over OperandBundleUse views for each bundle on this call.

operand_values

operand_values overloads

operands

operands overloads

operator delete

Delete operators

paramHasAttr

Return true if argument ArgNo has attribute Kind.

paramHasNonNullAttr

Return true if argument ArgNo is known non‐null.

populateBundleOperandInfos

Populate bundle descriptors and operand uses from Bundles.

print

print overloads

printAsOperand

printAsOperand overloads

removeAttributeAtIndex

Remove attribute Kind at attribute index i.

removeFnAttr

Remove function attribute Kind from this call.

removeFnAttrs

Remove function attributes matching AttrsToRemove.

removeFromParent

This method unlinks 'this' from the containing basic block, but does not delete it.

removeParamAttr

Remove parameter attribute Kind from argument ArgNo.

removeParamAttrs

Remove parameter attributes matching AttrsToRemove from ArgNo.

removeRetAttr

Remove return attribute Kind from this call.

removeRetAttrs

Remove return attributes matching AttrsToRemove.

replaceAllUsesWith

Change all uses of this to point to a new Value.

replaceNonMetadataUsesWith

Change non‐metadata uses of this to point to a new Value.

replaceSuccessorWith

Replace successor OldBB with NewBB.

replaceUsesOfWith

Replace uses of one Value with another.

replaceUsesOutsideBlock

Replace uses of this value that occur outside BB with V.

replaceUsesWithIf

Replace selected uses of this value with New.

returnDoesNotAlias

Return true if the return value has the noalias attribute.

reverseUseList

Reverse the use‐list.

setAAMetadata

Set the AA metadata on this instruction from the AAMDNodes structure.

setArgOperand

Set the i‐th call argument operand.

setAttributes

Set the attributes for this call.

setCalledFunction

setCalledFunction overloads

setCalledOperand

Set the called function or value operand.

setCallingConv

Set the calling convention for this call.

setCanReturnTwice

Mark this call as able to return twice.

setCannotDuplicate

Mark that the invoke cannot be duplicated by the optimizer.

setCannotMerge

Mark that the call cannot be merged with other calls by the optimizer.

setConvergent

Mark this call as convergent.

setDebugLoc

Set the debug location information for this instruction.

setDoesNotAccessMemory

Mark the call as not accessing memory (sets MemoryEffects::none).

setDoesNotReturn

Mark this call as noreturn.

setDoesNotThrow

Mark this call as nounwind.

setFast

Set or clear all fast‐math‐flags on this instruction.

setFastMathFlags

Set multiple fast‐math flags on this instruction.

setHasAllowContract

Set or clear the allow‐contract flag on this instruction.

setHasAllowReassoc

Set or clear the reassociation flag on this instruction.

setHasAllowReciprocal

Set or clear the allow‐reciprocal flag on this instruction.

setHasApproxFunc

Set or clear the approximate‐math‐functions flag on this instruction.

setHasNoInfs

Set or clear the no‐infs flag on this instruction.

setHasNoNaNs

Set or clear the no‐nans flag on this instruction.

setHasNoSignedWrap

Set or clear the nsw flag on this instruction.

setHasNoSignedZeros

Set or clear the no‐signed‐zeros flag on this instruction.

setHasNoUnsignedWrap

Set or clear the nuw flag on this instruction.

setIsExact

Set or clear the exact flag on this instruction.

setIsNoInline

Mark this call as must‐not‐inline.

setMemoryEffects

Set the memory effects of this call.

setMetadata

setMetadata overloads

setName

Change the name of the value.

setNoSanitizeMetadata

Sets the nosanitize metadata on this instruction.

setNonNeg

Set or clear the nneg flag on this instruction.

setNotConvergent

Remove the convergent attribute from this call.

setNumHungOffUseOperands

Set the operand count for a User with hung‐off uses.

setOnlyAccessesArgMemory

Mark the call as only accessing argument‐pointee memory.

setOnlyAccessesInaccessibleMemOrArgMem

Mark the call as only accessing arg or inaccessible memory.

setOnlyAccessesInaccessibleMemory

Mark the call as only accessing inaccessible memory.

setOnlyReadsMemory

Mark the call as only reading memory.

setOnlyWritesMemory

Mark the call as only writing memory.

setOperand

setOperand overloads

setSuccessor

Update the successor at index Idx to point at BB.

setTailCall

Mark or clear this call as a tail‐call candidate.

setTailCallKind

Set the tail‐call kind for this call.

setValueName

Set the symbol‐table name entry for this value.

sortUseList

Sort the use‐list.

stripAndAccumulateConstantOffsets

stripAndAccumulateConstantOffsets overloads

stripAndAccumulateInBoundsConstantOffsets

stripAndAccumulateInBoundsConstantOffsets overloads

stripInBoundsConstantOffsets

stripInBoundsConstantOffsets overloads

stripInBoundsOffsets

stripInBoundsOffsets overloads

stripPointerCasts

stripPointerCasts overloads

stripPointerCastsAndAliases

stripPointerCastsAndAliases overloads

stripPointerCastsForAliasAnalysis

stripPointerCastsForAliasAnalysis overloads

stripPointerCastsSameRepresentation

stripPointerCastsSameRepresentation overloads

successors

successors overloads

swapProfMetadata

If the instruction has "branch_weights" MD_prof metadata and the MDNode has three operands (including name string), swap the order of the metadata.

takeName

Transfer the name from V to this value.

tryIntersectAttributes

Intersect this call's attributes with Other's attributes.

updateLocationAfterHoist

Update the debug location after hoisting this instruction to a predecessor.

updateProfWeight

Update profile metadata by scaling it by S / T.

use_begin

use_begin overloads

use_empty

Return true if this value has no uses.

use_end

use_end overloads

user_back

user_back overloads

user_begin

Return an iterator to the first user of this value.

user_empty

Return true if this value has no users.

user_end

user_end overloads

users

users overloads

uses

uses overloads

value_op_begin

value_op_begin overloads

value_op_end

value_op_end overloads

willReturn

Return true if the instruction will return.

Static Member Functions

Name

Description

Create

Create overloads

addOperandBundle

Create a clone of CB with operand bundle OB added.

classof

Methods for support type inquiry through isa, cast, and dyn_cast.

dropDroppableUse

Remove the droppable use U.

getOpcodeName

Return the mnemonic name for the given opcode (e.g. "add", "ret").

isAssociative

Return true if Opcode is an associative binary operator.

isBinaryOp

Return true if the opcode is a binary operator.

isBitwiseLogicOp

Return true if Opcode is and/or/xor.

isCast

Return true if Opcode is one of the CastInst instructions.

isCommutative

Return true if Opcode is a commutative binary operator.

isFPDivRem

Return true if the opcode is a floating‐point division or remainder.

isFuncletPad

Return true if Opcode is one of the FuncletPadInst instructions.

isIdempotent

Return true if Opcode is an idempotent operator (And or Or in LLVM).

isIntDivRem

Return true if the opcode is an integer division or remainder.

isNilpotent

Return true if Opcode is a nilpotent operator (Xor in LLVM).

isShift

Return true if Opcode is one of the shift instructions.

isSpecialTerminator

Return true if Opcode is a special terminator.

isTerminator

Return true if the opcode is a terminator instruction.

isUnaryOp

Return true if the opcode is a unary operator.

mayLowerToFunctionCall

Check if the intrinsic might lower into a regular function call in the course of IR transformations.

removeOperandBundle

Create a clone of CB with operand bundle ID removed.

removeOperandBundleAt

Create a clone of CB with the operand bundle at Offset removed.

Data Members

Name

Description

DebugMarker

Optional marker for debugging information immediately before this instruction.

Static Data Members

Name

Description

MaxAlignmentExponent

The maximum alignment for instructions.

MaximumAlignment

Maximum absolute alignment in bytes (1 << MaxAlignmentExponent).

Using Declarations

Name

Description

getContext

Bring Instruction::getContext into scope for CallBase users.

Protected Types

Name

Description

AllocInfo

Information about how a User object was allocated, to be passed into the User constructor.

HungOffOperandsAllocMarker

Indicates this User has operands "hung off" in another allocation.

IntrusiveOperandsAllocMarker

Indicates this User has operands co‐allocated.

IntrusiveOperandsAndDescriptorAllocMarker

Indicates this User has operands and a descriptor co‐allocated .

Protected Type Aliases

Name

Description

AlignmentBitfieldElementT

Bitfield element template for an alignment at bit offset Offset.

AtomicOrderingBitfieldElementT

Bitfield element template for atomic ordering at bit offset Offset.

BoolBitfieldElementT

Bitfield element template for a single boolean flag at bit offset Offset.

CallInstReservedField

Bitfield element reserving bits used by CallInst subclass data.

CallingConvField

Bitfield element storing the call's calling convention.

OpaqueField

Opaque 16‐bit bitfield covering the full Instruction subclass data.

Protected Enums

Name

Description

Unnamed enum

The number of operands in the subclass.

Protected Member Functions

Name

Description

Op

Op overloads

addMetadata

addMetadata overloads

allocHungoffUses

Allocate the array of Uses, followed by a pointer (with bottom bit set) to the User.

clearMetadata

Erase all metadata attached to this Value.

cloneImpl

Create a copy of this instruction without inserting it into a block.

eraseMetadata

Erase all metadata attachments with the given kind.

eraseMetadataIf

Erase all metadata attachments matching the given predicate.

getAllMetadata

Append all metadata attached to this value into MDs.

getMetadata

Get the current metadata attachments for the given kind, if any.

getMetadataImpl

Get metadata for the given kind, if any.

getNumSubclassExtraOperands

Return how many extra operands this call subclass stores after the callee.

getNumSubclassExtraOperandsDynamic

Get the number of extra operands for instructions that don't have a fixed number of extra operands.

getSubclassData

Read a bitfield element from this instruction's subclass data.

getSubclassDataFromValue

Return the opaque subclass data bits stored in this value.

growHungoffUses

Grow the number of hung off uses. Note that allocHungoffUses should be called if there are no uses.

hasDescriptor

Return true if this call has an attached descriptor (operand‐bundle info).

operator new

New operators

setMetadata

setMetadata overloads

setSubclassData

Store a bitfield element into this instruction's subclass data.

setValueSubclassData

Set the opaque subclass data bits stored in this value.

Protected Static Member Functions

Name

Description

CountBundleInputs

Return the total number of bundle input values in Bundles.

OpFrom

Return the operand Use at compile‐time index Idx from that.

Protected Data Members

Name

Description

Attrs

parameter attributes for callable

FMF

Fast‐math flags stored by the instruction.

FTy

Function type of the call (return type, parameter types, varargs).

HasDescriptor

True if this value has a descriptor.

HasHungOffUses

Whether operands are stored in a separately allocated array.

HasName

True if this value has a name in the symbol table.

IsUsedByMD

True if metadata references this value.

NumUserOperands

Number of operands in this user.

SubclassOptionalData

Hold arbitary subclass data.

Protected Static Data Members

Name

Description

CalledOperandOpEndIdx

The last operand is the called operand.

Protected Using Declarations

Name

Description

CallBase

Inherit Instruction constructors for call‐like subclasses.

Non-Member Functions

Name

Description

CanInlineCallSite

Check if it is legal to perform inlining of the function called by CB into the caller at this particular use, and sets fields in IFI.

ComputeMaxSignificantBits

Get the upper bound on bit size for this Value Op as a signed integer.

ComputeNumSignBits

Return the number of times the sign bit of the register is replicated into the other bits.

ConstantFoldCall

Attempt to constant fold a call to the specified function with the specified arguments, returning null if unsuccessful.

ConstantFoldInstOperands

Attempt to constant fold an instruction with the specified operands.

ConstantFoldInstruction

Try to constant fold the specified instruction.

DemoteRegToStack

Demote an instruction's virtual register to a stack slot.

ExtractTypeInfo

ExtractTypeInfo ‐ Returns the type info, possibly bitcast, encoded in V.

FindEarliestCapture

Find the earliest instruction that captures V in F.

FindInsertedValue

Given an aggregate and a sequence of indices, see if the scalar value indexed is already around as a register.

GetPointerBaseWithConstantOffset

Analyze the specified pointer to see if it can be expressed as a base pointer plus a constant offset. Return the base and offset to the caller.

GetPointerBaseWithConstantOffset

Const overload of GetPointerBaseWithConstantOffset.

GetStringLength

If we can compute the length of the string pointed to by the specified pointer, return 'len+1'. If we can't, return 0.

InlineFunction

Inline CB while also updating a contextual profile.

InlineFunction

Inline the callee of CB into its caller's basic block.

InlineFunctionImpl

This should generally not be used, use InlineFunction instead.

MapValue

Look up or compute a value in the value map.

MaskedValueIsZero

Return true if 'V & Mask' is known to be zero. We use this predicate to simplify operations downstream. Mask is known to be zero for bits that V cannot have.

PointerMayBeCaptured

Visit a pointer and derived values to find capturing uses.

PointerMayBeCaptured

Return which components of the pointer may be captured.

PointerMayBeCaptured

Return true if this pointer may be captured by the enclosing function.

PointerMayBeCapturedBefore

Return true if this pointer may be captured before a given instruction.

PointerMayBeCapturedBefore

Return which components of the pointer may be captured on the path to I.

RecursivelyDeleteTriviallyDeadInstructions

Recursively delete a trivially dead instruction and its dead operands.

RemapInstruction

Convert the instruction operands from referencing the current values into those specified by VM.

RemapSourceAtom

Remap the source‐location atom of instruction I.

ReplaceInstWithInst

Replace one instruction with another and copy its debug location.

SplitBlockAndInsertForEachLane

Invoke a callback once for each lane up to an effective vector length.

SplitBlockAndInsertIfElse

Split a block and insert an else‐branch at an instruction.

SplitBlockAndInsertIfElse

Split a block and insert a conditional else‐branch around the split point.

SplitBlockAndInsertIfThen

Split a block and insert a then‐branch at an instruction.

SplitBlockAndInsertIfThen

Split a block and insert a conditional then‐branch around the split point.

SplitBlockAndInsertIfThenElse

Split a block and insert optional then/else blocks around the split point.

SplitBlockAndInsertIfThenElse

Split a block and insert optional then/else blocks at an instruction.

SplitBlockAndInsertIfThenElse

Split a block and insert both then and else branches around the split point.

SplitBlockAndInsertIfThenElse

Split a block and insert then/else branches at an instruction.

SplitBlockAndInsertSimpleForLoop

Insert a simple counted for‐loop at a split point.

SplitCriticalEdge

Split a critical edge from a terminator to one of its successors.

SplitKnownCriticalEdge

Split an edge that is already known to be critical.

UpgradeIntrinsicCall

This is the complement to the above, replacing a specific call to an intrinsic function with a call to the specified new function.

adaptNoAliasScopes

Adapt an instruction's noalias metadata using a scope map.

addAssumptions

Appends the set of assumptions Assumptions to CB.

addDiffRuntimeChecks

Add runtime checks that compare pointer differences against a distance.

addRuntimeChecks

Add code that checks at runtime if the accessed arrays in PointerChecks overlap. Returns the final comparator value or NULL if no check is needed.

applyProfMetadataIfEnabled

Apply a metadata callback if V is an instruction and profiling is enabled.

assumeBundleImpliesNonNull

Return true if the given assume operand bundle implies that Val is non‐null.

buildAssumeFromInst

Build an llvm.assume call preserving information derived from an instruction.

callsGCLeafFunction

Return true if this call calls a GC leaf function.

canConstantFoldCallTo

Return true if it is even possible to fold a call to the specified function.

canInstructionHaveMMRAs

Return true if I can have !mmra metadata.

canReplaceOperandWithVariable

Return true if an operand may legally be replaced with a variable.

canReplacePointersIfEqual

Returns true if pointer From can be replaced with equal pointer To.

canSinkOrHoistInst

Return true if I may legally be sunk or hoisted, ignoring faults.

cannotBeNegativeZero

Return true if we can prove that the specified FP value is never equal to ‐0.0. Users should use caution when considering PreserveSign denormal‐fp‐math.

cannotBeOrderedLessThanZero

Return true if we can prove that the specified FP value is either NaN or never less than ‐0.0.

changeToInvokeAndSplitBasicBlock

Convert a call into an invoke and split its basic block.

changeToUnreachable

Insert unreachable before an instruction and make the rest of the block dead.

classifyEHPersonality

See if the given exception handling personality function is one that we understand. If so, return a description of it; otherwise return Unknown.

collectPossibleValues

Enumerate immediate constant values of V into Constants.

combineAAMetadata

Combine alias‐analysis metadata after merging memory accesses.

combineMetadataForCSE

Combine metadata so one instruction can replace another after CSE.

computeConstantRange

Determine the possible constant range of an integer or vector of integer value. This is intended as a cheap, non‐recursive check.

computeKnownBits

Returns the known bits rather than passing by reference.

computeKnownBits

Determine which bits of V are known to be either zero or one and return them in the KnownZero/KnownOne bit sets.

computeKnownBits

Returns the known bits rather than passing by reference.

computeKnownBits

Compute known bits for the demanded elements of V using Q.

computeKnownBits

Compute known bits for V into Known using the simplify query Q.

computeKnownBits

Compute known bits for V using the simplify query Q.

computeKnownBitsFromContext

Merge bits known from context‐dependent facts into Known.

computeKnownFPClass

Wrapper to account for known fast math flags at the use instruction.

computeKnownFPClass

Determine known floating‐point classes for V.

computeKnownFPClass

Wrapper to account for known fast math flags at the use instruction.

computeKnownFPClass

Determine which floating‐point classes are valid for V, and return them in KnownFPClass bit sets.

computeKnownFPClass

Determine known floating‐point classes for V using explicit analysis context.

computeKnownFPSignBit

Return the known sign bit of a floating‐point value, if provable.

computeOverflowForSignedMul

Compute whether a signed multiply of LHS and RHS can overflow.

computeOverflowForSignedSub

Compute whether a signed subtract of LHS and RHS can overflow.

computeOverflowForUnsignedMul

Compute whether an unsigned multiply of LHS and RHS can overflow.

computeOverflowForUnsignedSub

Compute whether an unsigned subtract of LHS and RHS can overflow.

createMemCpyLoopKnownSize

Emit a loop implementing llvm.memcpy when the size is a constant.

createMemCpyLoopUnknownSize

Emit a loop implementing llvm.memcpy when the size is not a constant.

decomposeBitTest

Decompose an icmp into the form ((X & Mask) pred C) if possible.

decomposeBitTestICmp

Decompose an icmp into the form ((X & Mask) pred C) if possible.

diagnoseDontCall

Emit a dontcall diagnostic for call instruction CI.

dropDebugUsers

Remove debug intrinsic instructions for a given instruction.

emitBCmp

Emit a call to the bcmp function.

emitBinaryFloatFnCall

Emit a call to the binary floating‐point libcall named Name.

emitBinaryFloatFnCall

Emit a call to the binary DoubleFn, FloatFn, or LongDoubleFn for Op1's type.

emitCalloc

Emit a call to the calloc function.

emitFPutC

Emit a call to fputc with an int Char and a FILE pointer.

emitFPutS

Emit a call to fputs with a string pointer and a FILE pointer.

emitFWrite

Emit a call to fwrite with a pointer, size_t Size, and FILE pointer.

emitHotColdNew

Emit a call to the hot/cold operator new function.

emitHotColdNewAligned

Emit a call to the hot/cold aligned operator new function.

emitHotColdNewAlignedNoThrow

Emit a call to the hot/cold aligned nothrow operator new function.

emitHotColdNewNoThrow

Emit a call to the hot/cold nothrow operator new function.

emitHotColdSizeReturningNew

Emit a call to the hot/cold size‐returning operator new function.

emitHotColdSizeReturningNewAligned

Emit a call to the hot/cold size‐returning aligned operator new function.

emitMalloc

Emit a call to the malloc function.

emitMemCCpy

Emit a call to the memccpy function.

emitMemChr

Emit a call to memchr with a pointer, int Val, and size_t Len.

emitMemCmp

Emit a call to the memcmp function.

emitMemCpyChk

Emit a call to __memcpy_chk with size_t Len/ObjSize and pointer Dst/Src.

emitMemPCpy

Emit a call to the mempcpy function.

emitMemRChr

Emit a call to the memrchr function, analogously to emitMemChr.

emitPutChar

Emit a call to putchar, assuming Char is an int.

emitPutS

Emit a call to puts, assuming Str is some pointer.

emitSNPrintf

Emit a call to the snprintf function.

emitSPrintf

Emit a call to the sprintf function.

emitStpCpy

Emit a call to stpcpy for the specified pointer arguments.

emitStpNCpy

Emit a call to stpncpy for the specified pointer arguments and length.

emitStrCat

Emit a call to the strcat function.

emitStrChr

Emit a call to strchr for the specified pointer and character.

emitStrCpy

Emit a call to strcpy for the specified pointer arguments.

emitStrDup

Emit a call to strdup for the specified pointer.

emitStrLCat

Emit a call to the strlcat function.

emitStrLCpy

Emit a call to the strlcpy function.

emitStrLen

Emit a call to strlen for the specified pointer.

emitStrNCat

Emit a call to the strncat function.

emitStrNCmp

Emit a call to the strncmp function to the builder.

emitStrNCpy

Emit a call to strncpy for the specified pointer arguments and length.

emitUnaryFloatFnCall

Emit a call to the unary DoubleFn, FloatFn, or LongDoubleFn for Op's type.

emitUnaryFloatFnCall

Emit a call to the unary floating‐point libcall named Name.

emitVSNPrintf

Emit a call to the vsnprintf function.

emitVSPrintf

Emit a call to the vsprintf function.

emitWcsLen

Emit a call to wcslen for the specified pointer.

extractBranchWeights

Extract branch weights attatched to an Instruction

extractBranchWeights

Extract branch weights from a conditional branch or select Instruction.

extractProbe

Extract the pseudo probe stored on Inst, if present.

extractProfTotalWeight

Retrieve the total of all weights from an instruction.

extractWidenableCondition

Returns the widenable condition in U's expression tree, if uniquely used.

findAllocaForValue

Const overload of findAllocaForValue.

findAllocaForValue

Returns unique alloca where the value comes from, or nullptr. If OffsetZero is true check that V points to the begining of the alloca.

findDVRDeclareValues

As above, for DVRDeclareValues.

findDVRDeclares

Finds dbg.declare records declaring local variables as living in the memory that 'V' points to.

findDVRValues

As above, for DVRValues.

findDbgUsers

Finds the debug info records describing a value.

findDbgValues

Finds the dbg.values describing a value.

findScalarElement

Given a vector and an element number, see if the scalar value is already around as a register, for example if it were inserted then extracted from the vector.

findValuesAffectedByCondition

Call InsertAffected on all Values whose known bits / value may be affected by the condition Cond. Used by AssumptionCache and DomConditionCache.

forEachCallbackCallSite

Apply function Func to each CB's callback call site.

forEachCallbackFunction

Apply function Func to each CB's callback function.

funcReturnsFirstArgOfCall

Returns true if the parent of CI returns CI's first argument after calling CI.

gep_type_begin

Return a begin iterator over the types indexed by GEP GEP.

gep_type_begin

Return a begin iterator over the types indexed by GEP GEP.

gep_type_end

Return the end iterator for types indexed by GEP GEP.

gep_type_end

Return the end iterator for types indexed by GEP GEP.

getAllocAlignment

Gets the alignment argument for an aligned_alloc‐like function.

getAllocSize

Return the size of the requested allocation.

getAllocationFamily

If a function is part of an allocation family (e.g. malloc/realloc/calloc/free), return the identifier for its family of functions.

getArgumentAliasingToReturnedPointer

Return the call pointer argument that aliasing rules treat as the returned pointer.

getArgumentAliasingToReturnedPointer

Non‐const overload of getArgumentAliasingToReturnedPointer.

getAssumptions

Return the set of all assumptions for the call CB.

getAtomicSyncScopeID

Return the sync scope of atomic instruction I, or nullopt if not atomic.

getAttributeBasedInliningDecision

Decide inlining from user directives and viability, without cost modeling.

getBaseObjectSize

Like getObjectSize(), but only for base objects.

getBranchWeightMDNode

Get the branch weights metadata node

getConstantDataArrayInfo

Returns true if the value V is a pointer into a ConstantDataArray. If successful Slice will point to a ConstantDataArray info object with an appropriate offset.

getConstantStringInfo

Compute the contents of a null‐terminated C string pointed to by V.

getConstrainedIntrinsicID

Return the constrained intrinsic ID for an instruction under strictfp.

getDeinterleavedVectorType

Given a deinterleaveN intrinsic, return the (narrow) vector type of each factor.

getFreedOperand

If this if a call to a free function, return the freed operand.

getInitialValueOfAllocation

If this is a call to an allocation function that initializes memory to a fixed value, return said value in the requested type. Otherwise, return nullptr.

getInlineCost

Get an InlineCost object representing the cost of inlining this callsite.

getInlineCost

Get an InlineCost with the callee explicitly specified.

getInliningCostEstimate

Get the cost estimate ignoring thresholds.

getInliningCostFeatures

Get the expanded cost features. The features are returned unconditionally, even if inlining is impossible.

getIntrinsicForCallSite

Map a call instruction to an intrinsic ID. Libcalls which have equivalent intrinsics are treated as‐if they were intrinsics.

getKnowledgeForValue

Return a valid Knowledge associated to the Value V if its Attribute kind is in AttrKinds and it matches the Filter.

getKnowledgeValidInContext

Return a valid Knowledge associated to the Value V if its Attribute kind is in AttrKinds and the knowledge is suitable to be used in the context of CtxI.

getKnownAlignment

Infer a known alignment for the specified pointer.

getLoadStoreAddressSpace

Return the address space of the pointer operand of load or store I.

getLoadStoreAlignment

Return the alignment of load or store instruction I.

getLoadStorePointerOperand

Return the pointer operand of a load or store, or null if V is neither.

getLoadStorePointerOperand

Return the pointer operand of a load or store, or null if V is neither.

getLoadStoreType

Return the value type accessed by load or store instruction I.

getMemCacheHintMetadata

Return the cache hint metadata node for a memory operand.

getMetadataToPropagate

Collect metadata from Inst that can be preserved after vectorization.

getObjectSize

Compute the size of the object pointed by Ptr.

getOrEnforceKnownAlignment

Return a known alignment for a value, optionally raising it first.

getPointerOperand

Return the pointer operand of a load, store, or GEP, or null otherwise.

getPointerOperand

Non‐const overload of getPointerOperand.

getReallocatedOperand

If this is a call to a realloc function, return the reallocated operand.

getSplatValue

Get splat value if the input is a splat vector or return nullptr.

getStringFnAttrAsInt

Parse a function string attribute on CB as a decimal integer.

getUnderlyingObject

Strip GEP adjustments, pointer casts, and threadlocal.address from V.

getUnderlyingObject

Non‐const overload of getUnderlyingObject.

getUnderlyingObjectAggressive

Like getUnderlyingObject(), but will try harder to find a single underlying object. In particular, this function also looks through selects and phis.

getUnderlyingObjects

This method is similar to getUnderlyingObject except that it can look through phi and select instructions and return multiple objects.

getUnderlyingObjectsForCodeGen

This is a wrapper around getUnderlyingObjects and adds support for basic ptrtoint+arithmetic+inttoptr sequences.

getValidBranchWeightMDNode

Get the valid branch weights metadata node

getValueProfDataFromInst

Extract value‐profile data annotated on instruction Inst.

getVectorIntrinsicIDForCall

Return the intrinsic ID mapped from a call, or not_intrinsic.

handleUnreachableTerminator

Replace instruction operands of an unreachable terminator with poison.

hasAssumption

Return true if CB or the callee has the assumption AssumptionStr attached.

hasBranchWeightMD

Checks if an instructions has Branch Weight Metadata

hasBranchWeightOrigin

Check if Branch Weight Metadata has an "expected" field from an llvm.expect* intrinsic

hasExplicitlyUnknownBranchWeights

Check whether I has explicitly‐unknown branch‐weight metadata.

hasProfMD

Checks if an Instruction has MD_prof Metadata

hasValidBranchWeightMD

Checks if an instructions has valid Branch Weight Metadata

impliesPoison

Return true if V is poison given that ValAssumedPoison is already poison.

intersectAccessGroups

Compute the intersection of access groups on two instructions.

invertCondition

Invert a boolean condition, reusing an existing inverted copy when possible.

isAllocLikeFn

Tests if a value is a call or invoke to a library function that allocates memory (either malloc, calloc, or strdup like).

isAllocationFn

Tests if a value is a call or invoke to a library function that allocates or reallocates memory (either malloc, calloc, realloc, or strdup like).

isAllocationFn

Tests if a value is a call or invoke to a library function that allocates or reallocates memory (either malloc, calloc, realloc, or strdup like).

isAssumeLikeIntrinsic

Return true if it is an intrinsic that cannot be speculated but also cannot trap.

isBaseOfObject

Return true if V is known to be the base of its memory object.

isBytewiseValue

If the specified value can be set by repeating the same byte in memory, return the i8 value that it is represented with.

isCFGuardCall

Return true if CB is a Control Flow Guard check or dispatch call.

isCheckForZeroAndMulWithOverflow

Return true if Op0 and Op1 match a zero check with mul‐with‐overflow.

isCheckForZeroAndMulWithOverflow

Return true if Op0 and Op1 match a zero check with mul‐with‐overflow.

isConsecutiveAccess

Returns true if the memory operations A and B are consecutive. This is a simple API that does not depend on the analysis pass.

isCriticalEdge

Return true if the specified edge is a critical edge.

isCriticalEdge

Return true if the edge from TI to Succ is a critical edge.

isDereferenceableAndAlignedPointer

Returns true if V is always a dereferenceable pointer with sufficient alignment.

isDereferenceableAndAlignedPointer

Returns true if V is always dereferenceable for Size bytes with sufficient alignment.

isDereferenceablePointer

Equivalent to isDereferenceableAndAlignedPointer with an alignment of 1.

isDereferenceablePointer

Equivalent to isDereferenceableAndAlignedPointer with an alignment of 1.

isEscapeSource

Returns true if the pointer is one which would have been considered an escape by isNotCapturedBefore.

isGuaranteedNotToBePoison

Iterator‐context overload of isGuaranteedNotToBePoison.

isGuaranteedNotToBePoison

Returns true if V cannot be poison, but may be undef.

isGuaranteedNotToBeUndef

Returns true if V cannot be undef, but may be poison.

isGuaranteedNotToBeUndefOrPoison

Return true if this function can prove that V does not have undef bits and is never poison.

isGuaranteedToExecuteForEveryIteration

Return true if this function can prove that the instruction I is executed for every iteration of the loop L.

isGuaranteedToTransferExecutionToSuccessor

Return true if instruction I always transfers execution to a successor.

isGuard

Returns true iff U has semantics of a guard expressed in a form of call of llvm.experimental.guard intrinsic.

isGuardAsWidenableBranch

Returns true iff U has semantics of a guard expressed in a form of a widenable conditional branch to deopt block.

isIdentifiedFunctionLocal

Return true if V is unambiguously identified at the function level.

isIdentifiedObject

Return true if this pointer refers to a distinct and identifiable object.

isImpliedByDomCondition

Return the boolean condition value in the context of the given instruction if it is known based on dominating conditions.

isImpliedCondition

Return whether a compare is implied true or false by LHS, if known.

isImpliedCondition

Return whether RHS is implied true or false by LHS, if known.

isInTailCallPosition

Test whether an instruction is in a position for tail‐call optimization.

isInstructionTriviallyDead

Return true if an unused instruction is trivially dead.

isIntrinsicReturningPointerAliasingArgumentWithoutCapturing

Return true if Call is an intrinsic that returns a pointer aliasing an argument without capturing it otherwise.

isKnownIntegral

Return true if the floating‐point value V is known to be an integer value.

isKnownInversion

Return true iff: 1. X is poison implies Y is poison. 2. X is true implies Y is false. 3. X is false implies Y is true. Otherwise, return false.

isKnownNegation

Return true if the two given values are negation.

isKnownNegative

Returns true if the given value is known be negative (i.e. non‐positive and non‐zero).

isKnownNeverInfOrNaN

Return true if the floating‐point value can never contain a NaN or infinity.

isKnownNeverInfinity

Return true if the floating‐point scalar value is not an infinity or if the floating‐point vector value has no infinities.

isKnownNeverNaN

Return true if the floating‐point scalar value is not a NaN or if the floating‐point vector value has no NaN elements.

isKnownNonEqual

Return true if the given values are known to be non‐equal when defined. Supports scalar integer types only.

isKnownNonNegative

Returns true if the give value is known to be non‐negative.

isKnownNonZero

Return true if the given value is known to be non‐zero when defined.

isKnownPositive

Returns true if the given value is known be positive (i.e. non‐negative and non‐zero).

isKnownToBeAPowerOfTwo

Return true if the given value is known to have exactly one bit set when defined.

isKnownToBeAPowerOfTwo

Return true if V is known to be a power of two when defined.

isLegalToPromote

Return true if the given indirect call site can be made to call Callee.

isMathLibCallNoop

Check whether the given call has no side‐effects. Specifically checks for math routimes which sometimes set errno.

isNoAliasCall

Return true if this pointer is returned by a noalias function.

isNotCrossLaneOperation

Return true if the instruction doesn't potentially cross vector lanes.

isNotVisibleOnUnwind

Return true if Object memory is not visible after an unwind.

isOnlyUsedInZeroComparison

Return true if CxtI is only used in comparisons against zero.

isOnlyUsedInZeroEqualityComparison

Return true if CxtI is only used in equality comparisons against zero.

isPotentiallyReachable

Determine whether instruction 'To' is reachable from 'From', without passing through any blocks in ExclusionSet, returning true if uncertain.

isReachedBefore

Return true if I0 is reached before I1 in the control flow.

isRemovableAlloc

Return true if this is a call to a removable allocation function.

isSafeToLoadUnconditionally

Return true if we know that executing a load from this value cannot trap.

isSafeToLoadUnconditionally

Return true if we know that executing a load from this value cannot trap.

isSafeToMoveBefore

Return true if I can be safely moved before InsertPoint.

isSafeToSpeculativelyExecute

Return true if the instruction does not have any effects besides calculating the result and does not have undefined behavior.

isSafeToSpeculativelyExecute

Iterator‐context overload of isSafeToSpeculativelyExecute.

isSafeToSpeculativelyExecuteWithVariableReplaced

Don't use information from its non‐constant operands. This helper is used when its operands are going to be replaced.

isSplatValue

Return true if each element of V is poisoned or equal to the others.

isValidAssumeForContext

Return true if assume I is valid for the context in simplify query Q.

isValidAssumeForContext

Return true if assume I is valid to use at context instruction CxtI.

isWidenableBranch

Returns true iff U is a widenable branch (that is, extractWidenableCondition returns widenable condition).

isWidenableCondition

Returns true iff V has semantics of llvm.experimental.widenable.condition call.

isWritableObject

Return true if Object is writable without trapping.

lowerObjectSizeCall

Try to turn a call to @llvm.objectsize into an integer value.

lowerObjectSizeCall

Try to turn a call to @llvm.objectsize into an integer value.

maskContainsAllOneOrUndef

Return true if any lane of an i1 mask is known true or undef.

matchSelectPattern

Const overload of matchSelectPattern.

matchSelectPattern

Pattern match integer [SU]MIN, [SU]MAX and ABS idioms, returning the kind and providing the out parameter results if we successfully match.

matchSimpleBinaryIntrinsicRecurrence

Match a simple binary‐intrinsic value‐accumulating recurrence.

matchSimpleTernaryIntrinsicRecurrence

Match a simple ternary‐intrinsic value‐accumulating recurrence.

mayHaveMemprofSummary

Returns true if the instruction could have memprof metadata, used to ensure consistency between summary analysis and the ThinLTO backend processing.

mayHaveNonDefUseDependency

Returns true if the result or effects of the given instructions I depend values not reachable through the def use graph.

maybeMarkSanitizerLibraryCallNoBuiltin

Mark known string library calls with NoBuiltin for sanitizer interception.

mustExecuteUBIfPoisonOnPathTo

Return true if poison from Root would force UB on the path to OnPathTo.

mustTriggerUB

Return true if I must trigger UB when any of KnownPoison is poison.

onlyUsedByLifetimeMarkers

Return true if the only users of this pointer are lifetime markers.

onlyUsedByLifetimeMarkersOrDroppableInsts

Return true if the only users of this pointer are lifetime markers or droppable instructions.

parseWidenableBranch

Parses a widenable branch and returns Uses so they can be modified.

parseWidenableBranch

Parses a widenable branch and returns its condition, widenable condition, and successor blocks.

parseWidenableGuard

Collects the individual checks from a widenable guard's condition.

patchReplacementInstruction

Relax a replacement so it is no more restrictive than the original.

possiblyDemandedEltsInMask

Return an APInt of active lanes for a <Y x i1> mask.

programUndefinedIfPoison

Return true if a poison result from Inst implies program undefined behavior.

programUndefinedIfUndefOrPoison

Return true if this function can prove that if Inst is executed and yields a poison value or undef bits, then that will trigger undefined behavior.

promoteCall

Promote the given indirect call site to unconditionally call Callee.

promoteCallWithIfThenElse

Promote the given indirect call site to conditionally call Callee. The promoted direct call instruction is predicated on `CB.getCalledOperand() == Callee`.

promoteCallWithIfThenElse

Promote an indirect call conditionally while updating contextual profiles.

promoteCallWithVTableCmp

This is similar to promoteCallWithIfThenElse except that the condition to promote a virtual call is that VPtr is the same as any of AddressPoints.

propagateIRFlags

Intersect IR flags from scalar ops VL onto vector op I.

propagateMetadata

Propagate common metadata from VL onto instruction I.

recognizeBSwapOrBitReverseIdiom

Match a bswap or bitreverse idiom and replace it with an intrinsic.

replaceAllDbgUsesWith

Retarget or salvage debug users when replacing a value that will be deleted.

replaceAndRecursivelySimplify

Replace all uses of 'I' with 'SimpleV' and simplify the uses recursively.

replaceDbgDeclare

Replace a dbg.declare when its address is replaced.

replaceDominatedUsesWith

Replace uses dominated by an edge with another value.

replaceDominatedUsesWith

Replace uses dominated by an instruction with another value.

replaceDominatedUsesWith

Replace uses dominated by a block's end with another value.

replaceDominatedUsesWithIf

Conditionally replace uses dominated by an instruction with another value.

replaceDominatedUsesWithIf

Conditionally replace uses dominated by a block's end with another value.

replaceDominatedUsesWithIf

Conditionally replace uses dominated by an edge with another value.

replaceNonLocalUsesWith

Replace non‐local uses of an instruction with another value.

salvageDebugInfo

Salvage debug records that use an instruction before it is deleted.

salvageDebugInfoForDbgValues

Salvage a specific set of debug records that use an instruction.

salvageDebugInfoImpl

Append an instruction's effect to a salvaged DIExpression operand list.

salvageKnowledge

Insert an llvm.assume before an instruction to salvage its derived knowledge.

scaleProfData

Scaling the profile data attached to 'I' using the ratio of S/T.

setAtomicSyncScopeID

Set the sync scope of atomic instruction I.

setBranchWeights

Create a new branch_weights metadata node and add or overwrite a prof metadata reference to instruction I.

setExplicitlyUnknownBranchWeights

Specify that this terminator's branch weights are unknown at compile time.

setExplicitlyUnknownBranchWeightsIfProfiled

Set unknown branch weights only if the parent function has an entry count.

setFittedBranchWeights

Variant of setBranchWeights where the Weights will be fit first to uint32_t by shifting right.

setInlineRemark

Set the inline‐remark attribute on call site CB.

setLoadStoreAlignment

Set the alignment of load or store instruction I.

setProbeDistributionFactor

Set the distribution factor of the pseudo probe on Inst.

setProfMetadata

Attach branch‐weight profile metadata to a terminator or select.

setUnwindEdgeTo

Sets the unwind edge of an instruction to a particular successor.

shouldInline

Return the inline cost when the inliner should attempt CB, else nullopt.

simplifyAShrInst

Given operands for a AShr, fold the result or return nulll.

simplifyAddInst

Given operands for an Add, fold the result or return null.

simplifyAndInst

Given operands for an And, fold the result or return null.

simplifyCall

Given a callsite, callee, and arguments, fold the result or return null.

simplifyConstrainedFPCall

Given a constrained FP intrinsic call, tries to compute its simplified version.

simplifyExtractElementInst

Given operands for an ExtractElementInst, fold the result or return null.

simplifyExtractValueInst

Given operands for an ExtractValueInst, fold the result or return null.

simplifyFAddInst

Given operands for an FAdd, fold the result or return null.

simplifyFDivInst

Given operands for an FDiv, fold the result or return null.

simplifyFMAFMul

Given operands for the multiplication of a FMA, fold the result or return null.

simplifyFMulInst

Given operands for an FMul, fold the result or return null.

simplifyFNegInst

Given operand for an FNeg, fold the result or return null.

simplifyFRemInst

Given operands for an FRem, fold the result or return null.

simplifyFSubInst

Given operands for an FSub, fold the result or return null.

simplifyFreezeInst

Given an operand for a Freeze, see if we can fold the result.

simplifyInsertElementInst

Given operands for an InsertElement, fold the result or return null.

simplifyInsertValueInst

Given operands for an InsertValueInst, fold the result or return null.

simplifyInstruction

See if we can compute a simplified version of this instruction.

simplifyInstructionWithOperands

Like simplifyInstruction but the operands of I are replaced with NewOps.

simplifyLShrInst

Given operands for a LShr, fold the result or return null.

simplifyMulInst

Given operands for a Mul, fold the result or return null.

simplifyOrInst

Given operands for an Or, fold the result or return null.

simplifySDivInst

Given operands for an SDiv, fold the result or return null.

simplifySRemInst

Given operands for an SRem, fold the result or return null.

simplifySelectInst

Given operands for a SelectInst, fold the result or return null.

simplifyShlInst

Given operands for a Shl, fold the result or return null.

simplifyShuffleVectorInst

Given operands for a ShuffleVectorInst, fold the result or return null.

simplifySubInst

Given operands for a Sub, fold the result or return null.

simplifyUDivInst

Given operands for a UDiv, fold the result or return null.

simplifyURemInst

Given operands for a URem, fold the result or return null.

simplifyWithOpReplaced

See if V simplifies when its operand Op is replaced with RepOp.

simplifyXorInst

Given operands for an Xor, fold the result or return null.

stripNullTest

Const overload of stripNullTest.

stripNullTest

Returns the inner value X if the expression has the form f(X) where f(X) == 0 if and only if X == 0, otherwise returns nullptr.

succ_begin

Return a const iterator to the first successor of terminator I.

succ_begin

Return an iterator to the first successor of terminator I.

succ_empty

Return true if I's terminator has no successor blocks.

succ_end

Return the end iterator for successors of terminator I.

succ_end

Return a const end iterator for successors of terminator I.

succ_size

Return the number of successors of terminator I.

successors

Return a const range of successor basic blocks of terminator I.

successors

Return a range of successor basic blocks of terminator I.

tryEnforceAlignment

Try to raise a controlled object's alignment to a preferred value.

tryPromoteCall

Try to promote (devirtualize) a virtual call on an Alloca. Return true on success.

updateLoopMetadataDebugLocations

Update debug locations in any MD_loop metadata attached to I.

versionCallSite

Predicate and clone the given call site.

willNotFreeBetween

Returns true, if no instruction between Assume and CtxI may free (including through synchronization).

wouldInstructionBeTriviallyDead

Return true if an instruction would be trivially dead with no uses.

wrap

Wrap an array of Value pointers as opaque LLVMValueRef values.

wrap

Convert a Value pointer to an opaque LLVMValueRef.

AA::getWithType

Try to convert V to type Ty without introducing new instructions.

AA::isValidInScope

Return true if V is a valid value in Scope, that is a constant or an instruction/argument of Scope.

PatternMatch::m_AnyIntrinsic

Match any intrinsic call, capturing it if we match.

PatternMatch::m_AnyIntrinsic

Match any const intrinsic call, capturing it if we match.

PatternMatch::m_Deferred

Match a deferred const Value* determined later in the same match expression.

PatternMatch::m_Deferred

Match a deferred Value* determined later in the same match expression.

PatternMatch::m_Instruction

Match an instruction, capturing it if we match.

PatternMatch::m_Instruction

Match a const instruction, capturing it if we match.

PatternMatch::m_Instruction

Match against the nested pattern, and capture the instruction if we match.

PatternMatch::m_Instruction

Match against the nested pattern, and capture the instruction if we match.

PatternMatch::m_Specific

Match if we have a specific specified value.

PatternMatch::m_Value

Match against the nested pattern, and capture the value if we match.

PatternMatch::m_Value

Match a const value, capturing it if we match.

PatternMatch::m_Value

Match against the nested pattern, and capture the value if we match.

PatternMatch::m_Value

Match a value, capturing it if we match.

VFABI::getVectorVariantNames

Populate VariantMappings with Vector Function ABI variant names for CI.

VFABI::setVectorVariantNames

Overwrite the Vector Function ABI variants attribute with the names provide in VariantMappings.

VNCoercion::canCoerceMustAliasedValueToLoad

Return true if CoerceAvailableValueToLoadType would succeed if it was called.

VNCoercion::coerceAvailableValueToLoadType

Try to coerce a stored value to a must‐aliased load of a different type.

VNCoercion::getValueForLoad

Extract bits for a load from a clobbering store or load at a given offset.

at::deleteAssignmentMarkers

Delete the llvm.dbg.assign intrinsics linked to Inst.

at::getDVRAssignmentMarkers

Return a range of dbg_assign records for which Inst performs the assignment they encode.

coro::isTriviallyMaterializable

Return true if I is trivially rematerializable.

dxil::getResourceNameFromBindingCall

Return the resource name from a handle‐from‐binding call.

instrumentor::evaluateFilter

Evaluate a filter expression for an instrumentation opportunity.

memprof::addAmbiguousAttribute

Adds an "ambiguous" memprof attribute to call with a matched allocation profile but that we haven't yet been able to disambiguate.

memprof::removeAnyExistingAmbiguousAttribute

Removes any existing "ambiguous" memprof attribute. Called before we apply a specific allocation type such as "cold", "notcold", or "hot".

memtag::getUntagLocationIfFunctionExit

Return the instruction at which stack untagging should run for a function exit, or null if Inst is not such an exit.

misexpect::checkBackendInstrumentation

Check backend instrumentation against llvm.expect thresholds.

misexpect::checkExpectAnnotations

Check expect annotations against PGO counters for frontend or backend use.

misexpect::checkFrontendInstrumentation

Check frontend instrumentation against llvm.expect thresholds.

misexpect::verifyMisExpect

veryifyMisExpect ‐ compares RealWeights to the thresholds used for llvm.expect and warns if the PGO counters are outside of the expected range.

objcarc::GetARCInstKind

Map V to its ARCInstKind equivalence class.

objcarc::GetArgRCIdentityRoot

Assuming the given instruction is one of the special calls such as objc_retain or objc_release, return the RCIdentity root of the argument of the call.

objcarc::GetBasicARCInstKind

Determine which objc runtime call instruction class V belongs to.

objcarc::GetCallSiteClass

Helper for GetARCInstKind. Determines what kind of construct CS is.

objcarc::GetRCIdentityRoot

Return the RCIdentity root of value V.

objcarc::GetRCIdentityRoot

Return the non‐const RCIdentity root of value V.

objcarc::GetUnderlyingObjCPtr

Return the underlying ObjC object pointer for V.

objcarc::GetUnderlyingObjCPtrCached

A wrapper for GetUnderlyingObjCPtr used for results memoization.

objcarc::IsNoopInstruction

Return true if I is a bitcast or a zero‐index GEP.

objcarc::IsNullOrUndef

Return true if V is a null pointer constant or undef.

objcarc::IsObjCIdentifiedObject

Return true if this value refers to a distinct and identifiable object.

objcarc::IsPotentialRetainableObjPtr

Test whether Op may be a retainable object pointer using alias analysis.

objcarc::IsPotentialRetainableObjPtr

Test whether the given value is possible a retainable object pointer.

objcarc::attachedCallOpBundleNeedsMarker

Return whether clang_arc_attachedcall should be emitted with a marker.

objcarc::getAttachedARCFunction

Return the ARC runtime function from a clang_arc_attachedcall bundle.

objcarc::getAttachedARCFunctionKind

Return the ARCInstKind of the function on clang_arc_attachedcall.

objcarc::hasAttachedCallOpBundle

Return true if CB has a clang_arc_attachedcall operand bundle.

pgo::promoteIndirectCall

Promote an indirect call or invoke CB to a conditional direct call to F.

Created with MrDocs