class Instruction
Declaration
class Instruction : public User, public ilist_node_with_parent { /* full declaration omitted */ };
Description
LLVM Value Representation This is a very important LLVM class. It is the base class of all values computed by a program that may be used as operands to other values. Value is the super class of other important classes such as Instruction and Function. All Values have a Type. Type is not a subclass of Value. Some values can have a name and they belong to some Module. Setting the name on the Value automatically updates the module's symbol table. Every value has a "use list" that keeps track of which other Values are using this Value. A Value can also have an arbitrary number of ValueHandle objects that watch it and listen to RAUW and Destroy events. See llvm/IR/ValueHandle.h for details.
Declared at: llvm/include/llvm/IR/Instruction.h:42
Inherits from: User, ilist_node_with_parent
Member Variables
- private llvm::BasicBlock* Parent
- private llvm::DebugLoc DbgLoc
- private unsigned int Order = 0
- Relative order of this instruction in its parent basic block. Used for O(1) local dominance checks between instructions.
Inherited from Value:
- protected SubclassOptionalData
- protected NumUserOperands
- protected IsUsedByMD
- protected HasName
- protected HasMetadata
- protected HasHungOffUses
- protected HasDescriptor
- public static MaxAlignmentExponent = 32
- public static MaximumAlignment = 1ULL << MaxAlignmentExponent
Method Overview
- public Instruction(const llvm::Instruction &)
- protected Instruction(llvm::Type * Ty, unsigned int iType, llvm::Use * Ops, unsigned int NumOps, llvm::BasicBlock * InsertAtEnd)
- protected Instruction(llvm::Type * Ty, unsigned int iType, llvm::Use * Ops, unsigned int NumOps, llvm::Instruction * InsertBefore = nullptr)
- public void addAnnotationMetadata(llvm::StringRef Annotation)
- public void andIRFlags(const llvm::Value * V)
- public void applyMergedLocation(const llvm::DILocation * LocA, const llvm::DILocation * LocB)
- public static bool classof(const llvm::Value * V)
- public llvm::Instruction * clone() const
- private llvm::Instruction * cloneImpl() const
- public bool comesBefore(const llvm::Instruction * Other) const
- public void copyFastMathFlags(llvm::FastMathFlags FMF)
- public void copyFastMathFlags(const llvm::Instruction * I)
- public void copyIRFlags(const llvm::Value * V, bool IncludeWrapFlags = true)
- public void copyMetadata(const llvm::Instruction & SrcInst, ArrayRef<unsigned int> WL = llvm::ArrayRef<unsigned int>())
- public void dropLocation()
- public void dropPoisonGeneratingFlags()
- public void dropUndefImplyingAttrsAndUnknownMetadata(ArrayRef<unsigned int> KnownIDs = {})
- public void dropUnknownNonDebugMetadata(unsigned int ID1, unsigned int ID2)
- public void dropUnknownNonDebugMetadata(unsigned int ID1)
- public void dropUnknownNonDebugMetadata()
- public void dropUnknownNonDebugMetadata(ArrayRef<unsigned int> KnownIDs)
- public SymbolTableList<Instruction>::iterator eraseFromParent()
- public bool extractProfMetadata(uint64_t & TrueVal, uint64_t & FalseVal) const
- public bool extractProfTotalWeight(uint64_t & TotalVal) const
- public llvm::AAMDNodes getAAMetadata() const
- public void getAllMetadata(SmallVectorImpl<std::pair<unsigned int, MDNode *>> & MDs) const
- private void getAllMetadataImpl(SmallVectorImpl<std::pair<unsigned int, MDNode *>> &) const
- public void getAllMetadataOtherThanDebugLoc(SmallVectorImpl<std::pair<unsigned int, MDNode *>> & MDs) const
- public const llvm::DebugLoc & getDebugLoc() const
- public llvm::FastMathFlags getFastMathFlags() const
- public llvm::Function * getFunction()
- public const llvm::Function * getFunction() const
- public llvm::MDNode * getMetadata(llvm::StringRef Kind) const
- public llvm::MDNode * getMetadata(unsigned int KindID) const
- private llvm::MDNode * getMetadataImpl(llvm::StringRef Kind) const
- private llvm::MDNode * getMetadataImpl(unsigned int KindID) const
- public const llvm::Module * getModule() const
- public llvm::Module * getModule()
- public llvm::Instruction * getNextNonDebugInstruction(bool SkipPseudoOp = false)
- public const llvm::Instruction * getNextNonDebugInstruction(bool SkipPseudoOp = false) const
- public unsigned int getNumSuccessors() const
- public unsigned int getOpcode() const
- public static const char * getOpcodeName(unsigned int OpCode)
- public const char * getOpcodeName() const
- public inline llvm::BasicBlock * getParent()
- public inline const llvm::BasicBlock * getParent() const
- public const llvm::Instruction * getPrevNonDebugInstruction(bool SkipPseudoOp = false) const
- public llvm::Instruction * getPrevNonDebugInstruction(bool SkipPseudoOp = false)
- protected template <typename BitfieldElement>typename BitfieldElement::Type getSubclassData() const
- private unsigned short getSubclassDataFromValue() const
- public llvm::BasicBlock * getSuccessor(unsigned int Idx) const
- public bool hasAllowContract() const
- public bool hasAllowReassoc() const
- public bool hasAllowReciprocal() const
- public bool hasApproxFunc() const
- public bool hasAtomicLoad() const
- public bool hasAtomicStore() const
- public bool hasMetadata(llvm::StringRef Kind) const
- public bool hasMetadata(unsigned int KindID) const
- public bool hasMetadata() const
- public bool hasMetadataOtherThanDebugLoc() const
- public bool hasNoInfs() const
- public bool hasNoNaNs() const
- public bool hasNoSignedWrap() const
- public bool hasNoSignedZeros() const
- public bool hasNoUnsignedWrap() const
- public bool hasPoisonGeneratingFlags() const
- public void insertAfter(llvm::Instruction * InsertPos)
- public void insertBefore(llvm::Instruction * InsertPos)
- public inline bool isArithmeticShift() const
- public static bool isAssociative(unsigned int Opcode)
- public bool isAssociative() const
- public bool isAtomic() const
- public bool isBinaryOp() const
- public static inline bool isBinaryOp(unsigned int Opcode)
- public static inline bool isBitwiseLogicOp(unsigned int Opcode)
- public inline bool isBitwiseLogicOp() const
- public bool isCast() const
- public static inline bool isCast(unsigned int OpCode)
- public bool isCommutative() const
- public static bool isCommutative(unsigned int Opcode)
- public bool isDebugOrPseudoInst() const
- public bool isEHPad() const
- public bool isExact() const
- public static inline bool isExceptionalTerminator(unsigned int OpCode)
- public bool isExceptionalTerminator() const
- public bool isFast() const
- public bool isFenceLike() const
- public static inline bool isFuncletPad(unsigned int OpCode)
- public bool isFuncletPad() const
- public bool isIdempotent() const
- public static bool isIdempotent(unsigned int Opcode)
- public bool isIdenticalTo(const llvm::Instruction * I) const
- public bool isIdenticalToWhenDefined(const llvm::Instruction * I) const
- public static inline bool isIntDivRem(unsigned int Opcode)
- public bool isIntDivRem() const
- public bool isLaunderOrStripInvariantGroup() const
- public bool isLifetimeStartOrEnd() const
- public inline bool isLogicalShift() const
- public static bool isNilpotent(unsigned int Opcode)
- public bool isNilpotent() const
- public bool isOnlyUserOfAnyOperand()
- public bool isSafeToRemove() const
- public bool isSameOperationAs(const llvm::Instruction * I, unsigned int flags = 0) const
- public static inline bool isShift(unsigned int Opcode)
- public bool isShift() const
- public static inline bool isTerminator(unsigned int OpCode)
- public bool isTerminator() const
- public bool isUnaryOp() const
- public static inline bool isUnaryOp(unsigned int Opcode)
- public bool isUsedOutsideOfBlock(const llvm::BasicBlock * BB) const
- public bool isVolatile() const
- public bool mayHaveSideEffects() const
- public bool mayReadFromMemory() const
- public bool mayReadOrWriteMemory() const
- public bool mayThrow() const
- public bool mayWriteToMemory() const
- public void moveAfter(llvm::Instruction * MovePos)
- public void moveBefore(llvm::BasicBlock & BB, SymbolTableList<Instruction>::iterator I)
- public void moveBefore(llvm::Instruction * MovePos)
- public void removeFromParent()
- public void replaceSuccessorWith(llvm::BasicBlock * OldBB, llvm::BasicBlock * NewBB)
- public void setAAMetadata(const llvm::AAMDNodes & N)
- public void setDebugLoc(llvm::DebugLoc Loc)
- public void setFast(bool B)
- public void setFastMathFlags(llvm::FastMathFlags FMF)
- public void setHasAllowContract(bool B)
- public void setHasAllowReassoc(bool B)
- public void setHasAllowReciprocal(bool B)
- public void setHasApproxFunc(bool B)
- public void setHasNoInfs(bool B)
- public void setHasNoNaNs(bool B)
- public void setHasNoSignedWrap(bool b = true)
- public void setHasNoSignedZeros(bool B)
- public void setHasNoUnsignedWrap(bool b = true)
- public void setIsExact(bool b = true)
- public void setMetadata(unsigned int KindID, llvm::MDNode * Node)
- public void setMetadata(llvm::StringRef Kind, llvm::MDNode * Node)
- private void setParent(llvm::BasicBlock * P)
- protected template <typename BitfieldElement>void setSubclassData(typename BitfieldElement::Type Value)
- public void setSuccessor(unsigned int Idx, llvm::BasicBlock * BB)
- private void setValueSubclassData(unsigned short D)
- public void swapProfMetadata()
- public void updateLocationAfterHoist()
- public const llvm::Instruction * user_back() const
- public llvm::Instruction * user_back()
- public bool willReturn() const
- protected ~Instruction()
Inherited from User:
- protected Op
- protected Op
- protected OpFrom
- protected allocHungoffUses
- public classof
- public dropAllReferences
- public getDescriptor
- public getDescriptor
- public getNumOperands
- public getOperand
- public getOperandList
- public getOperandList
- public getOperandUse
- public getOperandUse
- protected growHungoffUses
- public isDroppable
- public op_begin
- public op_begin
- public op_end
- public op_end
- public operand_values
- public operand_values
- public operands
- public operands
- public replaceUsesOfWith
- public setGlobalVariableNumOperands
- public setNumHungOffUseOperands
- public setOperand
- public value_op_begin
- public value_op_begin
- public value_op_end
- public value_op_end
Inherited from Value:
- public DoPHITranslation
- public DoPHITranslation
- protected addMetadata
- protected addMetadata
- public addUse
- public assertModuleIsMaterialized
- public assertModuleIsMaterializedImpl
- public canBeFreed
- protected clearMetadata
- public clearSubclassOptionalData
- public deleteValue
- public dropDroppableUse
- public dropDroppableUses
- public dropDroppableUsesIn
- public dump
- protected eraseMetadata
- protected getAllMetadata
- public getContext
- protected getMetadata
- protected getMetadata
- protected getMetadata
- protected getMetadata
- public getName
- public getNameOrAsOperand
- public getNumUses
- public getPointerAlignment
- public getPointerDereferenceableBytes
- public getRawSubclassOptionalData
- public getSingleUndroppableUse
- public getSingleUndroppableUse
- protected getSubclassDataFromValue
- public getType
- public getUniqueUndroppableUser
- public getUniqueUndroppableUser
- public getValueID
- public getValueName
- protected hasMetadata
- protected hasMetadata
- protected hasMetadata
- public hasNUndroppableUses
- public hasNUndroppableUsesOrMore
- public hasNUses
- public hasNUsesOrMore
- public hasName
- public hasOneUse
- public hasOneUser
- public hasSameSubclassOptionalData
- public hasValueHandle
- public isSwiftError
- public isTransitiveUsedByMetadataOnly
- public isUsedByMetadata
- public isUsedInBasicBlock
- public materialized_use_begin
- public materialized_use_begin
- public materialized_use_empty
- public materialized_user_begin
- public materialized_user_begin
- public materialized_users
- public materialized_users
- public materialized_uses
- public materialized_uses
- public mutateType
- public print
- public print
- public printAsOperand
- public printAsOperand
- public replaceAllUsesWith
- public replaceNonMetadataUsesWith
- public replaceUsesOutsideBlock
- public replaceUsesWithIf
- public reverseUseList
- protected setMetadata
- protected setMetadata
- public setName
- public setValueName
- protected setValueSubclassData
- public sortUseList
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsOffsets
- public stripInBoundsOffsets
- public stripPointerCasts
- public stripPointerCasts
- public stripPointerCastsAndAliases
- public stripPointerCastsAndAliases
- public stripPointerCastsForAliasAnalysis
- public stripPointerCastsForAliasAnalysis
- public stripPointerCastsSameRepresentation
- public stripPointerCastsSameRepresentation
- public takeName
- public use_begin
- public use_begin
- public use_empty
- public use_end
- public use_end
- public user_back
- public user_back
- public user_begin
- public user_begin
- public user_empty
- public user_end
- public user_end
- public users
- public users
- public uses
- public uses
Methods
¶Instruction(const llvm::Instruction&)
Instruction(const llvm::Instruction&)
Declared at: llvm/include/llvm/IR/Instruction.h:83
Parameters
- const llvm::Instruction&
¶Instruction(llvm::Type* Ty,
unsigned int iType,
llvm::Use* Ops,
unsigned int NumOps,
llvm::BasicBlock* InsertAtEnd)
Instruction(llvm::Type* Ty,
unsigned int iType,
llvm::Use* Ops,
unsigned int NumOps,
llvm::BasicBlock* InsertAtEnd)
Declared at: llvm/include/llvm/IR/Instruction.h:848
Parameters
- llvm::Type* Ty
- unsigned int iType
- llvm::Use* Ops
- unsigned int NumOps
- llvm::BasicBlock* InsertAtEnd
¶Instruction(
llvm::Type* Ty,
unsigned int iType,
llvm::Use* Ops,
unsigned int NumOps,
llvm::Instruction* InsertBefore = nullptr)
Instruction(
llvm::Type* Ty,
unsigned int iType,
llvm::Use* Ops,
unsigned int NumOps,
llvm::Instruction* InsertBefore = nullptr)
Declared at: llvm/include/llvm/IR/Instruction.h:846
Parameters
- llvm::Type* Ty
- unsigned int iType
- llvm::Use* Ops
- unsigned int NumOps
- llvm::Instruction* InsertBefore = nullptr
¶void addAnnotationMetadata(
llvm::StringRef Annotation)
void addAnnotationMetadata(
llvm::StringRef Annotation)
Description
Adds an !annotation metadata node with \p Annotation to this instruction. If this instruction already has !annotation metadata, append \p Annotation to the existing node.
Declared at: llvm/include/llvm/IR/Instruction.h:330
Parameters
- llvm::StringRef Annotation
¶void andIRFlags(const llvm::Value* V)
void andIRFlags(const llvm::Value* V)
Description
Logical 'and' of any supported wrapping, exact, and fast-math flags of V and this instruction.
Declared at: llvm/include/llvm/IR/Instruction.h:478
Parameters
- const llvm::Value* V
¶void applyMergedLocation(
const llvm::DILocation* LocA,
const llvm::DILocation* LocB)
void applyMergedLocation(
const llvm::DILocation* LocA,
const llvm::DILocation* LocB)
Description
Merge 2 debug locations and apply it to the Instruction. If the instruction is a CallIns, we need to traverse the inline chain to find the common scope. This is not efficient for N-way merging as each time you merge 2 iterations, you need to rebuild the hashmap to find the common scope. However, we still choose this API because: 1) Simplicity: it takes 2 locations instead of a list of locations. 2) In worst case, it increases the complexity from O(N*I) to O(2*N*I), where N is # of Instructions to merge, and I is the maximum level of inline stack. So it is still linear. 3) Merging of call instructions should be extremely rare in real applications, thus the N-way merging should be in code path. The DebugLoc attached to this instruction will be overwritten by the merged DebugLoc.
Declared at: llvm/include/llvm/IR/Instruction.h:493
Parameters
- const llvm::DILocation* LocA
- const llvm::DILocation* LocB
¶static bool classof(const llvm::Value* V)
static bool classof(const llvm::Value* V)
Description
Methods for support type inquiry through isa, cast, and dyn_cast:
Declared at: llvm/include/llvm/IR/Instruction.h:750
Parameters
- const llvm::Value* V
¶llvm::Instruction* clone() const
llvm::Instruction* clone() const
Description
Create a copy of 'this' instruction that is identical in all ways except the following: * The instruction has no parent * The instruction has no name
Declared at: llvm/include/llvm/IR/Instruction.h:697
¶llvm::Instruction* cloneImpl() const
llvm::Instruction* cloneImpl() const
Description
Create a copy of this instruction.
Declared at: llvm/include/llvm/IR/Instruction.h:853
¶bool comesBefore(
const llvm::Instruction* Other) const
bool comesBefore(
const llvm::Instruction* Other) const
Description
Given an instruction Other in the same basic block as this instruction, return true if this instruction comes before Other. In this worst case, this takes linear time in the number of instructions in the block. The results are cached, so in common cases when the block remains unmodified, it takes constant time.
Declared at: llvm/include/llvm/IR/Instruction.h:150
Parameters
- const llvm::Instruction* Other
¶void copyFastMathFlags(llvm::FastMathFlags FMF)
void copyFastMathFlags(llvm::FastMathFlags FMF)
Description
Convenience function for transferring all fast-math flag values to this instruction, which must be an operator which supports these flags. See LangRef.html for the meaning of these flags.
Declared at: llvm/include/llvm/IR/Instruction.h:438
Parameters
¶void copyFastMathFlags(const llvm::Instruction* I)
void copyFastMathFlags(const llvm::Instruction* I)
Description
Copy I's fast-math flags
Declared at: llvm/include/llvm/IR/Instruction.h:470
Parameters
- const llvm::Instruction* I
¶void copyIRFlags(const llvm::Value* V,
bool IncludeWrapFlags = true)
void copyIRFlags(const llvm::Value* V,
bool IncludeWrapFlags = true)
Description
Convenience method to copy supported exact, fast-math, and (optionally) wrapping flags from V to this instruction.
Declared at: llvm/include/llvm/IR/Instruction.h:474
Parameters
- const llvm::Value* V
- bool IncludeWrapFlags = true
¶void copyMetadata(
const llvm::Instruction& SrcInst,
ArrayRef<unsigned int> WL =
llvm::ArrayRef<unsigned int>())
void copyMetadata(
const llvm::Instruction& SrcInst,
ArrayRef<unsigned int> WL =
llvm::ArrayRef<unsigned int>())
Description
Copy metadata from \p SrcInst to this instruction. \p WL, if not empty, specifies the list of meta data that needs to be copied. If \p WL is empty, all meta data will be copied.
Declared at: llvm/include/llvm/IR/Instruction.h:300
Parameters
- const llvm::Instruction& SrcInst
- ArrayRef<unsigned int> WL = llvm::ArrayRef<unsigned int>()
¶void dropLocation()
void dropLocation()
Description
Drop the instruction's debug location. This does not guarantee removal of the !dbg source location attachment, as it must set a line 0 location with scope information attached on call instructions. To guarantee removal of the !dbg attachment, use the \ref setDebugLoc() API. Note: it is undefined behavior to call this on an instruction not currently inserted into a function.
Declared at: llvm/include/llvm/IR/Instruction.h:507
¶void dropPoisonGeneratingFlags()
void dropPoisonGeneratingFlags()
Description
Drops flags that may cause this instruction to evaluate to poison despite having non-poison inputs.
Declared at: llvm/include/llvm/IR/Instruction.h:378
¶void dropUndefImplyingAttrsAndUnknownMetadata(
ArrayRef<unsigned int> KnownIDs = {})
void dropUndefImplyingAttrsAndUnknownMetadata(
ArrayRef<unsigned int> KnownIDs = {})
Description
This function drops non-debug unknown metadata (through dropUnknownNonDebugMetadata). For calls, it also drops parameter and return attributes that can cause undefined behaviour. Both of these should be done by passes which move instructions in IR.
Declared at: llvm/include/llvm/IR/Instruction.h:385
Parameters
- ArrayRef<unsigned int> KnownIDs = {}
¶void dropUnknownNonDebugMetadata(unsigned int ID1,
unsigned int ID2)
void dropUnknownNonDebugMetadata(unsigned int ID1,
unsigned int ID2)
Declared at: llvm/include/llvm/IR/Instruction.h:321
Parameters
- unsigned int ID1
- unsigned int ID2
¶void dropUnknownNonDebugMetadata(unsigned int ID1)
void dropUnknownNonDebugMetadata(unsigned int ID1)
Declared at: llvm/include/llvm/IR/Instruction.h:318
Parameters
- unsigned int ID1
¶void dropUnknownNonDebugMetadata()
void dropUnknownNonDebugMetadata()
Declared at: llvm/include/llvm/IR/Instruction.h:315
¶void dropUnknownNonDebugMetadata(
ArrayRef<unsigned int> KnownIDs)
void dropUnknownNonDebugMetadata(
ArrayRef<unsigned int> KnownIDs)
Description
Drop all unknown metadata except for debug locations. @ { Passes are required to drop metadata they don't understand. This is a convenience method for passes to do so. dropUndefImplyingAttrsAndUnknownMetadata should be used instead of this API if the Instruction being modified is a call.
Declared at: llvm/include/llvm/IR/Instruction.h:314
Parameters
- ArrayRef<unsigned int> KnownIDs
¶SymbolTableList<Instruction>::iterator
eraseFromParent()
SymbolTableList<Instruction>::iterator
eraseFromParent()
Description
This method unlinks 'this' from the containing basic block and deletes it.
Declared at: llvm/include/llvm/IR/Instruction.h:122
Returns
an iterator pointing to the element after the erased one
¶bool extractProfMetadata(uint64_t& TrueVal,
uint64_t& FalseVal) const
bool extractProfMetadata(uint64_t& TrueVal,
uint64_t& FalseVal) const
Description
Retrieve the raw weight values of a conditional branch or select. Returns true on success with profile weights filled in. Returns false if no metadata or invalid metadata was found.
Declared at: llvm/include/llvm/IR/Instruction.h:341
Parameters
- uint64_t& TrueVal
- uint64_t& FalseVal
¶bool extractProfTotalWeight(
uint64_t& TotalVal) const
bool extractProfTotalWeight(
uint64_t& TotalVal) const
Description
Retrieve total raw weight values of a branch. Returns true on success with profile total weights filled in. Returns false if no metadata was found.
Declared at: llvm/include/llvm/IR/Instruction.h:346
Parameters
- uint64_t& TotalVal
¶llvm::AAMDNodes getAAMetadata() const
llvm::AAMDNodes getAAMetadata() const
Description
Returns the AA metadata for this instruction.
Declared at: llvm/include/llvm/IR/Instruction.h:333
¶void getAllMetadata(
SmallVectorImpl<
std::pair<unsigned int, MDNode*>>& MDs)
const
void getAllMetadata(
SmallVectorImpl<
std::pair<unsigned int, MDNode*>>& MDs)
const
Description
Get all metadata attached to this Instruction. The first element of each pair returned is the KindID, the second element is the metadata value. This list is returned sorted by the KindID.
Declared at: llvm/include/llvm/IR/Instruction.h:280
Parameters
- SmallVectorImpl<std::pair<unsigned int, MDNode*>>& MDs
¶void getAllMetadataImpl(
SmallVectorImpl<
std::pair<unsigned int, MDNode*>>&) const
void getAllMetadataImpl(
SmallVectorImpl<
std::pair<unsigned int, MDNode*>>&) const
Declared at: llvm/include/llvm/IR/Instruction.h:514
Parameters
- SmallVectorImpl<std::pair<unsigned int, MDNode*>>&
¶void getAllMetadataOtherThanDebugLoc(
SmallVectorImpl<
std::pair<unsigned int, MDNode*>>& MDs)
const
void getAllMetadataOtherThanDebugLoc(
SmallVectorImpl<
std::pair<unsigned int, MDNode*>>& MDs)
const
Description
This does the same thing as getAllMetadata, except that it filters out the debug location.
Declared at: llvm/include/llvm/IR/Instruction.h:287
Parameters
- SmallVectorImpl<std::pair<unsigned int, MDNode*>>& MDs
¶const llvm::DebugLoc& getDebugLoc() const
const llvm::DebugLoc& getDebugLoc() const
Description
Return the debug location for this node as a DebugLoc.
Declared at: llvm/include/llvm/IR/Instruction.h:352
¶llvm::FastMathFlags getFastMathFlags() const
llvm::FastMathFlags getFastMathFlags() const
Description
Convenience function for getting all the fast-math flags, which must be an operator which supports these flags. See LangRef.html for the meaning of these flags.
Declared at: llvm/include/llvm/IR/Instruction.h:467
¶llvm::Function* getFunction()
llvm::Function* getFunction()
Declared at: llvm/include/llvm/IR/Instruction.h:110
¶const llvm::Function* getFunction() const
const llvm::Function* getFunction() const
Description
Return the function this instruction belongs to. Note: it is undefined behavior to call this on an instruction not currently inserted into a function.
Declared at: llvm/include/llvm/IR/Instruction.h:109
¶llvm::MDNode* getMetadata(
llvm::StringRef Kind) const
llvm::MDNode* getMetadata(
llvm::StringRef Kind) const
Description
Get the metadata of given kind attached to this Instruction. If the metadata is not found then return null.
Declared at: llvm/include/llvm/IR/Instruction.h:271
Parameters
- llvm::StringRef Kind
¶llvm::MDNode* getMetadata(
unsigned int KindID) const
llvm::MDNode* getMetadata(
unsigned int KindID) const
Description
Get the metadata of given kind attached to this Instruction. If the metadata is not found then return null.
Declared at: llvm/include/llvm/IR/Instruction.h:264
Parameters
- unsigned int KindID
¶llvm::MDNode* getMetadataImpl(
llvm::StringRef Kind) const
llvm::MDNode* getMetadataImpl(
llvm::StringRef Kind) const
Declared at: llvm/include/llvm/IR/Instruction.h:512
Parameters
- llvm::StringRef Kind
¶llvm::MDNode* getMetadataImpl(
unsigned int KindID) const
llvm::MDNode* getMetadataImpl(
unsigned int KindID) const
Declared at: llvm/include/llvm/IR/Instruction.h:511
Parameters
- unsigned int KindID
¶const llvm::Module* getModule() const
const llvm::Module* getModule() const
Description
Return the module owning the function this instruction belongs to or nullptr it the function does not have a module. Note: this is undefined behavior if the instruction does not have a parent, or the parent basic block does not have a parent function.
Declared at: llvm/include/llvm/IR/Instruction.h:99
¶llvm::Module* getModule()
llvm::Module* getModule()
Declared at: llvm/include/llvm/IR/Instruction.h:100
¶llvm::Instruction* getNextNonDebugInstruction(
bool SkipPseudoOp = false)
llvm::Instruction* getNextNonDebugInstruction(
bool SkipPseudoOp = false)
Declared at: llvm/include/llvm/IR/Instruction.h:675
Parameters
- bool SkipPseudoOp = false
¶const llvm::Instruction*
getNextNonDebugInstruction(
bool SkipPseudoOp = false) const
const llvm::Instruction*
getNextNonDebugInstruction(
bool SkipPseudoOp = false) const
Description
Return a pointer to the next non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists. Skip any pseudo operations if \c SkipPseudoOp is true.
Declared at: llvm/include/llvm/IR/Instruction.h:674
Parameters
- bool SkipPseudoOp = false
¶unsigned int getNumSuccessors() const
unsigned int getNumSuccessors() const
Description
Return the number of successors that this instruction has. The instruction must be a terminator.
Declared at: llvm/include/llvm/IR/Instruction.h:736
¶unsigned int getOpcode() const
unsigned int getOpcode() const
Description
Returns a member of one of the enums like Instruction::Add.
Declared at: llvm/include/llvm/IR/Instruction.h:157
¶static const char* getOpcodeName(
unsigned int OpCode)
static const char* getOpcodeName(
unsigned int OpCode)
Declared at: llvm/include/llvm/IR/Instruction.h:175
Parameters
- unsigned int OpCode
¶const char* getOpcodeName() const
const char* getOpcodeName() const
Declared at: llvm/include/llvm/IR/Instruction.h:159
¶inline llvm::BasicBlock* getParent()
inline llvm::BasicBlock* getParent()
Declared at: llvm/include/llvm/IR/Instruction.h:92
¶inline const llvm::BasicBlock* getParent() const
inline const llvm::BasicBlock* getParent() const
Declared at: llvm/include/llvm/IR/Instruction.h:91
¶const llvm::Instruction*
getPrevNonDebugInstruction(
bool SkipPseudoOp = false) const
const llvm::Instruction*
getPrevNonDebugInstruction(
bool SkipPseudoOp = false) const
Description
Return a pointer to the previous non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists. Skip any pseudo operations if \c SkipPseudoOp is true.
Declared at: llvm/include/llvm/IR/Instruction.h:685
Parameters
- bool SkipPseudoOp = false
¶llvm::Instruction* getPrevNonDebugInstruction(
bool SkipPseudoOp = false)
llvm::Instruction* getPrevNonDebugInstruction(
bool SkipPseudoOp = false)
Declared at: llvm/include/llvm/IR/Instruction.h:686
Parameters
- bool SkipPseudoOp = false
¶template <typename BitfieldElement>
typename BitfieldElement::Type getSubclassData()
const
template <typename BitfieldElement>
typename BitfieldElement::Type getSubclassData()
const
Declared at: llvm/include/llvm/IR/Instruction.h:827
Templates
- BitfieldElement
¶unsigned short getSubclassDataFromValue() const
unsigned short getSubclassDataFromValue() const
Declared at: llvm/include/llvm/IR/Instruction.h:816
¶llvm::BasicBlock* getSuccessor(
unsigned int Idx) const
llvm::BasicBlock* getSuccessor(
unsigned int Idx) const
Description
Return the specified successor. This instruction must be a terminator.
Declared at: llvm/include/llvm/IR/Instruction.h:739
Parameters
- unsigned int Idx
¶bool hasAllowContract() const
bool hasAllowContract() const
Description
Determine whether the allow-contract flag is set.
Declared at: llvm/include/llvm/IR/Instruction.h:459
¶bool hasAllowReassoc() const
bool hasAllowReassoc() const
Description
Determine whether the allow-reassociation flag is set.
Declared at: llvm/include/llvm/IR/Instruction.h:444
¶bool hasAllowReciprocal() const
bool hasAllowReciprocal() const
Description
Determine whether the allow-reciprocal flag is set.
Declared at: llvm/include/llvm/IR/Instruction.h:456
¶bool hasApproxFunc() const
bool hasApproxFunc() const
Description
Determine whether the approximate-math-functions flag is set.
Declared at: llvm/include/llvm/IR/Instruction.h:462
¶bool hasAtomicLoad() const
bool hasAtomicLoad() const
Description
Return true if this atomic instruction loads from memory.
Declared at: llvm/include/llvm/IR/Instruction.h:593
¶bool hasAtomicStore() const
bool hasAtomicStore() const
Description
Return true if this atomic instruction stores to memory.
Declared at: llvm/include/llvm/IR/Instruction.h:596
¶bool hasMetadata(llvm::StringRef Kind) const
bool hasMetadata(llvm::StringRef Kind) const
Description
Return true if this instruction has the given type of metadata attached.
Declared at: llvm/include/llvm/IR/Instruction.h:258
Parameters
- llvm::StringRef Kind
¶bool hasMetadata(unsigned int KindID) const
bool hasMetadata(unsigned int KindID) const
Description
Return true if this instruction has the given type of metadata attached.
Declared at: llvm/include/llvm/IR/Instruction.h:253
Parameters
- unsigned int KindID
¶bool hasMetadata() const
bool hasMetadata() const
Description
Return true if this instruction has any metadata attached to it.
Declared at: llvm/include/llvm/IR/Instruction.h:246
¶bool hasMetadataOtherThanDebugLoc() const
bool hasMetadataOtherThanDebugLoc() const
Description
Return true if this instruction has metadata attached to it other than a debug location.
Declared at: llvm/include/llvm/IR/Instruction.h:250
¶bool hasNoInfs() const
bool hasNoInfs() const
Description
Determine whether the no-infs flag is set.
Declared at: llvm/include/llvm/IR/Instruction.h:450
¶bool hasNoNaNs() const
bool hasNoNaNs() const
Description
Determine whether the no-NaNs flag is set.
Declared at: llvm/include/llvm/IR/Instruction.h:447
¶bool hasNoSignedWrap() const
bool hasNoSignedWrap() const
Description
Determine whether the no signed wrap flag is set.
Declared at: llvm/include/llvm/IR/Instruction.h:370
¶bool hasNoSignedZeros() const
bool hasNoSignedZeros() const
Description
Determine whether the no-signed-zeros flag is set.
Declared at: llvm/include/llvm/IR/Instruction.h:453
¶bool hasNoUnsignedWrap() const
bool hasNoUnsignedWrap() const
Description
Determine whether the no unsigned wrap flag is set.
Declared at: llvm/include/llvm/IR/Instruction.h:367
¶bool hasPoisonGeneratingFlags() const
bool hasPoisonGeneratingFlags() const
Description
Return true if this operator has flags which may cause this instruction to evaluate to poison despite having non-poison inputs.
Declared at: llvm/include/llvm/IR/Instruction.h:374
¶void insertAfter(llvm::Instruction* InsertPos)
void insertAfter(llvm::Instruction* InsertPos)
Description
Insert an unlinked instruction into a basic block immediately after the specified instruction.
Declared at: llvm/include/llvm/IR/Instruction.h:130
Parameters
- llvm::Instruction* InsertPos
¶void insertBefore(llvm::Instruction* InsertPos)
void insertBefore(llvm::Instruction* InsertPos)
Description
Insert an unlinked instruction into a basic block immediately before the specified instruction.
Declared at: llvm/include/llvm/IR/Instruction.h:126
Parameters
- llvm::Instruction* InsertPos
¶inline bool isArithmeticShift() const
inline bool isArithmeticShift() const
Description
Return true if this is an arithmetic shift right.
Declared at: llvm/include/llvm/IR/Instruction.h:203
¶static bool isAssociative(unsigned int Opcode)
static bool isAssociative(unsigned int Opcode)
Declared at: llvm/include/llvm/IR/Instruction.h:528
Parameters
- unsigned int Opcode
¶bool isAssociative() const
bool isAssociative() const
Description
Return true if the instruction is associative: Associative operators satisfy: x op (y op z) === (x op y) op z In LLVM, the Add, Mul, And, Or, and Xor operators are associative.
Declared at: llvm/include/llvm/IR/Instruction.h:527
¶bool isAtomic() const
bool isAtomic() const
Description
Return true if this instruction has an AtomicOrdering of unordered or higher.
Declared at: llvm/include/llvm/IR/Instruction.h:590
¶bool isBinaryOp() const
bool isBinaryOp() const
Declared at: llvm/include/llvm/IR/Instruction.h:162
¶static inline bool isBinaryOp(unsigned int Opcode)
static inline bool isBinaryOp(unsigned int Opcode)
Declared at: llvm/include/llvm/IR/Instruction.h:184
Parameters
- unsigned int Opcode
¶static inline bool isBitwiseLogicOp(
unsigned int Opcode)
static inline bool isBitwiseLogicOp(
unsigned int Opcode)
Description
Determine if the Opcode is and/or/xor.
Declared at: llvm/include/llvm/IR/Instruction.h:208
Parameters
- unsigned int Opcode
¶inline bool isBitwiseLogicOp() const
inline bool isBitwiseLogicOp() const
Description
Return true if this is and/or/xor.
Declared at: llvm/include/llvm/IR/Instruction.h:213
¶bool isCast() const
bool isCast() const
Declared at: llvm/include/llvm/IR/Instruction.h:165
¶static inline bool isCast(unsigned int OpCode)
static inline bool isCast(unsigned int OpCode)
Description
Determine if the OpCode is one of the CastInst instructions.
Declared at: llvm/include/llvm/IR/Instruction.h:218
Parameters
- unsigned int OpCode
¶bool isCommutative() const
bool isCommutative() const
Description
Return true if the instruction is commutative: Commutative operators satisfy: (x op y) === (y op x) In LLVM, these are the commutative operators, plus SetEQ and SetNE, when applied to any type.
Declared at: llvm/include/llvm/IR/Instruction.h:540
¶static bool isCommutative(unsigned int Opcode)
static bool isCommutative(unsigned int Opcode)
Declared at: llvm/include/llvm/IR/Instruction.h:541
Parameters
- unsigned int Opcode
¶bool isDebugOrPseudoInst() const
bool isDebugOrPseudoInst() const
Description
Return true if the instruction is a DbgInfoIntrinsic or PseudoProbeInst.
Declared at: llvm/include/llvm/IR/Instruction.h:668
¶bool isEHPad() const
bool isEHPad() const
Description
Return true if the instruction is a variety of EH-block.
Declared at: llvm/include/llvm/IR/Instruction.h:647
¶bool isExact() const
bool isExact() const
Description
Determine whether the exact flag is set.
Declared at: llvm/include/llvm/IR/Instruction.h:388
¶static inline bool isExceptionalTerminator(
unsigned int OpCode)
static inline bool isExceptionalTerminator(
unsigned int OpCode)
Description
Returns true if the OpCode is a terminator related to exception handling.
Declared at: llvm/include/llvm/IR/Instruction.h:228
Parameters
- unsigned int OpCode
¶bool isExceptionalTerminator() const
bool isExceptionalTerminator() const
Declared at: llvm/include/llvm/IR/Instruction.h:167
¶bool isFast() const
bool isFast() const
Description
Determine whether all fast-math-flags are set.
Declared at: llvm/include/llvm/IR/Instruction.h:441
¶bool isFenceLike() const
bool isFenceLike() const
Description
Return true if this instruction behaves like a memory fence: it can load or store to memory location without being given a memory location.
Declared at: llvm/include/llvm/IR/Instruction.h:606
¶static inline bool isFuncletPad(
unsigned int OpCode)
static inline bool isFuncletPad(
unsigned int OpCode)
Description
Determine if the OpCode is one of the FuncletPadInst instructions.
Declared at: llvm/include/llvm/IR/Instruction.h:223
Parameters
- unsigned int OpCode
¶bool isFuncletPad() const
bool isFuncletPad() const
Declared at: llvm/include/llvm/IR/Instruction.h:166
¶bool isIdempotent() const
bool isIdempotent() const
Description
Return true if the instruction is idempotent: Idempotent operators satisfy: x op x === x In LLVM, the And and Or operators are idempotent.
Declared at: llvm/include/llvm/IR/Instruction.h:558
¶static bool isIdempotent(unsigned int Opcode)
static bool isIdempotent(unsigned int Opcode)
Declared at: llvm/include/llvm/IR/Instruction.h:559
Parameters
- unsigned int Opcode
¶bool isIdenticalTo(
const llvm::Instruction* I) const
bool isIdenticalTo(
const llvm::Instruction* I) const
Description
Return true if the specified instruction is exactly identical to the current one. This means that all operands match and any extra information (e.g. load is volatile) agree.
Declared at: llvm/include/llvm/IR/Instruction.h:702
Parameters
- const llvm::Instruction* I
¶bool isIdenticalToWhenDefined(
const llvm::Instruction* I) const
bool isIdenticalToWhenDefined(
const llvm::Instruction* I) const
Description
This is like isIdenticalTo, except that it ignores the SubclassOptionalData flags, which may specify conditions under which the instruction's result is undefined.
Declared at: llvm/include/llvm/IR/Instruction.h:707
Parameters
- const llvm::Instruction* I
¶static inline bool isIntDivRem(
unsigned int Opcode)
static inline bool isIntDivRem(
unsigned int Opcode)
Declared at: llvm/include/llvm/IR/Instruction.h:188
Parameters
- unsigned int Opcode
¶bool isIntDivRem() const
bool isIntDivRem() const
Declared at: llvm/include/llvm/IR/Instruction.h:163
¶bool isLaunderOrStripInvariantGroup() const
bool isLaunderOrStripInvariantGroup() const
Description
Return true if the instruction is a llvm.launder.invariant.group or llvm.strip.invariant.group.
Declared at: llvm/include/llvm/IR/Instruction.h:665
¶bool isLifetimeStartOrEnd() const
bool isLifetimeStartOrEnd() const
Description
Return true if the instruction is a llvm.lifetime.start or llvm.lifetime.end marker.
Declared at: llvm/include/llvm/IR/Instruction.h:661
¶inline bool isLogicalShift() const
inline bool isLogicalShift() const
Description
Return true if this is a logical shift left or a logical shift right.
Declared at: llvm/include/llvm/IR/Instruction.h:198
¶static bool isNilpotent(unsigned int Opcode)
static bool isNilpotent(unsigned int Opcode)
Declared at: llvm/include/llvm/IR/Instruction.h:573
Parameters
- unsigned int Opcode
¶bool isNilpotent() const
bool isNilpotent() const
Description
Return true if the instruction is nilpotent: Nilpotent operators satisfy: x op x === Id, where Id is the identity for the operator, i.e. a constant such that x op Id === x and Id op x === x for all x. In LLVM, the Xor operator is nilpotent.
Declared at: llvm/include/llvm/IR/Instruction.h:572
¶bool isOnlyUserOfAnyOperand()
bool isOnlyUserOfAnyOperand()
Description
It checks if this instruction is the only user of at least one of its operands.
Declared at: llvm/include/llvm/IR/Instruction.h:173
¶bool isSafeToRemove() const
bool isSafeToRemove() const
Description
Return true if the instruction can be removed if the result is unused. When constant folding some instructions cannot be removed even if their results are unused. Specifically terminator instructions and calls that may have side effects cannot be removed without semantically changing the generated program.
Declared at: llvm/include/llvm/IR/Instruction.h:640
¶bool isSameOperationAs(
const llvm::Instruction* I,
unsigned int flags = 0) const
bool isSameOperationAs(
const llvm::Instruction* I,
unsigned int flags = 0) const
Description
This function determines if the specified instruction executes the same operation as the current one. This means that the opcodes, type, operand types and any other factors affecting the operation must be the same. This is similar to isIdenticalTo except the operands themselves don't have to be identical.
Declared at: llvm/include/llvm/IR/Instruction.h:727
Parameters
- const llvm::Instruction* I
- unsigned int flags = 0
Returns
true if the specified instruction is the same operation as the current one. Determine if one instruction is the same operation as another.
¶static inline bool isShift(unsigned int Opcode)
static inline bool isShift(unsigned int Opcode)
Description
Determine if the Opcode is one of the shift instructions.
Declared at: llvm/include/llvm/IR/Instruction.h:193
Parameters
- unsigned int Opcode
¶bool isShift() const
bool isShift() const
Declared at: llvm/include/llvm/IR/Instruction.h:164
¶static inline bool isTerminator(
unsigned int OpCode)
static inline bool isTerminator(
unsigned int OpCode)
Declared at: llvm/include/llvm/IR/Instruction.h:177
Parameters
- unsigned int OpCode
¶bool isTerminator() const
bool isTerminator() const
Declared at: llvm/include/llvm/IR/Instruction.h:160
¶bool isUnaryOp() const
bool isUnaryOp() const
Declared at: llvm/include/llvm/IR/Instruction.h:161
¶static inline bool isUnaryOp(unsigned int Opcode)
static inline bool isUnaryOp(unsigned int Opcode)
Declared at: llvm/include/llvm/IR/Instruction.h:181
Parameters
- unsigned int Opcode
¶bool isUsedOutsideOfBlock(
const llvm::BasicBlock* BB) const
bool isUsedOutsideOfBlock(
const llvm::BasicBlock* BB) const
Description
Return true if there are any uses of this instruction in blocks other than the specified block. Note that PHI nodes are considered to evaluate their operands in the corresponding predecessor block.
Declared at: llvm/include/llvm/IR/Instruction.h:732
Parameters
- const llvm::BasicBlock* BB
¶bool isVolatile() const
bool isVolatile() const
Description
Return true if this instruction has a volatile memory access.
Declared at: llvm/include/llvm/IR/Instruction.h:599
¶bool mayHaveSideEffects() const
bool mayHaveSideEffects() const
Description
Return true if the instruction may have side effects. Side effects are: * Writing to memory. * Unwinding. * Not returning (e.g. an infinite loop). Note that this does not consider malloc and alloca to have side effects because the newly allocated memory is completely invisible to instructions which don't use the returned value. For cases where this matters, isSafeToSpeculativelyExecute may be more appropriate.
Declared at: llvm/include/llvm/IR/Instruction.h:632
¶bool mayReadFromMemory() const
bool mayReadFromMemory() const
Description
Return true if this instruction may read memory.
Declared at: llvm/include/llvm/IR/Instruction.h:581
¶bool mayReadOrWriteMemory() const
bool mayReadOrWriteMemory() const
Description
Return true if this instruction may read or write memory.
Declared at: llvm/include/llvm/IR/Instruction.h:584
¶bool mayThrow() const
bool mayThrow() const
Description
Return true if this instruction may throw an exception.
Declared at: llvm/include/llvm/IR/Instruction.h:602
¶bool mayWriteToMemory() const
bool mayWriteToMemory() const
Description
Return true if this instruction may modify memory.
Declared at: llvm/include/llvm/IR/Instruction.h:578
¶void moveAfter(llvm::Instruction* MovePos)
void moveAfter(llvm::Instruction* MovePos)
Description
Unlink this instruction from its current basic block and insert it into the basic block that MovePos lives in, right after MovePos.
Declared at: llvm/include/llvm/IR/Instruction.h:143
Parameters
- llvm::Instruction* MovePos
¶void moveBefore(
llvm::BasicBlock& BB,
SymbolTableList<Instruction>::iterator I)
void moveBefore(
llvm::BasicBlock& BB,
SymbolTableList<Instruction>::iterator I)
Description
Unlink this instruction and insert into BB before I.
Declared at: llvm/include/llvm/IR/Instruction.h:139
Parameters
- llvm::BasicBlock& BB
- SymbolTableList<Instruction>::iterator I
¶void moveBefore(llvm::Instruction* MovePos)
void moveBefore(llvm::Instruction* MovePos)
Description
Unlink this instruction from its current basic block and insert it into the basic block that MovePos lives in, right before MovePos.
Declared at: llvm/include/llvm/IR/Instruction.h:134
Parameters
- llvm::Instruction* MovePos
¶void removeFromParent()
void removeFromParent()
Description
This method unlinks 'this' from the containing basic block, but does not delete it.
Declared at: llvm/include/llvm/IR/Instruction.h:117
¶void replaceSuccessorWith(llvm::BasicBlock* OldBB,
llvm::BasicBlock* NewBB)
void replaceSuccessorWith(llvm::BasicBlock* OldBB,
llvm::BasicBlock* NewBB)
Description
Replace specified successor OldBB to point at the provided block. This instruction must be a terminator.
Declared at: llvm/include/llvm/IR/Instruction.h:747
Parameters
- llvm::BasicBlock* OldBB
- llvm::BasicBlock* NewBB
¶void setAAMetadata(const llvm::AAMDNodes& N)
void setAAMetadata(const llvm::AAMDNodes& N)
Description
Sets the AA metadata on this instruction from the AAMDNodes structure.
Declared at: llvm/include/llvm/IR/Instruction.h:336
Parameters
- const llvm::AAMDNodes& N
¶void setDebugLoc(llvm::DebugLoc Loc)
void setDebugLoc(llvm::DebugLoc Loc)
Description
Set the debug location information for this instruction.
Declared at: llvm/include/llvm/IR/Instruction.h:349
Parameters
- llvm::DebugLoc Loc
¶void setFast(bool B)
void setFast(bool B)
Description
Set or clear all fast-math-flags on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:393
Parameters
- bool B
¶void setFastMathFlags(llvm::FastMathFlags FMF)
void setFastMathFlags(llvm::FastMathFlags FMF)
Description
Convenience function for setting multiple fast-math flags on this instruction, which must be an operator which supports these flags. See LangRef.html for the meaning of these flags.
Declared at: llvm/include/llvm/IR/Instruction.h:433
Parameters
¶void setHasAllowContract(bool B)
void setHasAllowContract(bool B)
Description
Set or clear the allow-contract flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:423
Parameters
- bool B
¶void setHasAllowReassoc(bool B)
void setHasAllowReassoc(bool B)
Description
Set or clear the reassociation flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:398
Parameters
- bool B
¶void setHasAllowReciprocal(bool B)
void setHasAllowReciprocal(bool B)
Description
Set or clear the allow-reciprocal flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:418
Parameters
- bool B
¶void setHasApproxFunc(bool B)
void setHasApproxFunc(bool B)
Description
Set or clear the approximate-math-functions flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:428
Parameters
- bool B
¶void setHasNoInfs(bool B)
void setHasNoInfs(bool B)
Description
Set or clear the no-infs flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:408
Parameters
- bool B
¶void setHasNoNaNs(bool B)
void setHasNoNaNs(bool B)
Description
Set or clear the no-nans flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:403
Parameters
- bool B
¶void setHasNoSignedWrap(bool b = true)
void setHasNoSignedWrap(bool b = true)
Description
Set or clear the nsw flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:360
Parameters
- bool b = true
¶void setHasNoSignedZeros(bool B)
void setHasNoSignedZeros(bool B)
Description
Set or clear the no-signed-zeros flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:413
Parameters
- bool B
¶void setHasNoUnsignedWrap(bool b = true)
void setHasNoUnsignedWrap(bool b = true)
Description
Set or clear the nuw flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:356
Parameters
- bool b = true
¶void setIsExact(bool b = true)
void setIsExact(bool b = true)
Description
Set or clear the exact flag on this instruction, which must be an operator which supports this flag. See LangRef.html for the meaning of this flag.
Declared at: llvm/include/llvm/IR/Instruction.h:364
Parameters
- bool b = true
¶void setMetadata(unsigned int KindID,
llvm::MDNode* Node)
void setMetadata(unsigned int KindID,
llvm::MDNode* Node)
Description
Set the metadata of the specified kind to the specified node. This updates or replaces metadata if already present, or removes it if Node is null.
Declared at: llvm/include/llvm/IR/Instruction.h:294
Parameters
- unsigned int KindID
- llvm::MDNode* Node
¶void setMetadata(llvm::StringRef Kind,
llvm::MDNode* Node)
void setMetadata(llvm::StringRef Kind,
llvm::MDNode* Node)
Declared at: llvm/include/llvm/IR/Instruction.h:295
Parameters
- llvm::StringRef Kind
- llvm::MDNode* Node
¶void setParent(llvm::BasicBlock* P)
void setParent(llvm::BasicBlock* P)
Declared at: llvm/include/llvm/IR/Instruction.h:820
Parameters
¶template <typename BitfieldElement>
void setSubclassData(
typename BitfieldElement::Type Value)
template <typename BitfieldElement>
void setSubclassData(
typename BitfieldElement::Type Value)
Declared at: llvm/include/llvm/IR/Instruction.h:836
Templates
- BitfieldElement
Parameters
- typename BitfieldElement::Type Value
¶void setSuccessor(unsigned int Idx,
llvm::BasicBlock* BB)
void setSuccessor(unsigned int Idx,
llvm::BasicBlock* BB)
Description
Update the specified successor to point at the provided block. This instruction must be a terminator.
Declared at: llvm/include/llvm/IR/Instruction.h:743
Parameters
- unsigned int Idx
- llvm::BasicBlock* BB
¶void setValueSubclassData(unsigned short D)
void setValueSubclassData(unsigned short D)
Declared at: llvm/include/llvm/IR/Instruction.h:812
Parameters
- unsigned short D
¶void swapProfMetadata()
void swapProfMetadata()
Description
If the instruction has "branch_weights" MD_prof metadata and the MDNode has three operands (including name string), swap the order of the metadata.
Declared at: llvm/include/llvm/IR/Instruction.h:306
¶void updateLocationAfterHoist()
void updateLocationAfterHoist()
Description
Updates the debug location given that the instruction has been hoisted from a block to a predecessor of that block. Note: it is undefined behavior to call this on an instruction not currently inserted into a function.
Declared at: llvm/include/llvm/IR/Instruction.h:499
¶const llvm::Instruction* user_back() const
const llvm::Instruction* user_back() const
Declared at: llvm/include/llvm/IR/Instruction.h:89
¶llvm::Instruction* user_back()
llvm::Instruction* user_back()
Description
Specialize the methods defined in Value, as we know that an instruction can only be used by other instructions.
Declared at: llvm/include/llvm/IR/Instruction.h:88
¶bool willReturn() const
bool willReturn() const
Description
Return true if the instruction will return (unwinding is considered as a form of returning control flow here).
Declared at: llvm/include/llvm/IR/Instruction.h:644
¶~Instruction()
~Instruction()
Declared at: llvm/include/llvm/IR/Instruction.h:80