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. i.e. x == sext(trunc(x to MaxSignificantBits) to bitwidth(x)). Similar to the APInt::getSignificantBits function. |
ComputeNumSignBits | Return the number of times the sign bit of the register is replicated into the other bits. We know that at least 1 bit is always equal to the sign bit (itself), but other cases can give us information. For example, immediately after an "ashr X, 2", we know that the top 3 bits are all equal to each other, so we return 3. For vectors, return the number of sign bits for the vector element with the mininum number of known sign bits. |
ConstantFoldCall | ConstantFoldCall - Attempt to constant fold a call to the specified function with the specified arguments, returning null if unsuccessful. |
ConstantFoldInstOperands | ConstantFoldInstOperands - Attempt to constant fold an instruction with the specified operands. If successful, the constant result is returned, if not, null is returned. Note that this function can fail when attempting to fold instructions like loads and stores, which have no constant expression form. |
ConstantFoldInstruction | ConstantFoldInstruction - Try to constant fold the specified instruction. If successful, the constant result is returned, if not, null is returned. Note that this fails if not all of the operands are constant. Otherwise, this function can only fail when attempting to fold instructions like loads and stores, which have no constant expression form. |
DemoteRegToStack | This function takes a virtual register computed by an Instruction and replaces it with a slot in the stack frame, allocated via alloca. This allows the CFG to be changed around without fear of invalidating the SSA information for the value. It returns the pointer to the alloca inserted to create a stack slot for X. |
ExtractTypeInfo | ExtractTypeInfo - Returns the type info, possibly bitcast, encoded in V. |
FindInsertedValue | Given an aggregate and an sequence of indices, see if the scalar value indexed is already around as a register, for example if it were inserted directly into the aggregate. |
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. |
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 | Same as above, but it will update the contextual profile. If the contextual profile is invalid (i.e. not loaded because it is not present), it defaults to the behavior of the non-contextual profile updating variant above. This makes it easy to drop-in replace uses of the non-contextual overload. |
InlineFunction | This function inlines the called function into the basic block of the caller. This returns false if it is not possible to inline this call. The program is still in a well defined state if this occurs though. |
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 | PointerMayBeCaptured - Visit the value and the values derived from it and find values which appear to be capturing the pointer value. This feeds results into and is controlled by the CaptureTracker object. MaxUsesToExplore specifies how many uses the analysis should explore for one value before giving up due too "too many uses". If MaxUsesToExplore is zero, a default value is assumed. This function only considers captures of the passed value via its def-use chain, without considering captures of values it may be based on, or implicit captures such as for external globals. |
PointerMayBeCaptured | Return which components of the pointer may be captured. Only consider components that are part of Mask. Once StopFn on the accumulated components returns true, the traversal is aborted early. By default, this happens when any of the components in Mask are captured. This function only considers captures of the passed value via its def-use chain, without considering captures of values it may be based on, or implicit captures such as for external globals. |
PointerMayBeCaptured | PointerMayBeCaptured - Return true if this pointer value may be captured by the enclosing function (which is required to exist). This routine can be expensive, so consider caching the results. The boolean ReturnCaptures specifies whether returning the value (or part of it) from the function counts as capturing it or not. MaxUsesToExplore specifies how many uses the analysis should explore for one value before giving up due too "too many uses". If MaxUsesToExplore is zero, a default value is assumed. This function only considers captures of the passed value via its def-use chain, without considering captures of values it may be based on, or implicit captures such as for external globals. |
PointerMayBeCapturedBefore | PointerMayBeCapturedBefore - Return true if this pointer value may be captured by the enclosing function (which is required to exist). If a DominatorTree is provided, only captures which happen before the given instruction are considered. This routine can be expensive, so consider caching the results. The boolean ReturnCaptures specifies whether returning the value (or part of it) from the function counts as capturing it or not. Captures by the provided instruction are considered if the final parameter is true. MaxUsesToExplore specifies how many uses the analysis should explore for one value before giving up due too "too many uses". If MaxUsesToExplore is zero, a default value is assumed. This function only considers captures of the passed value via its def-use chain, without considering captures of values it may be based on, or implicit captures such as for external globals. |
PointerMayBeCapturedBefore | Return which components of the pointer may be captured on the path to I. Only consider components that are part of Mask. Once StopFn on the accumulated components returns true, the traversal is aborted early. By default, this happens when any of the components in Mask are captured. This function only considers captures of the passed value via its def-use chain, without considering captures of values it may be based on, or implicit captures such as for external globals. |
RecursivelyDeleteTriviallyDeadInstructions | If the specified value is a trivially dead instruction, delete it. If that makes any of its operands trivially dead, delete them too, recursively. Return true if any instructions were deleted. |
RemapInstruction | Convert the instruction operands from referencing the current values into those specified by VM. |
RemapSourceAtom | Remap source location atom. Called by RemapInstruction. This updates the instruction's atom group number if it has been mapped (e.g. with llvm::mapAtomInstance), which is necessary to distinguish source code atoms on duplicated code paths. |
ReplaceInstWithInst | Replace the instruction specified by From with the instruction specified by To. Copies DebugLoc from BI to I, if I doesn't already have a DebugLoc. |
SplitBlockAndInsertForEachLane | Utility function for performing a given action on each lane of a vector with EVL effective length. EVL is assumed > 0. To simplify porting legacy code, this defaults to unrolling the implied loop for non-scalable element counts, but this is not considered to be part of the contract of this routine, and is expected to change in the future. The callback takes as arguments an IRBuilder whose insert point is correctly set for instantiating the given index, and a value which is (at runtime) the index to access. This index may be a constant. |
SplitBlockAndInsertIfElse | Similar to SplitBlockAndInsertIfThen, but the inserted block is on the false path of the branch. |
SplitBlockAndInsertIfThen | Split the containing block at the specified instruction - everything before SplitBefore stays in the old basic block, and the rest of the instructions in the BB are moved to a new block. The two blocks are connected by a conditional branch (with value of Cmp being the condition). Before: Head SplitBefore Tail After: Head if (Cond) ThenBlock SplitBefore Tail |
SplitBlockAndInsertIfThenElse | Split the containing block at the specified instruction - everything before SplitBefore stays in the old basic block, and the rest of the instructions in the BB are moved to a new block. The two blocks are connected by a conditional branch (with value of Cmp being the condition). Before: Head SplitBefore Tail After: Head if (Cond) TrueBlock else/ FalseBlock SplitBefore Tail |
SplitBlockAndInsertIfThenElse | SplitBlockAndInsertIfThenElse is similar to SplitBlockAndInsertIfThen, but also creates the ElseBlock. Before: Head SplitBefore Tail After: Head if (Cond) ThenBlock else ElseBlock SplitBefore Tail |
SplitBlockAndInsertSimpleForLoop | Insert a for (int i = 0; i < End; i++) loop structure (with the exception that End is assumed > 0, and thus not checked on entry) at SplitBefore. Returns the first insert point in the loop body, and the PHINode for the induction variable (i.e. "i" above). |
SplitCriticalEdge | If this edge is a critical edge, insert a new node to split the critical edge. This will update the analyses passed in through the option struct. This returns the new block if the edge was split, null otherwise. |
SplitKnownCriticalEdge | If it is known that an edge is critical, SplitKnownCriticalEdge can be called directly, rather than calling SplitCriticalEdge first. |
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 the metadata for the specified instruction according to the provided mapping. This is normally used after cloning an instruction, when some noalias scopes needed to be cloned. |
addAssumptions | Appends the set of assumptions Assumptions to CB. |
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. |
buildAssumeFromInst | Build a call to llvm.assume to preserve informations that can be derived from the given instruction. If no information derived from I, this call returns null. The returned instruction is not inserted anywhere. |
callsGCLeafFunction | Return true if this call calls a gc leaf function. |
canConstantFoldCallTo | canConstantFoldCallTo - Return true if its even possible to fold a call to the specified function. |
canInstructionHaveMMRAs | |
canReplaceOperandWithVariable | Given an instruction, is it legal to set operand OpIdx to a non-constant value? |
canReplacePointersIfEqual | Returns true if a pointer value From can be replaced with another pointer value To if they are deemed equal through some means (e.g. information from conditions). NOTE: The current implementation allows replacement in Icmp and PtrToInt instructions, as well as when we are replacing with a null pointer. Additionally it also allows replacement of pointers when both pointers have the same underlying object. |
canSinkOrHoistInst | Returns true if is legal to hoist or sink this instruction disregarding the possible introduction of faults. Reasoning about potential faulting instructions is the responsibility of the caller since it is challenging to do efficiently from within this routine. TargetExecutesOncePerLoop is true only when it is guaranteed that the target executes at most once per execution of the loop body. This is used to assess the legality of duplicating atomic loads. Generally, this is true when moving out of loop and not true when moving into loops. If ORE is set use it to emit optimization remarks. |
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 the CallInst to InvokeInst with the specified unwind edge basic block. This also splits the basic block where CI is located, because InvokeInst is a terminator instruction. Returns the newly split basic block. |
changeToUnreachable | Insert an unreachable instruction before the specified instruction, making it and the rest of the code in 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 | Enumerates all possible immediate values of V and inserts them into the set Constants. If AllowUndefOrPoison is false, it fails when V may contain undef/poison elements. Returns true if the result is complete. Otherwise, the result is incomplete (more than MaxCount values). NOTE: The constant values are not distinct. |
combineAAMetadata | Combine metadata of two instructions, where instruction J is a memory access that has been merged into K. This will intersect alias-analysis metadata, while preserving other known metadata. |
combineMetadataForCSE | Combine the metadata of two instructions so that K can replace J. This specifically handles the case of CSE-like transformations. Some metadata can only be kept if K dominates J. For this to be correct, K cannot be hoisted. |
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. |
computeKnownBitsFromContext | Merge bits known from context-dependent facts into Known. |
computeKnownFPClass | Wrapper to account for known fast math flags at the use instruction. |
computeKnownFPClass | InterestedClasses is a compile time optimization hint for which floating point classes should be queried. Queries not specified in InterestedClasses should be reliable if they are determined during the query. |
computeKnownFPSignBit | Return false if we can prove that the specified FP value's sign bit is 0. Return true if we can prove that the specified FP value's sign bit is 1. Otherwise return std::nullopt. |
createMemCpyLoopKnownSize | Emit a loop implementing the semantics of an llvm.memcpy whose size is a compile time constant. Loop is inserted at InsertBefore. |
createMemCpyLoopUnknownSize | Emit a loop implementing the semantics of llvm.memcpy where the size is not a compile-time constant. Loop will be inserted at InsertBefore. |
decomposeBitTest | Decompose an icmp into the form ((X & Mask) pred C) if possible. Unless AllowNonZeroC is true, C will always be 0. If DecomposeAnd is specified, then, for equality predicates, this will decompose bitmasking via and. |
decomposeBitTestICmp | Decompose an icmp into the form ((X & Mask) pred C) if possible. Unless AllowNonZeroC is true, C will always be 0. If DecomposeAnd is specified, then, for equality predicates, this will decompose bitmasking via and. |
dropDebugUsers | Remove the debug intrinsic instructions for the given instruction. |
emitBCmp | Emit a call to the bcmp function. |
emitBinaryFloatFnCall | Emit a call to the binary function named 'Name' (e.g. 'fmin'). This function is known to take type matching 'Op1' and 'Op2' and return one value with the same type. If 'Op1/Op2' are long double, 'l' is added as the suffix of name, if 'Op1/Op2' are float, we add a 'f' suffix. |
emitBinaryFloatFnCall | Emit a call to the binary function DoubleFn, FloatFn or LongDoubleFn, depending of the type of Op1. |
emitCalloc | Emit a call to the calloc function. |
emitFPutC | Emit a call to the fputc function. This assumes that Char is an 'int', and File is a pointer to FILE. |
emitFPutS | Emit a call to the fputs function. Str is required to be a pointer and File is a pointer to FILE. |
emitFWrite | Emit a call to the fwrite function. This assumes that Ptr is a pointer, Size is an 'size_t', and File is a pointer to FILE. |
emitHotColdNew | Emit a call to the hot/cold operator new function. |
emitMalloc | Emit a call to the malloc function. |
emitMemCCpy | Emit a call to the memccpy function. |
emitMemChr | Emit a call to the memchr function. This assumes that Ptr is a pointer, Val is an 'int' value, and Len is an 'size_t' value. |
emitMemCmp | Emit a call to the memcmp function. |
emitMemCpyChk | Emit a call to the __memcpy_chk function to the builder. This expects that the Len and ObjSize have type 'size_t' and Dst/Src are pointers. |
emitMemPCpy | Emit a call to the mempcpy function. |
emitMemRChr | Emit a call to the memrchr function, analogously to emitMemChr. |
emitPutChar | Emit a call to the putchar function. This assumes that Char is an 'int'. |
emitPutS | Emit a call to the puts function. This assumes that 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 the stpcpy function to the builder, for the specified pointer arguments. |
emitStpNCpy | Emit a call to the stpncpy function to the builder, for the specified pointer arguments and length. |
emitStrCat | Emit a call to the strcat function. |
emitStrChr | Emit a call to the strchr function to the builder, for the specified pointer and character. Ptr is required to be some pointer type, and the return value has 'i8*' type. |
emitStrCpy | Emit a call to the strcpy function to the builder, for the specified pointer arguments. |
emitStrDup | Emit a call to the strdup function to the builder, for the specified pointer. Ptr is required to be some pointer type, and the return value has 'i8*' type. |
emitStrLCat | Emit a call to the strlcat function. |
emitStrLCpy | Emit a call to the strlcpy function. |
emitStrLen | Emit a call to the strlen function to the builder, for the specified pointer. Ptr is required to be some pointer type, and the return value has 'size_t' type. |
emitStrNCat | Emit a call to the strncat function. |
emitStrNCmp | Emit a call to the strncmp function to the builder. |
emitStrNCpy | Emit a call to the strncpy function to the builder, for the specified pointer arguments and length. |
emitUnaryFloatFnCall | Emit a call to the unary function DoubleFn, FloatFn or LongDoubleFn, depending of the type of Op. |
emitUnaryFloatFnCall | Emit a call to the unary function named 'Name' (e.g. 'floor'). This function is known to take a single of type matching 'Op' and returns one value with the same type. If 'Op' is a long double, 'l' is added as the suffix of name, if 'Op' is a float, we add a 'f' suffix. |
emitVSNPrintf | Emit a call to the vsnprintf function. |
emitVSPrintf | Emit a call to the vsprintf function. |
emitWcsLen | Emit a call to the wcslen function to the builder, for the specified pointer. Ptr is required to be some pointer type, and the return value has 'size_t' type. |
expandVectorPredicationIntrinsic | Expand a vector predication intrinsic. Returns the kind of expansion that was applied to the intrinsic. |
extractBranchWeights | Extract branch weights attatched to an Instruction |
extractBranchWeights | Extract branch weights from a conditional branch or select Instruction. |
extractProfTotalWeight | Retrieve the total of all weights from an instruction. |
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. |
getAllocAlignment | Gets the alignment argument for an aligned_alloc-like function, using either built-in knowledge based on fuction names/signatures or allocalign attributes. Note: the Value returned may not indicate a valid alignment, per the definition of the allocalign attribute. |
getAllocSize | Return the size of the requested allocation. With a trivial mapper, this is similar to calling getObjectSize(..., Exact), but without looking through calls that return their argument. A mapper function can be used to replace one Value* (operand to the allocation) with another. This is useful when doing abstract interpretation. |
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 | This function returns call pointer argument that is considered the same by aliasing rules. You CAN'T use it to replace one value with another. If MustPreserveOffset is true, the call must preserve the byte offset of the pointer within its underlying object. Offset preservation implies nullness preservation; pass true when callers reason about either offset or null equality (e.g. GEP decomposition, dereferenceability, isKnownNonZero). |
getAssumptions | Return the set of all assumptions for the call CB. |
getAtomicSyncScopeID | A helper function that returns an atomic operation's sync scope; returns std::nullopt if it is not an atomic operation. |
getAttributeBasedInliningDecision | Returns InlineResult::success() if the call site should be always inlined because of user directives, and the inlining is viable. Returns InlineResult::failure() if the inlining may never happen because of user directives or incompatibilities detectable without needing callee traversal. Otherwise returns std::nullopt, meaning that inlining should be decided based on other criteria (e.g. cost modeling). |
getBaseObjectSize | Like getObjectSize(), but only returns the size of base objects (like allocas, global variables and allocator calls) and std::nullopt otherwise. Requires ExactSizeFromOffset mode. |
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 | This function computes the length of a null-terminated C string pointed to by V. If successful, it returns true and returns the string in Str. If unsuccessful, it returns false. This does not include the trailing null character by default. If TrimAtNul is set to false, then this returns any trailing null characters as well as any other characters that come after it. |
getConstrainedIntrinsicID | Returns constrained intrinsic id to represent the given instruction in strictfp function. If the instruction is already a constrained intrinsic or does not have a constrained intrinsic counterpart, the function returns zero. |
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. This allows you to calculate the cost of inlining a function via a pointer. This behaves exactly as the version with no explicit callee parameter in all other respects. |
getInliningCostEstimate | Get the cost estimate ignoring thresholds. This is similar to getInlineCost when passed InlineParams::ComputeFullInlineCost, or a non-null ORE. It uses default InlineParams otherwise. Contrary to getInlineCost, which makes a threshold-based final evaluation of should/shouldn't inline, captured in InlineResult, getInliningCostEstimate returns: - std::nullopt, if the inlining cannot happen (is illegal) - an integer, representing the cost. |
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 | Try to infer an alignment for the specified pointer. |
getLoadStoreAddressSpace | A helper function that returns the address space of the pointer operand of load or store instruction. |
getLoadStoreAlignment | A helper function that returns the alignment of load or store instruction. |
getLoadStorePointerOperand | A helper function that returns the pointer operand of a load or store instruction. Returns nullptr if not load or store. |
getLoadStoreType | A helper function that returns the type of a load or store instruction. |
getMemCacheHintMetadata | Return the cache hint metadata node for memory operand OperandNo on I, or nullptr when the instruction has no hint for that operand. For a CallBase, OperandNo is an argument index; otherwise it is an instruction operand index. |
getMetadataToPropagate | Add metadata from Inst to Metadata, if it can be preserved after vectorization. It can be preserved after vectorization if the kind is one of [MD_tbaa, MD_alias_scope, MD_noalias, MD_fpmath, MD_nontemporal,] MD_access_group, MD_mmra]. |
getObjectSize | Compute the size of the object pointed by Ptr. Returns true and the object size in Size if successful, and false otherwise. In this context, by object we mean the region of memory starting at Ptr to the end of the underlying object pointed to by Ptr. |
getOrEnforceKnownAlignment | Try to ensure that the alignment of V is at least PrefAlign bytes. If the owning object can be modified and has an alignment less than PrefAlign, it will be increased and PrefAlign returned. If the alignment cannot be increased, the known alignment of the value is returned. |
getPointerOperand | A helper function that returns the pointer operand of a load, store or GEP instruction. Returns nullptr if not load, store, or GEP. |
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. The value may be extracted from a splat constants vector or from a sequence of instructions that broadcast a single value into a vector. |
getUnderlyingObject | This method strips off any GEP address adjustments, pointer casts or llvm.threadlocal.address from the specified value V, returning the original object being addressed. Note that the returned value has pointer type if the specified value does. If the MaxLookup value is non-zero, it limits the number of instructions to be stripped off. |
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 the value profile data from Inst and returns them if Inst is annotated with value profile data. Returns an empty vector otherwise. |
getVectorIntrinsicIDForCall | Returns intrinsic ID for call. For the input call instruction it finds mapping intrinsic and returns its intrinsic ID, in case it does not found it return not_intrinsic. |
handleUnreachableTerminator | If a terminator in an unreachable basic block has an operand of type Instruction, transform it into poison. Return true if any operands are changed to poison. Original Values prior to being changed to poison are returned in PoisonedValues. |
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 |
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. For example, if ValAssumedPoison is icmp X, 10 and V is icmp X, 5, impliesPoison returns true. |
intersectAccessGroups | Compute the access-group list of access groups that Inst1 and Inst2 are both in. If either instruction does not access memory at all, it is considered to be in every list. |
invertCondition | Invert the given true/false value, possibly reusing an existing copy. |
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). |
isAssumeLikeIntrinsic | Return true if it is an intrinsic that cannot be speculated but also cannot trap. |
isBaseOfObject | Return true if we know V to the base address of the corresponding memory object. This implies that any address less than V must be out of bounds for the underlying object. Note that just being isIdentifiedObject() is not enough - For example, a negative offset from a noalias argument or call can be inbounds w.r.t the actual underlying 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. This is true for all i8 values obviously, but is also true for i32 0, i32 -1, i16 0xF0F0, double 0.0 etc. If the value can't be handled with a repeated byte store (e.g. i16 0x1234), return null. If the value is entirely undef and padding, return undef. |
isCheckForZeroAndMulWithOverflow | Match one of the patterns up to the select/logic op: %Op0 = icmp ne i4 %X, 0 %Agg = call { i4, i1 } llvm.[us]mul.with.overflow.i4(i4 %X, i4 %Y) %Op1 = extractvalue { i4, i1 } %Agg, 1 %ret = select i1 %Op0, i1 %Op1, i1 false / %ret = and i1 %Op0, %Op1 |
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. Critical edges are edges from a block with multiple successors to a block with multiple predecessors. |
isDereferenceableAndAlignedPointer | Returns true if V is always a dereferenceable pointer with alignment greater or equal than requested. If the context instruction is specified performs context-sensitive analysis and returns true if the pointer is dereferenceable at the specified instruction. If IgnoreFree is set, ignore potential frees of the object. |
isDereferenceableAndAlignedPointer | Returns true if V is always dereferenceable for Size byte with alignment greater or equal than requested. If the context instruction is specified performs context-sensitive analysis and returns true if the pointer is dereferenceable at the specified instruction. If IgnoreFree is set, ignore potential frees of the object. |
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 | 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. If V is an aggregate value or vector, check whether all elements (except padding) are not undef or poison. Note that this is different from canCreateUndefOrPoison because the function assumes Op's operands are not poison/undef. |
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 this function can prove that the instruction I will always transfer execution to one of its successors (including the next instruction that follows within a basic block). E.g. this is not guaranteed for function calls that could loop infinitely. |
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 umabigously identified at the function-level. Different IdentifiedFunctionLocals can't alias. Further, an IdentifiedFunctionLocal can not alias with any function arguments other than itself, which is not necessarily true for IdentifiedObjects. |
isIdentifiedObject | Return true if this pointer refers to a distinct and identifiable object. This returns true for: Global Variables and Functions (but not Global Aliases) Allocas ByVal and NoAlias Arguments NoAlias returns (e.g. calls to malloc) |
isImpliedByDomCondition | Return the boolean condition value in the context of the given instruction if it is known based on dominating conditions. |
isImpliedCondition | Return true if RHS is known to be implied true by LHS. Return false if RHS is known to be implied false by LHS. Otherwise, return std::nullopt if no implication can be made. A & B must be i1 (boolean) values or a vector of such values. Note that the truth table for implication is the same as <=u on i1 values (but not <=s!). The truth table for both is: | T | F (B) T | T | F F | T | T (A) |
isInTailCallPosition | Test if the given instruction is in a position to be optimized with a tail-call. This roughly means that it's in a block with a return and there's nothing that needs to be scheduled between it and the return. |
isInstructionTriviallyDead | Return true if the result produced by the instruction is not used, and the instruction will return. Certain side-effecting instructions are also considered dead if there are no uses of the instruction. |
isIntrinsicReturningPointerAliasingArgumentWithoutCapturing | {launder,strip}.invariant.group returns pointer that aliases its argument, and it only captures pointer by returning it. These intrinsics are not marked as nocapture, because returning is considered as capture. The arguments are not marked as returned neither, because it would make it useless. If MustPreserveOffset is true, the intrinsic must preserve the byte offset of the pointer within its underlying object (which excludes llvm.ptrmask, since masking off low bits changes the byte offset while still aliasing the same object). |
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. Currently can recoginze Value pair: 1: <X, Y> if X = sub (0, Y) or Y = sub (0, X) 2: <X, Y> if X = sub (A, B) and Y = sub (B, A) |
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. Return false if a value could ever be infinity. |
isKnownNeverNaN | Return true if the floating-point scalar value is not a NaN or if the floating-point vector value has no NaN elements. Return false if a value could ever be NaN. |
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. For vectors, return true if every element is known to be non-zero when defined. For pointers, if the context instruction and dominator tree are specified, perform context-sensitive analysis and return true if the pointer couldn't possibly be null at the specified instruction. Supports values with integer or pointer type and vectors of integers. |
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. For vectors return true if every element is known to be a power of two when defined. Supports values with integer or pointer type and vectors of integers. If 'OrZero' is set, then return true if the given value is either a power of two or zero. |
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. This condition is weaker than checking that the instruction is lanewise: lanewise means that the same operation is splatted across all lanes, but we also include the case where there is a different operation on each lane, as long as the operation only uses data from that lane. An example of an operation that is not lanewise, but doesn't cross vector lanes is insertelement. |
isNotVisibleOnUnwind | Return true if Object memory is not visible after an unwind, in the sense that program semantics cannot depend on Object containing any particular value on unwind. If the RequiresNoCaptureBeforeUnwind out parameter is set to true, then the memory is only not visible if the object has not been captured prior to the unwind. Otherwise it is not visible even if captured. |
isPotentiallyReachable | Determine whether instruction 'To' is reachable from 'From', without passing through any blocks in ExclusionSet, returning true if uncertain. |
isRemovableAlloc | Return true if this is a call to an allocation function that does not have side effects that we are required to preserve beyond the effect of allocating a new object. Ex: If our allocation routine has a counter for the number of objects allocated, and the program prints it on exit, can the value change due to optimization? Answer is highly language dependent. Note: Removable really does mean removable; it does not mean observable. A language (e.g. C++) can allow removing allocations without allowing insertion or speculative execution of allocation routines. |
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. |
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 the vector value V is poisoned or equal to every other non-poisoned element. If an index element is specified, either every element of the vector is poisoned or the element at that index is not poisoned and equal to every other non-poisoned element. This may be more powerful than the related getSplatValue() because it is not limited by finding a scalar source value to a splatted vector. |
isValidAssumeForContext | Return true if it is valid to use the assumptions provided by an assume intrinsic, I, at the point in the control-flow identified by the context instruction, CxtI. By default, ephemeral values of the assumption are treated as an invalid context, to prevent the assumption from being used to optimize away its argument. If the caller can ensure that this won't happen, it can call with AllowEphemerals set to true to get more valid assumptions. |
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 the Object is writable, in the sense that any location based on this pointer that can be loaded can also be stored to without trapping. Additionally, at the point Object is declared, stores can be introduced without data races. At later points, this is only the case if the pointer can not escape to a different thread. |
lowerObjectSizeCall | Try to turn a call to @llvm.objectsize into an integer value of the given Type. Returns null on failure. If MustSucceed is true, this function will not return null, and may return conservative values governed by the second argument of the call to objectsize. |
maskContainsAllOneOrUndef | Given a mask vector of i1, Return true if any of the elements of this predicate mask are known to be true or undef. That is, return true if at least one lane can be assumed active. |
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 | Attempt to match a simple value-accumulating recurrence of the form: %llvm.intrinsic.acc = phi Ty [%Init, %Entry], [%llvm.intrinsic, %backedge] %llvm.intrinsic = call Ty llvm.intrinsic(%OtherOp, %llvm.intrinsic.acc) OR %llvm.intrinsic.acc = phi Ty [%Init, %Entry], [%llvm.intrinsic, %backedge] %llvm.intrinsic = call Ty llvm.intrinsic(%llvm.intrinsic.acc, %OtherOp) |
matchSimpleTernaryIntrinsicRecurrence | Attempt to match a simple value-accumulating recurrence of the form: %llvm.intrinsic.acc = phi Ty [%Init, %Entry], [%llvm.intrinsic, %backedge] %llvm.intrinsic = call Ty llvm.intrinsic(%OtherOp0, %OtherOp1, %llvm.intrinsic.acc) OR %llvm.intrinsic.acc = phi Ty [%Init, %Entry], [%llvm.intrinsic, %backedge] %llvm.intrinsic = call Ty llvm.intrinsic(%llvm.intrinsic.acc, %OtherOp0, %OtherOp1) |
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. * Memory dependence arises for example if the instruction reads from memory or may produce effects or undefined behaviour. Memory dependent instructions generally cannot be reorderd with respect to other memory dependent instructions. * Control dependence arises for example if the instruction may fault if lifted above a throwing call or infinite loop. |
maybeMarkSanitizerLibraryCallNoBuiltin | Given a CallInst, check if it calls a string function known to CodeGen, and mark it with NoBuiltin if so. To be used by sanitizers that intend to intercept string functions and want to avoid converting them to target specific instructions. |
mustExecuteUBIfPoisonOnPathTo | Return true if undefined behavior would provable be executed on the path to OnPathTo if Root produced a posion result. Note that this doesn't say anything about whether OnPathTo is actually executed or whether Root is actually poison. This can be used to assess whether a new use of Root can be added at a location which is control equivalent with OnPathTo (such as immediately before it) without introducing UB which didn't previously exist. Note that a false result conveys no information. |
mustTriggerUB | Return true if the given instruction must trigger undefined behavior when I is executed with any operands which appear in KnownPoison holding a poison value at the point of execution. |
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 | Analogous to the above, but return the Uses so that they can be modified. Unlike previous version, Condition is optional and may be null. |
parseWidenableBranch | If U is widenable branch looking like: %cond = ... %wc = call i1 llvm.experimental.widenable.condition() %branch_cond = and i1 %cond, %wc br i1 %branch_cond, label %if_true_bb, label %if_false_bb ; <--- U The function returns true, and the values %cond and %wc and blocks %if_true_bb, if_false_bb are returned in the parameters (Condition, WidenableCondition, IfTrueBB and IfFalseFF) respectively. If U does not match this pattern, return false. |
patchReplacementInstruction | Patch the replacement so that it is not more restrictive than the value being replaced. It assumes that the replacement does not get moved from its original position. |
possiblyDemandedEltsInMask | Given a mask vector of the form <Y x i1>, return an APInt (of bitwidth Y) for each lane which may be active. |
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`. |
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 | Get the intersection (logical and) of all of the potential IR flags of each scalar operation (VL) that will be converted into a vector (I). If OpValue is non-null, we only consider operations similar to OpValue when intersecting. Flag set: NSW, NUW (if IncludeWrapFlags is true), exact, and all of fast-math. |
propagateMetadata | Specifically, let Kinds = [MD_tbaa, MD_alias_scope, MD_noalias, MD_fpmath,] MD_nontemporal, MD_access_group, MD_mmra]. For K in Kinds, we get the MDNode for K from each of the elements of VL, compute their "intersection" (i.e., the most generic metadata value that covers all of the individual values), and set I's metadata for M equal to the intersection value. |
recognizeBSwapOrBitReverseIdiom | Try to match a bswap or bitreverse idiom. |
replaceAllDbgUsesWith | Point debug users of From to To or salvage them. Use this function only when replacing all uses of From with To, with a guarantee that From is going to be deleted. |
replaceAndRecursivelySimplify | Replace all uses of 'I' with 'SimpleV' and simplify the uses recursively. |
replaceDbgDeclare | Replaces dbg.declare record when the address it describes is replaced with a new value. If Deref is true, an additional DW_OP_deref is prepended to the expression. If Offset is non-zero, a constant displacement is added to the expression (between the optional Deref operations). Offset can be negative. |
replaceDominatedUsesWith | Replace each use of 'From' with 'To' if that use is dominated by the given edge. Returns the number of replacements made. |
replaceDominatedUsesWith | Replace each use of 'From' with 'To' if that use is dominated by the given instruction. Returns the number of replacements made. |
replaceDominatedUsesWith | Replace each use of 'From' with 'To' if that use is dominated by the end of the given BasicBlock. Returns the number of replacements made. |
replaceDominatedUsesWithIf | Replace each use of 'From' with 'To' if that use is dominated by the given instruction and the callback ShouldReplace returns true. Returns the number of replacements made. |
replaceDominatedUsesWithIf | Replace each use of 'From' with 'To' if that use is dominated by the end of the given BasicBlock and the callback ShouldReplace returns true. Returns the number of replacements made. |
replaceDominatedUsesWithIf | Replace each use of 'From' with 'To' if that use is dominated by the given edge and the callback ShouldReplace returns true. Returns the number of replacements made. |
salvageDebugInfo | Salvage debug records that use I before the instruction is deleted. Rewrite those uses in terms of its operands where we can, and encode the instruction's effect in the record's DIExpression. Deleting the instruction replaces any remaining debug-record uses with poison. |
salvageDebugInfoForDbgValues | Salvage only the records in DbgRecords instead of finding every debug user of I. Every record must be a debug user of the instruction. |
salvageDebugInfoImpl | Given an instruction I and DIExpression DIExpr operating on it, append the effects of I to the DIExpression operand list Ops, or return nullptr if it cannot be salvaged. CurrentLocOps is the number of SSA values referenced by the incoming Ops. |
salvageKnowledge | Calls BuildAssumeFromInst and if the resulting llvm.assume is valid insert if before I. This is usually what need to be done to salvage the knowledge contained in the instruction I. The AssumptionCache must be provided if it is available or the cache may become silently be invalid. The DominatorTree can optionally be provided to enable cross-block reasoning. This returns if a change was made. |
scaleProfData | Scaling the profile data attached to 'I' using the ratio of S/T. |
setAtomicSyncScopeID | A helper function that sets an atomic operation's sync scope. |
setBranchWeights | Create a new branch_weights metadata node and add or overwrite a prof metadata reference to instruction I. |
setExplicitlyUnknownBranchWeights | Specify that the branch weights for this terminator cannot be known at compile time. This should only be called by passes, and never as a default behavior in e.g. MDBuilder. The goal is to use this info to validate passes do not accidentally drop profile info, and this API is called in cases where the pass explicitly cannot provide that info. Defaulting it in would hide bugs where the pass forgets to transfer over or otherwise specify profile info. Use PassName to capture the pass name (i.e. DEBUG_TYPE) for debuggability. |
setExplicitlyUnknownBranchWeightsIfProfiled | Like setExplicitlyUnknownBranchWeights(...), but only sets unknown branch weights in the new instruction if the parent function of the original instruction has an entry count. This is to not confuse users by injecting profile data into non-profiled functions. If F is nullptr, we will fetch the function from I. |
setFittedBranchWeights | Variant of setBranchWeights where the Weights will be fit first to uint32_t by shifting right. |
setInlineRemark | Set the inline-remark attribute. |
setLoadStoreAlignment | A helper function that set the alignment of load or store instruction. |
setUnwindEdgeTo | Sets the unwind edge of an instruction to a particular successor. |
shouldInline | Return the cost only if the inliner should attempt to inline at the given CallSite. If we return the cost, we will emit an optimisation remark later using that cost, so we won't do so from this function. Return std::nullopt if inlining should not be attempted. |
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. Returns a simplified result or null. |
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. In contrast to simplifyFMulInst, this function will not perform simplifications whose unrounded results differ when rounded to the argument type. |
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. If not, this returns null. |
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. If not, return null. |
simplifyInstructionWithOperands | Like simplifyInstruction but the operands of I are replaced with NewOps. Returns a simplified value, or null if none was found. |
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. See class ShuffleVectorInst for a description of the mask representation. |
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. If not, return null. AllowRefinement specifies whether the simplification can be a refinement (e.g. 0 instead of poison), or whether it needs to be strictly identical. Op and RepOp can be assumed to not be poison when determining refinement. |
simplifyXorInst | Given operands for an Xor, fold the result or return null. |
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. |
tryEnforceAlignment | If the specified pointer points to an object that we control, try to modify the object's alignment to PrefAlign. Returns a minimum known alignment of the value after the operation, which may be lower than PrefAlign. |
tryPromoteCall | Try to promote (devirtualize) a virtual call on an Alloca. Return true on success. |
updateLoopMetadataDebugLocations | Update the debug locations contained within the MD_loop metadata attached to the instruction I, if one exists. Updater is applied to Metadata operand in the MD_loop metadata: the returned value is included in the updated loop metadata node if it is non-null. |
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 the result produced by the instruction would have no side effects if it was not used. This is equivalent to checking whether isInstructionTriviallyDead would be true if the use count was 0. |
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_Deferred | Like m_Specific(), but works if the specific value to match is determined as part of the same match() expression. For example: m_Add(m_Value(X), m_Specific(X)) is incorrect, because m_Specific() will bind X before the pattern match starts. m_Add(m_Value(X), m_Deferred(X)) is correct, and will check against whichever value m_Value(X) populated. |
PatternMatch::m_Instruction | Match an instruction, capturing it 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 against the nested pattern, and capture the value if we match. |
PatternMatch::m_Value | Match a value, capturing it if we match. |
VFABI::getVectorVariantNames | Populates a set of strings representing the Vector Function ABI variants associated to the CallInst CI. If the CI does not contain the vector-function-abi-variant attribute, we return without populating VariantMappings, i.e. callers of getVectorVariantNames need not check for the presence of the attribute (see InjectTLIMappings). |
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 | If we saw a store of a value to memory, and then a load from a must-aliased pointer of a different type, try to coerce the stored value to the loaded type. LoadedTy is the type of the load we want to replace. IRB is IRBuilder used to insert new instructions. |
VNCoercion::getValueForLoad | If analyzeLoadFromClobberingStore/Load returned an offset, this function can be used to actually perform the extraction of the bits from the store. It inserts instructions to do so at InsertPt, and returns the extracted value. |
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. |
instrumentor::evaluateFilter | Evaluate the filter expression against the current instrumentation opportunity. Returns true if the filter passes (or is empty), false otherwise. Dynamic values (non-constants) are assumed to pass. |
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". |
misexpect::checkBackendInstrumentation | checkBackendInstrumentation - compares PGO counters to the thresholds used for llvm.expect and warns if the PGO counters are outside of the expected range. It extracts the expected weights from the MD_prof weights attached to the instruction, which are assumed to come from lowered llvm.expect intrinsics. The RealWeights parameter and the extracted expected weights are then passed to verifyMisexpect() for verification |
misexpect::checkExpectAnnotations | checkExpectAnnotations - compares PGO counters to the thresholds used for llvm.expect and warns if the PGO counters are outside of the expected range. It extracts the expected weights from the MD_prof weights attached to the instruction, which are assumed to come from lowered llvm.expect intrinsics. The RealWeights parameter and the extracted expected weights are then passed to verifyMisexpect() for verification. It is a thin wrapper around the checkFrontendInstrumentation and checkBackendInstrumentation APIs |
misexpect::checkFrontendInstrumentation | checkFrontendInstrumentation - compares PGO counters to the thresholds used for llvm.expect and warns if the PGO counters are outside of the expected range. It extracts the expected weights from the MD_prof weights attached to the instruction, which are assumed to come from profiling data attached by the frontend prior to llvm.expect intrinsic lowering. The ExpectedWeights parameter and the extracted real weights are then passed to verifyMisexpect() for verification |
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 | The RCIdentity root of a value V is a dominating value U for which retaining or releasing U is equivalent to retaining or releasing V. In other words, ARC operations on V are equivalent to ARC operations on U. |
objcarc::GetRCIdentityRoot | Helper which calls const Value *GetRCIdentityRoot(const Value *V) and just casts away the const of the result. For documentation about what an RCIdentityRoot (and by extension GetRCIdentityRoot is) look at that function. |
objcarc::GetUnderlyingObjCPtr | This is a wrapper around getUnderlyingObject which also knows how to look through objc_retain and objc_autorelease calls, which we know to return their argument verbatim. |
objcarc::GetUnderlyingObjCPtrCached | A wrapper for GetUnderlyingObjCPtr used for results memoization. |
objcarc::IsObjCIdentifiedObject | Return true if this value refers to a distinct and identifiable object. |
objcarc::IsPotentialRetainableObjPtr | Test whether the given value is possible a retainable object pointer. |
objcarc::attachedCallOpBundleNeedsMarker | This function determines whether the clang_arc_attachedcall should be emitted with or without the marker. Concretely, this is the difference between: objc_retainAutoreleasedReturnValue and objc_claimAutoreleasedReturnValue retainRV (and unsafeClaimRV) requires a marker, but claimRV does not. |
objcarc::getAttachedARCFunction | This function returns operand bundle clang_arc_attachedcall's argument, which is the address of the ARC runtime function. |
objcarc::getAttachedARCFunctionKind | This function returns the ARCInstKind of the function attached to operand bundle clang_arc_attachedcall. It returns std::nullopt if the call doesn't have the operand bundle or the operand is null. Otherwise it returns either RetainRV or UnsafeClaimRV. |