LLVM  6.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
llvm::Instruction Class Reference

#include "llvm/IR/Instruction.h"

Inheritance diagram for llvm::Instruction:
Inheritance graph
[legend]
Collaboration diagram for llvm::Instruction:
Collaboration graph
[legend]

Public Types

enum  OperationEquivalenceFlags { CompareIgnoringAlignment = 1<<0, CompareUsingScalarTypes = 1<<1 }
 When checking for operation equivalence (using isSameOperationAs) it is sometimes useful to ignore certain attributes. More...
 
enum  TermOps
 
enum  BinaryOps
 
enum  MemoryOps
 
enum  CastOps
 
enum  FuncletPadOps
 
enum  OtherOps
 
- Public Types inherited from llvm::User
using op_iterator = Use *
 
using const_op_iterator = const Use *
 
using op_range = iterator_range< op_iterator >
 
using const_op_range = iterator_range< const_op_iterator >
 
- Public Types inherited from llvm::Value
enum  ValueTy
 Concrete subclass of this. More...
 
using use_iterator = use_iterator_impl< Use >
 
using const_use_iterator = use_iterator_impl< const Use >
 
using user_iterator = user_iterator_impl< User >
 
using const_user_iterator = user_iterator_impl< const User >
 

Public Member Functions

 Instruction (const Instruction &)=delete
 
Instructionoperator= (const Instruction &)=delete
 
Instructionuser_back ()
 Specialize the methods defined in Value, as we know that an instruction can only be used by other instructions. More...
 
const Instructionuser_back () const
 
const BasicBlockgetParent () const
 
BasicBlockgetParent ()
 
const ModulegetModule () const
 Return the module owning the function this instruction belongs to or nullptr it the function does not have a module. More...
 
ModulegetModule ()
 
const FunctiongetFunction () const
 Return the function this instruction belongs to. More...
 
FunctiongetFunction ()
 
void removeFromParent ()
 This method unlinks 'this' from the containing basic block, but does not delete it. More...
 
SymbolTableList< Instruction >::iterator eraseFromParent ()
 This method unlinks 'this' from the containing basic block and deletes it. More...
 
void insertBefore (Instruction *InsertPos)
 Insert an unlinked instruction into a basic block immediately before the specified instruction. More...
 
void insertAfter (Instruction *InsertPos)
 Insert an unlinked instruction into a basic block immediately after the specified instruction. More...
 
void moveBefore (Instruction *MovePos)
 Unlink this instruction from its current basic block and insert it into the basic block that MovePos lives in, right before MovePos. More...
 
void moveBefore (BasicBlock &BB, SymbolTableList< Instruction >::iterator I)
 Unlink this instruction and insert into BB before I. More...
 
void moveAfter (Instruction *MovePos)
 Unlink this instruction from its current basic block and insert it into the basic block that MovePos lives in, right after MovePos. More...
 
unsigned getOpcode () const
 Returns a member of one of the enums like Instruction::Add. More...
 
const chargetOpcodeName () const
 
bool isTerminator () const
 
bool isBinaryOp () const
 
bool isShift ()
 
bool isCast () const
 
bool isFuncletPad () const
 
bool isLogicalShift () const
 Return true if this is a logical shift left or a logical shift right. More...
 
bool isArithmeticShift () const
 Return true if this is an arithmetic shift right. More...
 
bool isBitwiseLogicOp () const
 Return true if this is and/or/xor. More...
 
bool hasMetadata () const
 Return true if this instruction has any metadata attached to it. More...
 
bool hasMetadataOtherThanDebugLoc () const
 Return true if this instruction has metadata attached to it other than a debug location. More...
 
MDNodegetMetadata (unsigned KindID) const
 Get the metadata of given kind attached to this Instruction. More...
 
MDNodegetMetadata (StringRef Kind) const
 Get the metadata of given kind attached to this Instruction. More...
 
void getAllMetadata (SmallVectorImpl< std::pair< unsigned, MDNode *>> &MDs) const
 Get all metadata attached to this Instruction. More...
 
void getAllMetadataOtherThanDebugLoc (SmallVectorImpl< std::pair< unsigned, MDNode *>> &MDs) const
 This does the same thing as getAllMetadata, except that it filters out the debug location. More...
 
void getAAMetadata (AAMDNodes &N, bool Merge=false) const
 Fills the AAMDNodes structure with AA metadata from this instruction. More...
 
void setMetadata (unsigned KindID, MDNode *Node)
 Set the metadata of the specified kind to the specified node. More...
 
void setMetadata (StringRef Kind, MDNode *Node)
 
void copyMetadata (const Instruction &SrcInst, ArrayRef< unsigned > WL=ArrayRef< unsigned >())
 Copy metadata from SrcInst to this instruction. More...
 
void swapProfMetadata ()
 If the instruction has "branch_weights" MD_prof metadata and the MDNode has three operands (including name string), swap the order of the metadata. More...
 
void setAAMetadata (const AAMDNodes &N)
 Sets the metadata on this instruction from the AAMDNodes structure. More...
 
bool extractProfMetadata (uint64_t &TrueVal, uint64_t &FalseVal) const
 Retrieve the raw weight values of a conditional branch or select. More...
 
bool extractProfTotalWeight (uint64_t &TotalVal) const
 Retrieve total raw weight values of a branch. More...
 
void updateProfWeight (uint64_t S, uint64_t T)
 Updates branch_weights metadata by scaling it by S / T. More...
 
void setProfWeight (uint64_t W)
 Sets the branch_weights metadata to W for CallInst. More...
 
void setDebugLoc (DebugLoc Loc)
 Set the debug location information for this instruction. More...
 
const DebugLocgetDebugLoc () const
 Return the debug location for this node as a DebugLoc. More...
 
void setHasNoUnsignedWrap (bool b=true)
 Set or clear the nsw flag on this instruction, which must be an operator which supports this flag. More...
 
void setHasNoSignedWrap (bool b=true)
 Set or clear the nsw flag on this instruction, which must be an operator which supports this flag. More...
 
void setIsExact (bool b=true)
 Set or clear the exact flag on this instruction, which must be an operator which supports this flag. More...
 
bool hasNoUnsignedWrap () const
 Determine whether the no unsigned wrap flag is set. More...
 
bool hasNoSignedWrap () const
 Determine whether the no signed wrap flag is set. More...
 
void dropPoisonGeneratingFlags ()
 Drops flags that may cause this instruction to evaluate to poison despite having non-poison inputs. More...
 
bool isExact () const
 Determine whether the exact flag is set. More...
 
void setFast (bool B)
 Set or clear all fast-math-flags on this instruction, which must be an operator which supports this flag. More...
 
void setHasAllowReassoc (bool B)
 Set or clear the reassociation flag on this instruction, which must be an operator which supports this flag. More...
 
void setHasNoNaNs (bool B)
 Set or clear the no-nans flag on this instruction, which must be an operator which supports this flag. More...
 
void setHasNoInfs (bool B)
 Set or clear the no-infs flag on this instruction, which must be an operator which supports this flag. More...
 
void setHasNoSignedZeros (bool B)
 Set or clear the no-signed-zeros flag on this instruction, which must be an operator which supports this flag. More...
 
void setHasAllowReciprocal (bool B)
 Set or clear the allow-reciprocal flag on this instruction, which must be an operator which supports this flag. More...
 
void setHasApproxFunc (bool B)
 Set or clear the approximate-math-functions flag on this instruction, which must be an operator which supports this flag. More...
 
void setFastMathFlags (FastMathFlags FMF)
 Convenience function for setting multiple fast-math flags on this instruction, which must be an operator which supports these flags. More...
 
void copyFastMathFlags (FastMathFlags FMF)
 Convenience function for transferring all fast-math flag values to this instruction, which must be an operator which supports these flags. More...
 
bool isFast () const
 Determine whether all fast-math-flags are set. More...
 
bool hasAllowReassoc () const
 Determine whether the allow-reassociation flag is set. More...
 
bool hasNoNaNs () const
 Determine whether the no-NaNs flag is set. More...
 
bool hasNoInfs () const
 Determine whether the no-infs flag is set. More...
 
bool hasNoSignedZeros () const
 Determine whether the no-signed-zeros flag is set. More...
 
bool hasAllowReciprocal () const
 Determine whether the allow-reciprocal flag is set. More...
 
bool hasAllowContract () const
 Determine whether the allow-contract flag is set. More...
 
bool hasApproxFunc () const
 Determine whether the approximate-math-functions flag is set. More...
 
FastMathFlags getFastMathFlags () const
 Convenience function for getting all the fast-math flags, which must be an operator which supports these flags. More...
 
void copyFastMathFlags (const Instruction *I)
 Copy I's fast-math flags. More...
 
void copyIRFlags (const Value *V, bool IncludeWrapFlags=true)
 Convenience method to copy supported exact, fast-math, and (optionally) wrapping flags from V to this instruction. More...
 
void andIRFlags (const Value *V)
 Logical 'and' of any supported wrapping, exact, and fast-math flags of V and this instruction. More...
 
void applyMergedLocation (const DILocation *LocA, const DILocation *LocB)
 Merge 2 debug locations and apply it to the Instruction. More...
 
bool isAssociative () const LLVM_READONLY
 Return true if the instruction is associative: More...
 
bool isCommutative () const
 Return true if the instruction is commutative: More...
 
bool isIdempotent () const
 Return true if the instruction is idempotent: More...
 
bool isNilpotent () const
 Return true if the instruction is nilpotent: More...
 
bool mayWriteToMemory () const
 Return true if this instruction may modify memory. More...
 
bool mayReadFromMemory () const
 Return true if this instruction may read memory. More...
 
bool mayReadOrWriteMemory () const
 Return true if this instruction may read or write memory. More...
 
bool isAtomic () const
 Return true if this instruction has an AtomicOrdering of unordered or higher. More...
 
bool hasAtomicLoad () const
 Return true if this atomic instruction loads from memory. More...
 
bool hasAtomicStore () const
 Return true if this atomic instruction stores to memory. More...
 
bool mayThrow () const
 Return true if this instruction may throw an exception. More...
 
bool isFenceLike () const
 Return true if this instruction behaves like a memory fence: it can load or store to memory location without being given a memory location. More...
 
bool mayHaveSideEffects () const
 Return true if the instruction may have side effects. More...
 
bool isEHPad () const
 Return true if the instruction is a variety of EH-block. More...
 
Instructionclone () const
 Create a copy of 'this' instruction that is identical in all ways except the following: More...
 
bool isIdenticalTo (const Instruction *I) const
 Return true if the specified instruction is exactly identical to the current one. More...
 
bool isIdenticalToWhenDefined (const Instruction *I) const
 This is like isIdenticalTo, except that it ignores the SubclassOptionalData flags, which may specify conditions under which the instruction's result is undefined. More...
 
bool isSameOperationAs (const Instruction *I, unsigned flags=0) const
 This function determines if the specified instruction executes the same operation as the current one. More...
 
bool isUsedOutsideOfBlock (const BasicBlock *BB) const
 Return true if there are any uses of this instruction in blocks other than the specified block. More...
 
void dropUnknownNonDebugMetadata (ArrayRef< unsigned > KnownIDs)
 Drop all unknown metadata except for debug locations. More...
 
void dropUnknownNonDebugMetadata ()
 
void dropUnknownNonDebugMetadata (unsigned ID1)
 
void dropUnknownNonDebugMetadata (unsigned ID1, unsigned ID2)
 
- Public Member Functions inherited from llvm::User
 User (const User &)=delete
 
void operator delete (void *Usr)
 Free memory allocated for User and Use objects. More...
 
void operator delete (void *, unsigned)
 Placement delete - required by std, but never called. More...
 
void operator delete (void *, unsigned, bool)
 Placement delete - required by std, but never called. More...
 
const UsegetOperandList () const
 
UsegetOperandList ()
 
ValuegetOperand (unsigned i) const
 
void setOperand (unsigned i, Value *Val)
 
const UsegetOperandUse (unsigned i) const
 
UsegetOperandUse (unsigned i)
 
unsigned getNumOperands () const
 
ArrayRef< const uint8_t > getDescriptor () const
 Returns the descriptor co-allocated with this User instance. More...
 
MutableArrayRef< uint8_t > getDescriptor ()
 Returns the descriptor co-allocated with this User instance. More...
 
void setGlobalVariableNumOperands (unsigned NumOps)
 Set the number of operands on a GlobalVariable. More...
 
void setNumHungOffUseOperands (unsigned NumOps)
 Subclasses with hung off uses need to manage the operand count themselves. More...
 
op_iterator op_begin ()
 
const_op_iterator op_begin () const
 
op_iterator op_end ()
 
const_op_iterator op_end () const
 
op_range operands ()
 
const_op_range operands () const
 
value_op_iterator value_op_begin ()
 
value_op_iterator value_op_end ()
 
iterator_range< value_op_iteratoroperand_values ()
 
const_value_op_iterator value_op_begin () const
 
const_value_op_iterator value_op_end () const
 
iterator_range< const_value_op_iteratoroperand_values () const
 
void dropAllReferences ()
 Drop all references to operands. More...
 
void replaceUsesOfWith (Value *From, Value *To)
 Replace uses of one Value with another. More...
 
- Public Member Functions inherited from llvm::Value
 Value (const Value &)=delete
 
Valueoperator= (const Value &)=delete
 
void deleteValue ()
 Delete a pointer to a generic Value. More...
 
void dump () const
 Support for debugging, callable in GDB: V->dump() More...
 
TypegetType () const
 All values are typed, get the type of this value. More...
 
LLVMContextgetContext () const
 All values hold a context through their type. More...
 
bool hasName () const
 
ValueNamegetValueName () const
 
void setValueName (ValueName *VN)
 
StringRef getName () const
 Return a constant reference to the value's name. More...
 
void setName (const Twine &Name)
 Change the name of the value. More...
 
void takeName (Value *V)
 Transfer the name from V to this value. More...
 
void replaceAllUsesWith (Value *V)
 Change all uses of this to point to a new Value. More...
 
void replaceNonMetadataUsesWith (Value *V)
 Change non-metadata uses of this to point to a new Value. More...
 
void replaceUsesOutsideBlock (Value *V, BasicBlock *BB)
 replaceUsesOutsideBlock - Go through the uses list for this definition and make each use point to "V" instead of "this" when the use is outside the block. More...
 
void replaceUsesExceptBlockAddr (Value *New)
 replaceUsesExceptBlockAddr - Go through the uses list for this definition and make each use point to "V" instead of "this" when the use is outside the block. More...
 
void assertModuleIsMaterializedImpl () const
 
void assertModuleIsMaterialized () const
 
bool use_empty () const
 
use_iterator materialized_use_begin ()
 
const_use_iterator materialized_use_begin () const
 
use_iterator use_begin ()
 
const_use_iterator use_begin () const
 
use_iterator use_end ()
 
const_use_iterator use_end () const
 
iterator_range< use_iteratormaterialized_uses ()
 
iterator_range< const_use_iteratormaterialized_uses () const
 
iterator_range< use_iteratoruses ()
 
iterator_range< const_use_iteratoruses () const
 
bool user_empty () const
 
user_iterator materialized_user_begin ()
 
const_user_iterator materialized_user_begin () const
 
user_iterator user_begin ()
 
const_user_iterator user_begin () const
 
user_iterator user_end ()
 
const_user_iterator user_end () const
 
Useruser_back ()
 
const Useruser_back () const
 
iterator_range< user_iteratormaterialized_users ()
 
iterator_range< const_user_iteratormaterialized_users () const
 
iterator_range< user_iteratorusers ()
 
iterator_range< const_user_iteratorusers () const
 
bool hasOneUse () const
 Return true if there is exactly one user of this value. More...
 
bool hasNUses (unsigned N) const
 Return true if this Value has exactly N users. More...
 
bool hasNUsesOrMore (unsigned N) const
 Return true if this value has N users or more. More...
 
bool isUsedInBasicBlock (const BasicBlock *BB) const
 Check if this value is used in the specified basic block. More...
 
unsigned getNumUses () const
 This method computes the number of uses of this Value. More...
 
void addUse (Use &U)
 This method should only be used by the Use class. More...
 
unsigned getValueID () const
 Return an ID for the concrete type of this object. More...
 
unsigned getRawSubclassOptionalData () const
 Return the raw optional flags value contained in this value. More...
 
void clearSubclassOptionalData ()
 Clear the optional flags contained in this value. More...
 
bool hasSameSubclassOptionalData (const Value *V) const
 Check the optional flags for equality. More...
 
bool hasValueHandle () const
 Return true if there is a value handle associated with this value. More...
 
bool isUsedByMetadata () const
 Return true if there is metadata referencing this value. More...
 
bool isSwiftError () const
 Return true if this value is a swifterror value. More...
 
const ValuestripPointerCasts () const
 Strip off pointer casts, all-zero GEPs, and aliases. More...
 
ValuestripPointerCasts ()
 
const ValuestripPointerCastsAndBarriers () const
 Strip off pointer casts, all-zero GEPs, aliases and barriers. More...
 
ValuestripPointerCastsAndBarriers ()
 
const ValuestripPointerCastsNoFollowAliases () const
 Strip off pointer casts and all-zero GEPs. More...
 
ValuestripPointerCastsNoFollowAliases ()
 
const ValuestripInBoundsConstantOffsets () const
 Strip off pointer casts and all-constant inbounds GEPs. More...
 
ValuestripInBoundsConstantOffsets ()
 
const ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const
 Accumulate offsets from stripInBoundsConstantOffsets(). More...
 
ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset)
 
const ValuestripInBoundsOffsets () const
 Strip off pointer casts and inbounds GEPs. More...
 
ValuestripInBoundsOffsets ()
 
unsigned getPointerDereferenceableBytes (const DataLayout &DL, bool &CanBeNull) const
 Returns the number of bytes known to be dereferenceable for the pointer value. More...
 
unsigned getPointerAlignment (const DataLayout &DL) const
 Returns an alignment of the pointer value. More...
 
const ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const
 Translate PHI node to its predecessor from the given basic block. More...
 
ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB)
 
void mutateType (Type *Ty)
 Mutate the type of this Value to be of the specified type. More...
 
template<class Compare >
void sortUseList (Compare Cmp)
 Sort the use-list. More...
 
void reverseUseList ()
 Reverse the use-list. More...
 
void print (raw_ostream &O, bool IsForDebug=false) const
 Implement operator<< on Value. More...
 
void print (raw_ostream &O, ModuleSlotTracker &MST, bool IsForDebug=false) const
 
void printAsOperand (raw_ostream &O, bool PrintType=true, const Module *M=nullptr) const
 Print the name of this Value out to the specified raw_ostream. More...
 
void printAsOperand (raw_ostream &O, bool PrintType, ModuleSlotTracker &MST) const
 
- Public Member Functions inherited from llvm::ilist_node_with_parent< Instruction, BasicBlock >
InstructiongetPrevNode ()
 
const InstructiongetPrevNode () const
 Get the previous node, or nullptr for the list head. More...
 
InstructiongetNextNode ()
 Get the next node, or nullptr for the list tail. More...
 
const InstructiongetNextNode () const
 Get the next node, or nullptr for the list tail. More...
 
- Public Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< Instruction, Options... >::type >
self_iterator getIterator ()
 
const_self_iterator getIterator () const
 
reverse_self_iterator getReverseIterator ()
 
const_reverse_self_iterator getReverseIterator () const
 
bool isSentinel () const
 Check whether this is the sentinel node. More...
 

Static Public Member Functions

static const chargetOpcodeName (unsigned OpCode)
 
static bool isTerminator (unsigned OpCode)
 
static bool isBinaryOp (unsigned Opcode)
 
static bool isShift (unsigned Opcode)
 Determine if the Opcode is one of the shift instructions. More...
 
static bool isBitwiseLogicOp (unsigned Opcode)
 Determine if the Opcode is and/or/xor. More...
 
static bool isCast (unsigned OpCode)
 Determine if the OpCode is one of the CastInst instructions. More...
 
static bool isFuncletPad (unsigned OpCode)
 Determine if the OpCode is one of the FuncletPadInst instructions. More...
 
static bool isAssociative (unsigned Opcode)
 
static bool isCommutative (unsigned Opcode)
 
static bool isIdempotent (unsigned Opcode)
 
static bool isNilpotent (unsigned Opcode)
 
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
- Static Public Member Functions inherited from llvm::User
static bool classof (const Value *V)
 

Protected Member Functions

 ~Instruction ()
 
void setInstructionSubclassData (unsigned short D)
 
unsigned getSubclassDataFromInstruction () const
 
 Instruction (Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore=nullptr)
 
 Instruction (Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd)
 
- Protected Member Functions inherited from llvm::User
void * operator new (size_t Size)
 Allocate a User with an operand pointer co-allocated. More...
 
void * operator new (size_t Size, unsigned Us)
 Allocate a User with the operands co-allocated. More...
 
void * operator new (size_t Size, unsigned Us, unsigned DescBytes)
 Allocate a User with the operands co-allocated. More...
 
 User (Type *ty, unsigned vty, Use *, unsigned NumOps)
 
void allocHungoffUses (unsigned N, bool IsPhi=false)
 Allocate the array of Uses, followed by a pointer (with bottom bit set) to the User. More...
 
void growHungoffUses (unsigned N, bool IsPhi=false)
 Grow the number of hung off uses. More...
 
 ~User ()=default
 
template<int Idx>
UseOp ()
 
template<int Idx>
const UseOp () const
 
- Protected Member Functions inherited from llvm::Value
 Value (Type *Ty, unsigned scid)
 
 ~Value ()
 Value's destructor should be virtual by design, but that would require that Value and all of its subclasses have a vtable that effectively duplicates the information in the value ID. More...
 
unsigned short getSubclassDataFromValue () const
 
void setValueSubclassData (unsigned short D)
 
- Protected Member Functions inherited from llvm::ilist_node_with_parent< Instruction, BasicBlock >
 ilist_node_with_parent ()=default
 
- Protected Member Functions inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< Instruction, Options... >::type >
 ilist_node_impl ()=default
 

Friends

class SymbolTableListTraits< Instruction >
 

Additional Inherited Members

- Static Public Attributes inherited from llvm::Value
static const unsigned MaxAlignmentExponent = 29
 The maximum alignment for instructions. More...
 
static const unsigned MaximumAlignment = 1u << MaxAlignmentExponent
 
- Protected Types inherited from llvm::Value
enum  : unsigned { NumUserOperandsBits = 28 }
 The number of operands in the subclass. More...
 
- Protected Types inherited from llvm::ilist_node_impl< ilist_detail::compute_node_options< Instruction, Options... >::type >
using self_iterator = ilist_iterator< ilist_detail::compute_node_options< Instruction, Options... >::type, false, false >
 
using const_self_iterator = ilist_iterator< ilist_detail::compute_node_options< Instruction, Options... >::type, false, true >
 
using reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< Instruction, Options... >::type, true, false >
 
using const_reverse_self_iterator = ilist_iterator< ilist_detail::compute_node_options< Instruction, Options... >::type, true, true >
 
- Static Protected Member Functions inherited from llvm::User
template<int Idx, typename U >
static UseOpFrom (const U *that)
 
- Protected Attributes inherited from llvm::Value
unsigned char SubclassOptionalData: 7
 Hold subclass data that can be dropped. More...
 
unsigned NumUserOperands: NumUserOperandsBits
 
unsigned IsUsedByMD: 1
 
unsigned HasName: 1
 
unsigned HasHungOffUses: 1
 
unsigned HasDescriptor: 1
 

Detailed Description

Definition at line 43 of file Instruction.h.

Member Enumeration Documentation

◆ BinaryOps

Definition at line 608 of file Instruction.h.

◆ CastOps

Definition at line 622 of file Instruction.h.

◆ FuncletPadOps

Definition at line 629 of file Instruction.h.

◆ MemoryOps

Definition at line 615 of file Instruction.h.

◆ OperationEquivalenceFlags

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

Enumerator
CompareIgnoringAlignment 

Check for equivalence ignoring load/store alignment.

CompareUsingScalarTypes 

Check for equivalence treating a type and a vector of that type as equivalent.

Definition at line 569 of file Instruction.h.

◆ OtherOps

Definition at line 636 of file Instruction.h.

◆ TermOps

Definition at line 601 of file Instruction.h.

Constructor & Destructor Documentation

◆ ~Instruction()

Instruction::~Instruction ( )
protected

Definition at line 46 of file Instruction.cpp.

References assert(), and P.

◆ Instruction() [1/3]

llvm::Instruction::Instruction ( const Instruction )
delete

◆ Instruction() [2/3]

Instruction::Instruction ( Type Ty,
unsigned  iType,
Use Ops,
unsigned  NumOps,
Instruction InsertBefore = nullptr 
)
protected

◆ Instruction() [3/3]

Instruction::Instruction ( Type Ty,
unsigned  iType,
Use Ops,
unsigned  NumOps,
BasicBlock InsertAtEnd 
)
protected

Member Function Documentation

◆ andIRFlags()

void Instruction::andIRFlags ( const Value V)

◆ applyMergedLocation()

void Instruction::applyMergedLocation ( const DILocation LocA,
const DILocation LocB 
)

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.

Definition at line 677 of file DebugInfo.cpp.

References llvm::DILocation::getMergedLocation().

Referenced by HoistThenElseCodeToIf(), sinkLastInstruction(), SpeculativelyExecuteBB(), and llvm::InstCombiner::visitStoreInst().

◆ classof()

static bool llvm::Instruction::classof ( const Value V)
inlinestatic

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

Definition at line 594 of file Instruction.h.

References llvm::Value::getValueID().

◆ clone()

Instruction * Instruction::clone ( ) const

◆ copyFastMathFlags() [1/2]

void Instruction::copyFastMathFlags ( FastMathFlags  FMF)

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.

Definition at line 189 of file Instruction.cpp.

References assert().

Referenced by andIRFlags(), copyFastMathFlags(), copyIRFlags(), foldOperationIntoPhiValue(), foldOperationIntoSelectOperand(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitFPTrunc(), llvm::InstCombiner::visitFSub(), and llvm::InnerLoopVectorizer::widenInstruction().

◆ copyFastMathFlags() [2/2]

void Instruction::copyFastMathFlags ( const Instruction I)

Copy I's fast-math flags.

Definition at line 239 of file Instruction.cpp.

References copyFastMathFlags(), and getFastMathFlags().

◆ copyIRFlags()

void Instruction::copyIRFlags ( const Value V,
bool  IncludeWrapFlags = true 
)

Convenience method to copy supported exact, fast-math, and (optionally) wrapping flags from V to this instruction.

Definition at line 243 of file Instruction.cpp.

References copyFastMathFlags(), llvm::X86II::OB, setHasNoSignedWrap(), setHasNoUnsignedWrap(), and setIsExact().

Referenced by llvm::BinaryOperator::CreateWithCopiedFlags(), isSafeAndProfitableToSinkLoad(), and isSelect01().

◆ copyMetadata()

void Instruction::copyMetadata ( const Instruction SrcInst,
ArrayRef< unsigned WL = ArrayRef<unsigned>() 
)

◆ dropPoisonGeneratingFlags()

void Instruction::dropPoisonGeneratingFlags ( )

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

Definition at line 122 of file Instruction.cpp.

References llvm::MCID::Add, getOpcode(), setHasNoSignedWrap(), setHasNoUnsignedWrap(), and setIsExact().

Referenced by clearAssumptionsOfUsers().

◆ dropUnknownNonDebugMetadata() [1/4]

void Instruction::dropUnknownNonDebugMetadata ( ArrayRef< unsigned KnownIDs)

◆ dropUnknownNonDebugMetadata() [2/4]

void llvm::Instruction::dropUnknownNonDebugMetadata ( )
inline

Definition at line 249 of file Instruction.h.

References llvm::None.

◆ dropUnknownNonDebugMetadata() [3/4]

void llvm::Instruction::dropUnknownNonDebugMetadata ( unsigned  ID1)
inline

Definition at line 252 of file Instruction.h.

References llvm::makeArrayRef().

◆ dropUnknownNonDebugMetadata() [4/4]

void llvm::Instruction::dropUnknownNonDebugMetadata ( unsigned  ID1,
unsigned  ID2 
)
inline

Definition at line 255 of file Instruction.h.

References llvm::RISCVFenceField::W.

◆ eraseFromParent()

iplist< Instruction >::iterator Instruction::eraseFromParent ( )

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

Returns
an iterator pointing to the element after the erased one

Definition at line 69 of file Instruction.cpp.

References llvm::iplist_impl< IntrusiveListT, TraitsT >::erase(), llvm::BasicBlock::getInstList(), llvm::ilist_node_impl< ilist_detail::compute_node_options< Instruction, Options... >::type >::getIterator(), and getParent().

Referenced by AddReachableCodeToWorklist(), atomicSizeSupported(), buildMultiplyTree(), BuildSubAggregate(), changeToCall(), checkCSEInPredecessor(), CleanupPointerRootUsers(), llvm::CloneAndPruneIntoFromInst(), CombineUAddWithOverflow(), ComputePostOrders(), ConnectEpilog(), ConnectProlog(), llvm::ConstantFoldTerminator(), ConvertToSInt(), createCast(), llvm::createConstantPropagationPass(), llvm::createDeadArgHackingPass(), llvm::createDwarfEHPass(), llvm::createEfficiencySanitizerPass(), CreateGCRelocates(), createIfThenElse(), llvm::InnerLoopVectorizer::createInductionVariable(), llvm::createMemCpyLoop(), llvm::createMemCpyLoopUnknownSize(), createMemMoveLoop(), createMemSetLoop(), llvm::createObjCARCOptPass(), createOrdering(), CreatePrologue(), llvm::createSeparateConstOffsetFromGEPPass(), cse(), DCEInstruction(), deleteDeadInstruction(), DeleteTriviallyDeadInstructions(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), despeculateCountZeros(), doPromotion(), llvm::GVNExpression::Expression::dump(), llvm::EliminateDuplicatePHINodes(), llvm::InstCombiner::eraseInstFromFunction(), llvm::objcarc::EraseInstruction(), EraseTerminatorInstAndDCECond(), llvm::VPlan::execute(), llvm::expandAtomicRMWToCmpXchg(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::CodeExtractor::findInputsOutputs(), findPHIToPartitionLoops(), findRetainForStoreStrongContraction(), fixPhis(), llvm::FoldReturnIntoUncondBranch(), FoldTwoEntryPHINode(), generateUnsignedDivisionCode(), getOrInsertValueProfilingCall(), GetRMWLibcall(), getScalarIntrinsicDeclaration(), llvm::DenseMapInfo< CallValue >::getTombstoneKey(), getTrueOrFalseValue(), getTypePartition(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), GlobalWasGeneratedByCompiler(), handleFinalSuspend(), handleMemIntrinsicPtrUse(), handleNoSuspendCoroutine(), hasUnsafeFPMath(), llvm::hoistRegion(), INITIALIZE_PASS(), INITIALIZE_PASS_WITH_OPTIONS(), inlineCallsImpl(), llvm::InlineFunction(), insertDebugValues(), instrumentMemAccess(), isAlwaysFoldable(), isBroadcastShuffle(), isCallPromotable(), isKnownTypeIdMember(), IsNonLocalValue(), isOnlyReachableViaThisEdge(), isUnconditionalBranch(), llvm::log2(), LowerAtomicCmpXchgInst(), LowerAtomicRMWInst(), llvm::LowerDbgDeclare(), lowerExpectIntrinsic(), LowerFenceInst(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::IntrinsicLowering::LowerToByteSwap(), LowerXALUO(), MakeGuardControlFlowExplicit(), mapBinOpcode(), markAliveBlocks(), MarkBlocksLiveIn(), mayLoopAccessLocation(), llvm::MergeBasicBlockIntoOnlyPred(), mergeCleanupPad(), mergeConditionalStoreToAddress(), mergeEmptyReturnBlocks(), mergeInlinedArrayAllocas(), moveUp(), llvm::InstDeleterIRStrategy::mutate(), operator<<(), llvm::LibCallSimplifier::optimizeCall(), optimizeDivRem(), OptimizeEmptyGlobalCXXDtors(), OptimizeExtractBits(), OptimizeGlobalAddressOfMalloc(), optimizeSQRT(), patchAndReplaceAllUsesWith(), PerformHeapAllocSRoA(), performMaskedAtomicOp(), llvm::PHITransAddr::PHITranslateWithInsertion(), preheader(), processAShr(), llvm::JumpThreadingPass::ProcessBlock(), llvm::JumpThreadingPass::ProcessBranchOnXOR(), processCmp(), llvm::JumpThreadingPass::ProcessImpliedCondition(), processOverflowIntrinsic(), processPHI(), processSDiv(), processSelect(), processSRem(), llvm::JumpThreadingPass::ProcessThreadableEdges(), promotedOpIsNUW(), llvm::promoteLoopAccessesToScalars(), promoteSingleBlockAlloca(), PropagateConstantReturn(), propagateMetadata(), llvm::GVNHoist::rank(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), llvm::safestack::StackColoring::removeAllMarkers(), llvm::removeAllNonTerminatorAndEHPadInstructions(), removeCoroEnds(), removeLifetimeIntrinsicUsers(), llvm::BasicBlock::removePredecessor(), RemoveSwitchAfterSelectConversion(), removeUndefIntroducingPredecessor(), llvm::removeUnwindEdge(), replaceAndRecursivelySimplifyImpl(), llvm::AMDGPULibCalls::replaceCall(), llvm::replaceDbgDeclare(), replaceFallthroughCoroEnd(), ReplaceFoldableUses(), replaceFrameSize(), replaceOneDbgValueForAlloca(), ReplaceUsesOfWith(), rewritePHIs(), rewriteSingleStoreAlloca(), RewriteUsesOfLoadForHeapSRoA(), runIPSCCP(), runSCCP(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scaleWeights(), shouldKeepFDivF32(), shouldSpeculateInstrs(), simplifyAndDCEInstruction(), SimplifyBranchOnICmpChain(), simplifyOneLoop(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), simplifySuspendPoint(), sink(), sinkAndCmp0Expression(), SinkCast(), SinkCmpExpression(), sinkLastInstruction(), llvm::sinkRegion(), speculatePHINodeLoads(), speculateSelectInstLoads(), SpeculativelyExecuteBB(), splitBeforeCatchSwitch(), llvm::fuzzerop::splitBlockDescriptor(), splitCallSite(), llvm::SplitLandingPadPredecessors(), splitMergedValStore(), StackMallocSizeClass(), llvm::stripDebugInfo(), StripSymbolNames(), SumCanReachMin(), SwitchToLookupTable(), llvm::InnerLoopVectorizer::truncateToMinimalBitwidths(), tryPromoteAllocaToVector(), TryToMergeLandingPad(), tryToOptimizeStoreOfMallocToGlobal(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), tryToSimplifyUncondBranchWithICmpInIt(), llvm::JumpThreadingPass::TryToUnfoldSelect(), llvm::JumpThreadingPass::TryToUnfoldSelectInCurrBB(), TurnSwitchRangeIntoICmp(), TypeSizeToSizeIndex(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), unswitchTrivialBranch(), unswitchTrivialSwitch(), updateOperand(), llvm::UpgradeIntrinsicCall(), llvm::AMDGPULibCalls::useNative(), llvm::LoopVersioning::versionLoop(), llvm::sroa::AllocaSliceRewriter::visit(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().

◆ extractProfMetadata()

bool Instruction::extractProfMetadata ( uint64_t &  TrueVal,
uint64_t &  FalseVal 
) const

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.

Definition at line 1303 of file Metadata.cpp.

References assert(), llvm::dyn_cast(), llvm::LLVMContext::MD_prof, and llvm::MCID::Select.

Referenced by extractPredSuccWeights(), llvm::getLoopEstimatedTripCount(), hasProfileData(), isFormingBranchFromSelectProfitable(), llvm::peelLoop(), and updatePredecessorProfileMetadata().

◆ extractProfTotalWeight()

bool Instruction::extractProfTotalWeight ( uint64_t &  TotalVal) const

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.

Definition at line 1328 of file Metadata.cpp.

References assert(), llvm::MCID::Call, llvm::dyn_cast(), llvm::MDNode::getContext(), llvm::LLVMContextImpl::InstructionMetadata, llvm::LLVMContext::MD_prof, llvm::LLVMContext::pImpl, and llvm::MCID::Select.

Referenced by llvm::createDeadArgHackingPass(), findInitTrampoline(), llvm::ProfileSummaryInfo::getProfileCount(), and SortCallTargets().

◆ getAAMetadata()

void Instruction::getAAMetadata ( AAMDNodes N,
bool  Merge = false 
) const

◆ getAllMetadata()

void llvm::Instruction::getAllMetadata ( SmallVectorImpl< std::pair< unsigned, MDNode *>> &  MDs) const
inline

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.

Definition at line 210 of file Instruction.h.

Referenced by combineLoadToNewType(), combineStoreToNewValue(), maybePrintComdat(), and wrapConstantAsMetadata().

◆ getAllMetadataOtherThanDebugLoc()

void llvm::Instruction::getAllMetadataOtherThanDebugLoc ( SmallVectorImpl< std::pair< unsigned, MDNode *>> &  MDs) const
inline

This does the same thing as getAllMetadata, except that it filters out the debug location.

Definition at line 217 of file Instruction.h.

References hasMetadataOtherThanDebugLoc(), Kind, Merge, N, and setMetadata().

Referenced by llvm::combineMetadata(), copyMetadata(), INITIALIZE_PASS_WITH_OPTIONS(), and llvm::propagateMetadata().

◆ getDebugLoc()

const DebugLoc& llvm::Instruction::getDebugLoc ( ) const
inline

Return the debug location for this node as a DebugLoc.

Definition at line 284 of file Instruction.h.

References B, isAssociative(), and LLVM_READONLY.

Referenced by addDiscriminators(), llvm::LoopAccessInfo::blockNeedsPredication(), buildMultiplyTree(), callsiteIsHot(), canFoldIVIncExpr(), changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::changeToUnreachable(), llvm::ConvertDebugDeclareToDebugValue(), ConvertShiftToMul(), copyMetadata(), llvm::CallInst::Create(), llvm::InvokeInst::Create(), createAndInstr(), createCTLZIntrinsic(), llvm::createDeadArgHackingPass(), createRdxShuffleMask(), despeculateCountZeros(), detectCTLZIdiom(), eliminateRecursiveTailCall(), emitSignedInt64(), findInitTrampoline(), findRetainForStoreStrongContraction(), FitWeights(), fixupLineNumbers(), llvm::IRTranslator::getAnalysisUsage(), getCompareCC(), llvm::SelectionDAGBuilder::getCurDebugLoc(), getDebugLocFromInstOrOperands(), llvm::VNCoercion::getLoadValueForLoad(), getNegativeIsTrueBoolVec(), getNumBytes(), getParentPad(), getSubprogram(), getSuccPad(), getTypePartition(), getVariableSize(), hasSameExtUse(), hasUnsafeFPMath(), HoistThenElseCodeToIf(), INITIALIZE_PASS_WITH_OPTIONS(), llvm::InlineFunction(), insertDebugValues(), llvm::InstCombiner::InsertNewInstWith(), instrumentMaskedLoadOrStore(), IsIncrementNUW(), isOnlyReachableViaThisEdge(), isUnconditionalBranch(), llvm::LowerDbgDeclare(), makeStatepointExplicitImpl(), mayLoopAccessLocation(), preassignSwiftErrorRegs(), processDbgDeclares(), promotedOpIsNUW(), llvm::removeUnwindEdge(), llvm::ReplaceInstWithInst(), replaceOneDbgValueForAlloca(), reportLoadElim(), reportMayClobberedLoad(), llvm::InstCombiner::run(), llvm::IRTranslator::runOnMachineFunction(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), llvm::SDLoc::SDLoc(), llvm::FastISel::selectInstruction(), llvm::FastISel::selectOperator(), llvm::FunctionLoweringInfo::set(), llvm::IRBuilderBase::SetInsertPoint(), shouldKeepFDivF32(), shouldReorderOperands(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), SimplifyTerminatorOnSelect(), sinkAndCmp0Expression(), SinkCmpExpression(), sinkLastInstruction(), SortCallTargets(), SpeculativelyExecuteBB(), llvm::SplitBlockAndInsertIfThen(), llvm::SplitBlockAndInsertIfThenElse(), llvm::SplitBlockPredecessors(), llvm::SplitCriticalEdge(), llvm::SplitLandingPadPredecessors(), llvm::stripDebugInfo(), llvm::JumpThreadingPass::ThreadEdge(), tryToSimplifyUncondBranchWithICmpInIt(), updateOperand(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitStoreInst(), llvm::InstCombiner::visitXor(), and X86ChooseCmpImmediateOpcode().

◆ getFastMathFlags()

FastMathFlags Instruction::getFastMathFlags ( ) const

◆ getFunction() [1/2]

const Function * Instruction::getFunction ( ) const

◆ getFunction() [2/2]

Function* llvm::Instruction::getFunction ( )
inline

Definition at line 85 of file Instruction.h.

References I.

◆ getMetadata() [1/2]

MDNode* llvm::Instruction::getMetadata ( unsigned  KindID) const
inline

Get the metadata of given kind attached to this Instruction.

If the metadata is not found then return null.

Definition at line 194 of file Instruction.h.

Referenced by AddAliasScopeMetadata(), llvm::LoopVersioning::annotateInstWithNoAlias(), CloneAliasScopeMetadata(), llvm::combineMetadata(), llvm::FastISel::createMachineMemOperandFor(), llvm::createObjCARCOptPass(), createVirtualRegs(), llvm::DiagnosticInfoInlineAsm::DiagnosticInfoInlineAsm(), llvm::FoldBranchToCommonDest(), foldCtpop(), foldCttzCtlz(), llvm::getAlign(), GetBranchWeights(), getConstantValue(), llvm::DOTGraphTraits< const Function * >::getEdgeAttributes(), llvm::ConstrainedFPIntrinsic::getExceptionBehavior(), llvm::FPMathOperator::getFPAccuracy(), getFromRangeMetadata(), llvm::MemoryDependenceResults::getInvariantGroupPointerDependency(), llvm::BasicBlock::getIrrLoopHeaderWeight(), llvm::Loop::getLoopID(), getMemSetPatternValue(), llvm::AArch64TargetLowering::getMMOFlags(), llvm::TypeBasedAAResult::getModRefBehavior(), llvm::ScopedNoAliasAAResult::getModRefInfo(), llvm::TypeBasedAAResult::getModRefInfo(), getParentPad(), GetRangeFromMetadata(), llvm::DbgInfoIntrinsic::getRawExpression(), llvm::DbgInfoIntrinsic::getRawVariable(), llvm::ConstrainedFPIntrinsic::getRoundingMode(), llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), getTrueOrFalseValue(), getUniformBase(), llvm::getValueProfDataFromInst(), llvm::DbgInfoIntrinsic::getVariableLocation(), GlobalWasGeneratedByCompiler(), handleMemIntrinsicPtrUse(), HasBranchWeights(), hasOnlySelectUsers(), llvm::objcarc::BottomUpPtrState::InitBottomUp(), insertUniqueBackedgeBlock(), isContiguous(), isInstrUniform(), llvm::SITargetLowering::isMemOpHasNoClobberedMemOperand(), isSafeAndProfitableToSinkLoad(), llvm::AMDGPU::isUniformMMO(), isUseTriviallyOptimizableToLiveOnEntry(), isVtableAccess(), llvm::SelectionDAGBuilder::lowerRangeToAssertZExt(), MakeGuardControlFlowExplicit(), llvm::objcarc::TopDownPtrState::MatchWithRelease(), moveUp(), promoteSingleBlockAlloca(), llvm::propagateMetadata(), PropagateParallelLoopAccessMetadata(), RemoveNonValidAttrAtIndex(), reportMayClobberedLoad(), rewriteSingleStoreAlloca(), setBranchWeights(), llvm::SelectionDAGBuilder::ShouldEmitAsBranches(), shouldKeepFDivF32(), SumCanReachMin(), swapProfMetadata(), llvm::JumpThreadingPass::ThreadEdge(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), TypeSizeToSizeIndex(), updateProfWeight(), and llvm::sroa::AllocaSliceRewriter::visit().

◆ getMetadata() [2/2]

MDNode* llvm::Instruction::getMetadata ( StringRef  Kind) const
inline

Get the metadata of given kind attached to this Instruction.

If the metadata is not found then return null.

Definition at line 201 of file Instruction.h.

◆ getModule() [1/2]

const Module * Instruction::getModule ( ) const

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.

Definition at line 57 of file Instruction.cpp.

References llvm::BasicBlock::getModule(), and getParent().

Referenced by llvm::AliasSetTracker::add(), addAssumeNonNull(), llvm::IVUsers::AddUsersImpl(), atomicSizeSupported(), llvm::AAResults::callCapturesBefore(), llvm::objcarc::CanAlterRefCount(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), llvm::canSinkOrHoistInst(), llvm::objcarc::CanUse(), CombineUAddWithOverflow(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessors(), llvm::ConvertDebugDeclareToDebugValue(), createCoroSave(), CreateGCRelocates(), createMaskInstrs(), llvm::createSeparateConstOffsetFromGEPPass(), llvm::DemotePHIToStack(), llvm::AMDGPULibCalls::fold(), llvm::SCEVExpander::generateOverflowCheck(), llvm::MemoryLocation::get(), getAtomicOpAlign(), getAtomicOpSize(), llvm::DemandedBits::getDemandedBits(), llvm::getGEPInductionOperand(), llvm::MemoryDependenceResults::getLoadLoadClobberFullWidthSize(), getNumBytes(), getPow(), llvm::LazyValueInfo::getPredicateAt(), GetRMWLibcall(), getScalarIntrinsicDeclaration(), getSignature(), llvm::InstrProfIncrementInst::getStep(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::NVPTXTargetLowering::getTgtMemIntrinsic(), getTypePartition(), GlobalWasGeneratedByCompiler(), handleFree(), hasOutsideLoopUser(), llvm::hoistRegion(), INITIALIZE_PASS(), llvm::AMDGPULibCalls::initNativeFuncs(), insertUseHolderAfter(), isAlwaysLive(), isCallingConvCCompatible(), llvm::InductionDescriptor::isInductionPHI(), isLoadInvariantInLoop(), isObjectDereferencedInBlock(), isOnlyReachableViaThisEdge(), llvm::AArch64TargetLowering::isProfitableToHoist(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), llvm::isSafeToSpeculativelyExecute(), isZero(), llvm::AArch64TargetLowering::isZExtFree(), llvm::LibCallSimplifier::LibCallSimplifier(), llvm::log2(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::gvn::AvailableValue::MaterializeAdjustedValue(), moveUp(), operator<<(), optimizeUnaryDoubleFP(), performMaskedAtomicOp(), PrintOps(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), promoteSingleBlockAlloca(), llvm::recognizeBSwapOrBitReverseIdiom(), RedzoneSizeForScale(), replaceAndRecursivelySimplifyImpl(), ReplaceCallWith(), replaceUnaryCall(), reportMayClobberedLoad(), rewriteSingleStoreAlloca(), llvm::salvageDebugInfo(), llvm::HexagonTargetLowering::shouldExpandAtomicCmpXchgInIR(), SimplifyBSwap(), SimplifyNVVMIntrinsic(), simplifyX86extrq(), simplifyX86insertq(), AllocaSlices::SliceBuilder::SliceBuilder(), TypeSizeToSizeIndex(), llvm::AMDGPULibCalls::useNative(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InnerLoopVectorizer::vectorizeMemoryInstruction(), llvm::InstCombiner::visitAllocSite(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFPTrunc(), and visitIVCast().

◆ getModule() [2/2]

Module* llvm::Instruction::getModule ( )
inline

Definition at line 75 of file Instruction.h.

◆ getOpcode()

unsigned llvm::Instruction::getOpcode ( ) const
inline

Returns a member of one of the enums like Instruction::Add.

Definition at line 125 of file Instruction.h.

Referenced by alwaysAvailable(), buildMultiplyTree(), buildNew(), llvm::LoopVectorizationPlanner::buildVPlans(), canEvaluateSExtd(), canEvaluateShifted(), canEvaluateShiftedShift(), CanEvaluateShuffled(), canEvaluateTruncated(), canEvaluateZExtd(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), CanPHITrans(), llvm::canReplaceOperandWithVariable(), canTRE(), canVectorizeInst(), CC_MipsO32_FP64(), cheapToScalarize(), llvm::OverflowingBinaryOperator::classof(), llvm::AllocaInst::classof(), llvm::PossiblyExactOperator::classof(), llvm::LoadInst::classof(), llvm::UnaryInstruction::classof(), llvm::FPMathOperator::classof(), llvm::ConcreteOperator< Operator, Instruction::PtrToInt >::classof(), llvm::StoreInst::classof(), llvm::FenceInst::classof(), llvm::AtomicCmpXchgInst::classof(), llvm::AtomicRMWInst::classof(), llvm::GetElementPtrInst::classof(), llvm::CmpInst::classof(), llvm::ICmpInst::classof(), llvm::FCmpInst::classof(), llvm::CallInst::classof(), llvm::SelectInst::classof(), llvm::VAArgInst::classof(), llvm::ExtractElementInst::classof(), llvm::InsertElementInst::classof(), llvm::ShuffleVectorInst::classof(), llvm::ExtractValueInst::classof(), llvm::InsertValueInst::classof(), llvm::PHINode::classof(), llvm::LandingPadInst::classof(), llvm::ReturnInst::classof(), llvm::BranchInst::classof(), llvm::SwitchInst::classof(), llvm::IndirectBrInst::classof(), llvm::InvokeInst::classof(), llvm::ResumeInst::classof(), llvm::CatchSwitchInst::classof(), llvm::CleanupPadInst::classof(), llvm::CatchPadInst::classof(), llvm::CatchReturnInst::classof(), llvm::CleanupReturnInst::classof(), llvm::UnreachableInst::classof(), llvm::TruncInst::classof(), llvm::ZExtInst::classof(), llvm::SExtInst::classof(), llvm::FPTruncInst::classof(), llvm::FPExtInst::classof(), llvm::UIToFPInst::classof(), llvm::SIToFPInst::classof(), llvm::FPToUIInst::classof(), llvm::FPToSIInst::classof(), llvm::IntToPtrInst::classof(), llvm::PtrToIntInst::classof(), llvm::BitCastInst::classof(), llvm::AddrSpaceCastInst::classof(), clone(), cloneInstructionWithNewAddressSpace(), llvm::FunctionComparator::cmpOperations(), collectInsertionElements(), collectValuesToDemote(), computeBytesPoppedByCalleeForSRet(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessors(), llvm::ConstantFoldInstOperands(), ConvertToSInt(), createRdxShuffleMask(), decomposeSimpleLinearExpr(), detectCTLZIdiom(), detectLog2OfHalf(), detectPopcountIdiom(), determinePointerReadAttrs(), dropPoisonGeneratingFlags(), llvm::GVNExpression::Expression::dump(), emitSignedInt64(), findBestInsertionSet(), findIBRPredecessor(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::InnerLoopVectorizer::fixupIVUsers(), llvm::InstCombiner::foldFMulConst(), foldOperationIntoSelectOperand(), foldSelectICmpAndOr(), llvm::IRTranslator::getAnalysisUsage(), llvm::AArch64TTIImpl::getCastInstrCost(), llvm::TargetTransformInfo::getCastInstrCost(), llvm::TargetTransformInfo::getCmpSelInstrCost(), getCompareCC(), getComparePred(), GetConstantInt(), getFromRangeMetadata(), llvm::getGuaranteedNonFullPoisonOp(), llvm::SCEVExpander::getIVIncOperand(), getLoopPhiForCounter(), getMainOpcode(), llvm::SystemZTTIImpl::getMemoryOpCost(), llvm::TargetTransformInfo::getMemoryOpCost(), llvm::AAResults::getModRefInfo(), llvm::BinaryOperator::getOpcode(), llvm::CastInst::getOpcode(), llvm::CmpInst::getOpcode(), llvm::SelectInst::getOpcode(), llvm::MemoryLocation::getOrNone(), getPow(), getReductionData(), getScalarIntrinsicDeclaration(), getSelectFoldableConstant(), getShiftedValue(), llvm::DenseMapInfo< SimpleValue >::getTombstoneKey(), llvm::DenseMapInfo< CallValue >::getTombstoneKey(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), getX86SSEConditionCode(), hasAtomicLoad(), hasAtomicStore(), hasOnlyOneNonZeroIndex(), hasOutsideLoopUser(), hasSameExtUse(), llvm::FastISel::hasTrivialKill(), hasValueBeenRAUWed(), llvm::NVPTXTTIImpl::hasVolatileVariant(), hasZeroSignBit(), haveSameSpecialState(), llvm::hoistRegion(), INITIALIZE_PASS(), llvm::InlineFunction(), InTreeUserNeedToExtract(), isAllocSiteRemovable(), isAlwaysLive(), isAssociative(), isAtomic(), isBroadcastShuffle(), isCallPromotable(), isCompatibleReplacement(), llvm::TerminatorInst::isExceptional(), llvm::TargetLoweringBase::isExtFree(), isExtractBitsCandidateUse(), isFMulOrFDivWithConstant(), isHighCostExpansion(), isIdenticalToWhenDefined(), isLoopInvariant(), isMulPowOf2(), isPotentiallyNaryReassociable(), llvm::AArch64TargetLowering::isProfitableToHoist(), isPromotedInstructionLegal(), llvm::RecurrenceDescriptor::isRecurrenceInstr(), isReturnNonNull(), isSameOperationAs(), isSExtLoad(), isStrideMul(), isVectorReductionOp(), llvm::AArch64TargetLowering::isZExtFree(), LLVMGetInstructionOpcode(), llvm::GVN::ValueTable::lookupOrAdd(), mapBinOpcode(), matchVectorSplittingReduction(), llvm::gvn::AvailableValueInBlock::MaterializeAdjustedValue(), mayDivideByZero(), mayReadFromMemory(), mayWriteToMemory(), MightBeFoldableInst(), needsFP(), optimizeDivRem(), false::LibCallsShrinkWrap::perform(), llvm::PointerMayBeCaptured(), PrintOps(), llvm::JumpThreadingPass::ProcessBlock(), promotedOpIsNSW(), promotedOpIsNUW(), llvm::propagateIRFlags(), propagateMetadata(), llvm::propagatesFullPoison(), PushDefUseChildren(), llvm::CatchSwitchInst::removeHandler(), RemoveInstInputs(), replaceAllUsesOfWithIn(), runImpl(), llvm::FastISel::selectInstruction(), llvm::FastISel::selectPatchpoint(), shouldMergeGEPs(), shouldReorderOperands(), ShrinkDemandedConstant(), SimplifyBranchOnICmpChain(), llvm::SimplifyInstruction(), SinkShiftAndTruncate(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), ThreadBinOpOverSelect(), tryPromoteAllocaToVector(), llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visit(), llvm::SelectionDAGBuilder::visit(), llvm::Interpreter::visitAllocaInst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitFMul(), llvm::InnerLoopVectorizer::widenInstruction(), X86ChooseCmpImmediateOpcode(), and llvm::reassociate::XorOpnd::XorOpnd().

◆ getOpcodeName() [1/2]

const char* llvm::Instruction::getOpcodeName ( ) const
inline

◆ getOpcodeName() [2/2]

const char * Instruction::getOpcodeName ( unsigned  OpCode)
static

◆ getParent() [1/2]

const BasicBlock* llvm::Instruction::getParent ( ) const
inline

Definition at line 66 of file Instruction.h.

Referenced by llvm::GVN::ValueTable::add(), llvm::addLandingPadInfo(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::IVUsers::AddUsersImpl(), allPredecessorsComeFromSameSource(), allSameBlock(), AllUsesDominatedByBlock(), alwaysAvailable(), AreEquivalentPhiNodes(), BlockIsSimpleEnoughToThreadThrough(), llvm::LoopAccessInfo::blockNeedsPredication(), BrPHIToSelect(), BuildConstantFromSCEV(), buildMultiplyTree(), llvm::LoopVectorizationPlanner::buildVPlans(), llvm::calculateClrEHStateNumbers(), calculateCXXStateNumbers(), calculateIterationsToInvariance(), calculateSEHStateNumbers(), callsiteIsHot(), canConstantEvolve(), canFoldIVIncExpr(), llvm::AAResults::canInstructionRangeModRef(), canSinkInstructions(), canSplitCallSite(), canSplitPredecessors(), CC_MipsO32_FP64(), changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::changeToUnreachable(), llvm::CloneAndPruneIntoFromInst(), CloneLoop(), llvm::collectCmpOps(), llvm::CodeMetrics::collectEphemeralValues(), CombineUAddWithOverflow(), computeKnownBitsFromAssume(), ComputePostOrders(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessors(), ConstructSSAForLoadSet(), llvm::ConvertDebugDeclareToDebugValue(), ConvertToSInt(), llvm::ScalarEvolution::createAddRecFromPHIWithCasts(), llvm::createArgumentPromotionPass(), llvm::createConstantHoistingPass(), llvm::createDwarfEHPass(), createFree(), CreateGCRelocates(), createIfThenElse(), createMalloc(), createMaskInstrs(), llvm::createMemCpyLoop(), llvm::createMemCpyLoopKnownSize(), llvm::createMemCpyLoopUnknownSize(), createMemMoveLoop(), llvm::MemorySSAUpdater::createMemoryAccessAfter(), llvm::MemorySSAUpdater::createMemoryAccessBefore(), createMemSetLoop(), llvm::createObjCARCOptPass(), createRdxShuffleMask(), createResumeEntryBlock(), llvm::createSeparateConstOffsetFromGEPPass(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), llvm::DependenceInfo::depends(), despeculateCountZeros(), DFS(), llvm::OrderedInstructions::dominates(), llvm::OrderedBasicBlock::dominates(), llvm::DominatorTree::dominates(), llvm::InstCombiner::dominatesAllUses(), DominatesMergePoint(), llvm::GVNExpression::Expression::dump(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), eliminateDeadSwitchCases(), eliminateRecursiveTailCall(), enableCallSafepoints(), eraseFromParent(), llvm::SCEVExpander::expandCodeFor(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), findBasePointer(), llvm::findDevirtualizableCallsForTypeTest(), findIBRPredecessor(), findInitTrampolineFromBB(), llvm::CodeExtractor::findInputsOutputs(), findLiveSetAtInst(), llvm::SelectionDAGBuilder::FindMergedConditions(), findOrCondRelevantToCallArgument(), findRetainForStoreStrongContraction(), findSafeStoreForStoreStrongContraction(), findTRECandidate(), findUnwindDestinations(), first_use_of_in_block(), FitWeights(), fixPhis(), llvm::AMDGPULibCalls::fold(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnPHI(), foldICmpShlOne(), foldOperationIntoPhiValue(), foldReturnAndProcessPred(), foldSelectICmpAndOr(), FoldTwoEntryPHINode(), llvm::formLCSSAForInstructions(), ForwardSwitchConditionToPHI(), genLoopLimit(), llvm::IRTranslator::getAnalysisUsage(), llvm::ScalarEvolution::getBlockDisposition(), getBlockName(), llvm::InnerLoopVectorizer::getBroadcastInstrs(), getCallRetPHINode(), GetCaseResults(), getCommonReturnValue(), getCompareCC(), getComparePred(), getConstantAt(), getConstantPart(), getCoroBeginPredBlocks(), llvm::MemoryDependenceResults::getDependency(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getEstimatedNumberOfCaseClusters(), getFirstInst(), getFromRangeMetadata(), getFunction(), getInsertPointForUses(), llvm::MemoryDependenceResults::getInvariantGroupPointerDependency(), getJumpThreadDuplicationCost(), llvm::MemoryDependenceResults::getLoadLoadClobberFullWidthSize(), llvm::VNCoercion::getLoadValueForLoad(), getLoopPhiForCounter(), getModule(), llvm::MemoryDependenceResults::getNonLocalCallDependency(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), getNotRelocatableInstructions(), getOtherIncomingValue(), getParameterABIAttributes(), getParentPad(), getPointerOperand(), GetPointerOperand(), getPointerOperands(), llvm::LazyValueInfo::getPredicateAt(), llvm::ProfileSummaryInfo::getProfileCount(), getRangeForAffineARHelper(), getReductionValue(), getRetComponentType(), getScalarIntrinsicDeclaration(), getSignature(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), llvm::DependenceInfo::getSplitIteration(), getSubprogram(), getSuccPad(), getTrueOrFalseValue(), getVarName(), getX86SSEConditionCode(), handleFinalSuspend(), handleFree(), HandleInlinedEHPad(), HandleInlinedLandingPad(), handlePhiDef(), hasOutsideLoopUser(), hasProfileData(), HasSafePathToPredecessorCall(), hasSameExtUse(), llvm::FastISel::hasTrivialKill(), hasUnaryFloatFn(), hasValueBeenRAUWed(), llvm::SCEVExpander::hoistIVInc(), HoistThenElseCodeToIf(), InBlock(), INITIALIZE_PASS(), INITIALIZE_PASS_WITH_OPTIONS(), llvm::InlineFunction(), insertAfter(), insertBefore(), insertCall(), insertCallRetPHI(), llvm::DIBuilder::insertDbgValueIntrinsic(), llvm::DIBuilder::insertDeclare(), llvm::InstCombiner::InsertNewInstBefore(), Instruction(), is_empty(), IsAcceptableTarget(), llvm::isAllocaPromotable(), isBlockInLCSSAForm(), isBroadcastShuffle(), isCallPromotable(), isChainSelectCmpBranch(), isDynamicConstant(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::isEdgeFeasible(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), llvm::InductionDescriptor::isFPInductionPHI(), llvm::isGuaranteedToExecute(), llvm::isGuaranteedToExecuteForEveryIteration(), isIndirectBrTarget(), llvm::isInTailCallPosition(), isIntegerLoopHeaderPHI(), isInteresting(), isKnownNonNullFromDominatingCondition(), isKnownTypeIdMember(), isLoadConditional(), isLoadInvariantInLoop(), isLoopInvariant(), IsNonLocalValue(), isObjectDereferencedInBlock(), isOnlyReachableViaThisEdge(), isOrdered(), isPointerValueDeadOnEntryToFunction(), llvm::isPotentiallyReachable(), isPredicatedOnPHI(), isProfitableForVectorization(), isProfitableToFoldUnconditional(), llvm::DominatorTree::isReachableFromEntry(), isReportingError(), isSafeAndProfitableToSinkLoad(), isSafePHIToSpeculate(), llvm::isSafeToExpandAt(), llvm::isSafeToLoadUnconditionally(), isSameUnderlyingObjectInLoop(), llvm::AllocaInst::isStaticAlloca(), isStrideMul(), llvm::TargetLoweringBase::isSuitableForJumpTable(), isUnconditionalBranch(), llvm::AMDGPULibCalls::isUnsafeMath(), isUsedOutsideOfBlock(), isUsedOutsideOfDefiningBlock(), llvm::isValidAssumeForContext(), isZero(), IVUseShouldUsePostIncValue(), LdStHasDebugValue(), LLVMGetNextInstruction(), LLVMGetPreviousInstruction(), LLVMPositionBuilderBefore(), llvm::log2(), llvm::SelectionDAGBuilder::LowerAsSTATEPOINT(), llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundle(), llvm::SelectionDAGBuilder::LowerCallTo(), LowerInterruptReturn(), llvm::SelectionDAGBuilder::LowerStatepoint(), lowerStatepointMetaArgs(), makeBitReverse(), MakeGuardControlFlowExplicit(), llvm::AMDGPUSubtarget::makeLIDRangeMetadata(), MarkBlocksLiveIn(), llvm::HexagonTargetLowering::mayBeEmittedAsTailCall(), llvm::SITargetLowering::mayBeEmittedAsTailCall(), mayLoopAccessLocation(), memoryIsNotModifiedBetween(), MergeAliasResults(), mergeCleanupPad(), mergeConditionalStores(), mergeConditionalStoreToAddress(), mergeInlinedArrayAllocas(), moveAfter(), moveBBContents(), moveBefore(), llvm::LoopInfo::movementPreservesLCSSAForm(), moveUp(), llvm::InstDeleterIRStrategy::mutate(), needsRuntimeRegistrationOfSectionRange(), NegateValue(), okayForPHIOfOps(), operator<<(), optimizeDivRem(), OptimizeExtractBits(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), passingValueIsAlwaysUndefined(), patchAndReplaceAllUsesWith(), false::LibCallsShrinkWrap::perform(), PerformHeapAllocSRoA(), performMaskedAtomicOp(), llvm::PointerMayBeCapturedBefore(), llvm::DivergenceAnalysis::print(), llvm::Value::print(), llvm::LazyValueInfo::printLVI(), processAdd(), llvm::JumpThreadingPass::ProcessBlock(), llvm::JumpThreadingPass::ProcessBranchOnPHI(), llvm::JumpThreadingPass::ProcessBranchOnXOR(), processCmp(), processMemAccess(), processPHI(), processSelect(), processSwitch(), processUGT_ADDCST_ADD(), llvm::programUndefinedIfFullPoison(), llvm::promoteIndirectCall(), promoteSingleBlockAlloca(), propagateMetadata(), llvm::GVNHoist::rank(), ReduceSwitchRange(), llvm::AssumptionCache::registerAssumption(), removeEmptyCleanup(), removeFromParent(), RemoveInstInputs(), RemoveSwitchAfterSelectConversion(), removeTriviallyEmptyRange(), replaceAllUsesOfWithIn(), replaceAndRecursivelySimplifyImpl(), ReplaceCallWith(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::InstCombiner::replacedSelectWithOperand(), replaceExtractElements(), replaceFallthroughCoroEnd(), ReplaceFoldableUses(), llvm::ReplaceInstWithInst(), llvm::LoopInfo::replacementPreservesLCSSAForm(), llvm::replaceNonLocalUsesWith(), ReplaceUsesOfWith(), reportLoadElim(), reportMayClobberedLoad(), reuseTableCompare(), rewriteSingleStoreAlloca(), llvm::SSAUpdater::RewriteUse(), llvm::SSAUpdater::RewriteUseAfterInsertions(), RewriteUsesOfClonedInstructions(), llvm::InstCombiner::run(), safeCxtI(), SafeToMergeTerminators(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scaleCaseProbality(), scanInlinedCode(), scanOneBB(), scanPHIsAndUpdateValueMap(), llvm::FastISel::selectInstruction(), setBranchWeights(), llvm::IRBuilderBase::SetInsertPoint(), llvm::setProfMetadata(), llvm::AArch64TTIImpl::shouldConsiderAddressTypePromotion(), shouldConvert(), llvm::CaptureTracker::shouldExplore(), shouldGuaranteeTCO(), shouldKeepFDivF32(), shouldReorderOperands(), shouldRewriteStatepointsIn(), ShrinkDemandedConstant(), SimplifyBranchOnICmpChain(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), llvm::InstCombiner::simplifyDivRemOfSelectWithZeroOp(), simplifyOneLoop(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), simplifyRelocatesOffABase(), simplifySuspendPoint(), SimplifyTerminatorOnSelect(), llvm::simplifyUsersOfIV(), sink(), sinkAndCmp0Expression(), SinkCast(), SinkCmpExpression(), SinkInstruction(), sinkInstruction(), sinkLastInstruction(), llvm::InnerLoopVectorizer::sinkScalarOperands(), SinkShiftAndTruncate(), sinkThroughTriviallyReplacablePHI(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), SortNonLocalDepInfoCache(), SpeculativelyExecuteBB(), splitBeforeCatchSwitch(), llvm::SplitBlockAndInsertIfThen(), llvm::SplitBlockAndInsertIfThenElse(), splitBlockIfNotFirst(), splitCallSite(), llvm::SplitCriticalEdge(), splitMergedValStore(), splitPredecessorsOfLoopExit(), StackMallocSizeClass(), stripModuloOnShift(), SumCanReachMin(), supportedAddressingMode(), SwitchToLookupTable(), llvm::JumpThreadingPass::ThreadEdge(), truncateIVUse(), tryToElideArgumentCopy(), llvm::FastISel::tryToFoldLoad(), TryToMergeLandingPad(), tryToMoveFreeBeforeNullTest(), tryToSimplifyUncondBranchWithICmpInIt(), TryToSinkInstruction(), tryToSplitOnOrPredicatedArgument(), tryToSplitOnPHIPredicatedArgument(), llvm::JumpThreadingPass::TryToUnfoldSelect(), llvm::JumpThreadingPass::TryToUnfoldSelectInCurrBB(), tryToVectorizeHorReductionOrInstOperands(), tryUnmergingGEPsAcrossIndirectBr(), TurnSwitchRangeIntoICmp(), TypeSizeToSizeIndex(), unswitchInvariantBranch(), unswitchTrivialBranch(), unswitchTrivialSwitch(), updateOperand(), updatePredecessorProfileMetadata(), llvm::UpgradeIntrinsicCall(), useFuncSeen(), ValueDominatesPHI(), llvm::SelectionDAGBuilder::visit(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitAllocaInst(), llvm::InstCombiner::visitCallInst(), llvm::Interpreter::visitCallSite(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitGetElementPtrInst(), visitIVCast(), llvm::InstCombiner::visitLandingPadInst(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitStoreInst(), llvm::InnerLoopVectorizer::widenInstruction(), llvm::InnerLoopVectorizer::widenPHIInstruction(), willNotOverflow(), and X86ChooseCmpImmediateOpcode().

◆ getParent() [2/2]

BasicBlock* llvm::Instruction::getParent ( )
inline

Definition at line 67 of file Instruction.h.

◆ getSubclassDataFromInstruction()

unsigned llvm::Instruction::getSubclassDataFromInstruction ( ) const
inlineprotected

Definition at line 673 of file Instruction.h.

Referenced by llvm::AllocaInst::getAlignment(), llvm::LoadInst::getAlignment(), llvm::StoreInst::getAlignment(), llvm::CallInst::getCallingConv(), llvm::InvokeInst::getCallingConv(), llvm::AtomicCmpXchgInst::getFailureOrdering(), llvm::InvokeInst::getLandingPadInst(), llvm::AtomicRMWInst::getOperation(), llvm::LoadInst::getOrdering(), llvm::StoreInst::getOrdering(), llvm::FenceInst::getOrdering(), llvm::AtomicRMWInst::getOrdering(), llvm::CmpInst::getPredicate(), llvm::AtomicCmpXchgInst::getSuccessOrdering(), llvm::CallInst::getTailCallKind(), llvm::CatchSwitchInst::hasUnwindDest(), llvm::CleanupReturnInst::hasUnwindDest(), llvm::LandingPadInst::isCleanup(), llvm::CallInst::isMustTailCall(), llvm::CallInst::isNoTailCall(), llvm::AllocaInst::isSwiftError(), llvm::CallInst::isTailCall(), llvm::AllocaInst::isUsedWithInAlloca(), llvm::LoadInst::isVolatile(), llvm::StoreInst::isVolatile(), llvm::AtomicCmpXchgInst::isVolatile(), llvm::AtomicRMWInst::isVolatile(), llvm::AtomicCmpXchgInst::isWeak(), llvm::AllocaInst::setAlignment(), llvm::LoadInst::setAlignment(), llvm::StoreInst::setAlignment(), llvm::CallInst::setCallingConv(), llvm::LandingPadInst::setCleanup(), llvm::AtomicCmpXchgInst::setFailureOrdering(), llvm::AtomicRMWInst::setOperation(), llvm::LoadInst::setOrdering(), llvm::StoreInst::setOrdering(), llvm::FenceInst::setOrdering(), llvm::AtomicRMWInst::setOrdering(), llvm::AtomicCmpXchgInst::setSuccessOrdering(), llvm::AllocaInst::setSwiftError(), llvm::CallInst::setTailCall(), llvm::CallInst::setTailCallKind(), llvm::AllocaInst::setUsedWithInAlloca(), llvm::LoadInst::setVolatile(), llvm::StoreInst::setVolatile(), llvm::AtomicCmpXchgInst::setVolatile(), llvm::AtomicRMWInst::setVolatile(), and llvm::AtomicCmpXchgInst::setWeak().

◆ hasAllowContract()

bool Instruction::hasAllowContract ( ) const

Determine whether the allow-contract flag is set.

Definition at line 224 of file Instruction.cpp.

References assert().

◆ hasAllowReassoc()

bool Instruction::hasAllowReassoc ( ) const

Determine whether the allow-reassociation flag is set.

Definition at line 199 of file Instruction.cpp.

References assert().

◆ hasAllowReciprocal()

bool Instruction::hasAllowReciprocal ( ) const

Determine whether the allow-reciprocal flag is set.

Definition at line 219 of file Instruction.cpp.

References assert().

Referenced by llvm::hoistRegion(), and llvm::InstCombiner::visitFDiv().

◆ hasApproxFunc()

bool Instruction::hasApproxFunc ( ) const

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

Definition at line 229 of file Instruction.cpp.

References assert().

◆ hasAtomicLoad()

bool Instruction::hasAtomicLoad ( ) const

Return true if this atomic instruction loads from memory.

Definition at line 560 of file Instruction.cpp.

References assert(), getOpcode(), isAtomic(), and llvm::SPII::Load.

Referenced by llvm::PPCTargetLowering::emitTrailingFence().

◆ hasAtomicStore()

bool Instruction::hasAtomicStore ( ) const

Return true if this atomic instruction stores to memory.

Definition at line 572 of file Instruction.cpp.

References assert(), getOpcode(), isAtomic(), and llvm::SPII::Store.

Referenced by llvm::ARMTargetLowering::emitLeadingFence(), and llvm::TargetLoweringBase::emitLeadingFence().

◆ hasMetadata()

bool llvm::Instruction::hasMetadata ( ) const
inline

Return true if this instruction has any metadata attached to it.

Definition at line 184 of file Instruction.h.

Referenced by copyMetadata().

◆ hasMetadataOtherThanDebugLoc()

bool llvm::Instruction::hasMetadataOtherThanDebugLoc ( ) const
inline

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

Definition at line 188 of file Instruction.h.

Referenced by emitSignedInt64(), and hoist().

◆ hasNoInfs()

bool Instruction::hasNoInfs ( ) const

Determine whether the no-infs flag is set.

Definition at line 209 of file Instruction.cpp.

References assert().

Referenced by SimplifyFAddInst().

◆ hasNoNaNs()

bool Instruction::hasNoNaNs ( ) const

Determine whether the no-NaNs flag is set.

Definition at line 204 of file Instruction.cpp.

References assert().

Referenced by getPow(), getUnderlyingArgReg(), isBroadcastShuffle(), and SimplifyFAddInst().

◆ hasNoSignedWrap()

bool Instruction::hasNoSignedWrap ( ) const

◆ hasNoSignedZeros()

bool Instruction::hasNoSignedZeros ( ) const

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

Definition at line 214 of file Instruction.cpp.

References assert().

Referenced by llvm::BinaryOperator::isFNeg(), mapBinOpcode(), and llvm::InstCombiner::visitFMul().

◆ hasNoUnsignedWrap()

bool Instruction::hasNoUnsignedWrap ( ) const

◆ insertAfter()

void Instruction::insertAfter ( Instruction InsertPos)

◆ insertBefore()

void Instruction::insertBefore ( Instruction InsertPos)

◆ isArithmeticShift()

bool llvm::Instruction::isArithmeticShift ( ) const
inline

Return true if this is an arithmetic shift right.

Definition at line 155 of file Instruction.h.

Referenced by processUGT_ADDCST_ADD().

◆ isAssociative() [1/2]

bool Instruction::isAssociative ( ) const

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.

Definition at line 594 of file Instruction.cpp.

References getOpcode(), isFast(), and llvm_unreachable.

Referenced by buildMultiplyTree(), canTransformAccumulatorRecursion(), llvm::ConstantFoldBinaryInstruction(), createRdxShuffleMask(), isIgnorableInst(), LinearizeExprTree(), simplifyAssocCastAssoc(), and SimplifyAssociativeBinOp().

◆ isAssociative() [2/2]

static bool llvm::Instruction::isAssociative ( unsigned  Opcode)
inlinestatic

Definition at line 439 of file Instruction.h.

References llvm::MCID::Add.

◆ isAtomic()

bool Instruction::isAtomic ( ) const

◆ isBinaryOp() [1/2]

bool llvm::Instruction::isBinaryOp ( ) const
inline

◆ isBinaryOp() [2/2]

static bool llvm::Instruction::isBinaryOp ( unsigned  Opcode)
inlinestatic

Definition at line 140 of file Instruction.h.

◆ isBitwiseLogicOp() [1/2]

static bool llvm::Instruction::isBitwiseLogicOp ( unsigned  Opcode)
inlinestatic

Determine if the Opcode is and/or/xor.

Definition at line 160 of file Instruction.h.

Referenced by canEvaluateZExtd(), foldBitCastBitwiseLogic(), foldLogicCastConstant(), simplifyAssocCastAssoc(), and SimplifyBSwap().

◆ isBitwiseLogicOp() [2/2]

bool llvm::Instruction::isBitwiseLogicOp ( ) const
inline

Return true if this is and/or/xor.

Definition at line 165 of file Instruction.h.

Referenced by llvm::PatternMatch::is_bitwiselogic_op::isOpType().

◆ isCast() [1/2]

bool llvm::Instruction::isCast ( ) const
inline

◆ isCast() [2/2]

static bool llvm::Instruction::isCast ( unsigned  OpCode)
inlinestatic

Determine if the OpCode is one of the CastInst instructions.

Definition at line 170 of file Instruction.h.

◆ isCommutative() [1/2]

bool llvm::Instruction::isCommutative ( ) const
inline

◆ isCommutative() [2/2]

static bool llvm::Instruction::isCommutative ( unsigned  Opcode)
inlinestatic

Definition at line 452 of file Instruction.h.

References llvm::MCID::Add.

◆ isEHPad()

bool llvm::Instruction::isEHPad ( ) const
inline

◆ isExact()

bool Instruction::isExact ( ) const

◆ isFast()

bool Instruction::isFast ( ) const

◆ isFenceLike()

bool llvm::Instruction::isFenceLike ( ) const
inline

Return true if this instruction behaves like a memory fence: it can load or store to memory location without being given a memory location.

Definition at line 514 of file Instruction.h.

References llvm::MCID::Call.

Referenced by llvm::MemorySSA::CachingWalker::getClobberingMemoryAccess(), and llvm::AAResults::getModRefInfo().

◆ isFuncletPad() [1/2]

bool llvm::Instruction::isFuncletPad ( ) const
inline

Definition at line 132 of file Instruction.h.

References isFuncletPad().

Referenced by llvm::FuncletPadInst::classof(), and isFuncletPad().

◆ isFuncletPad() [2/2]

static bool llvm::Instruction::isFuncletPad ( unsigned  OpCode)
inlinestatic

Determine if the OpCode is one of the FuncletPadInst instructions.

Definition at line 175 of file Instruction.h.

◆ isIdempotent() [1/2]

bool llvm::Instruction::isIdempotent ( ) const
inline

Return true if the instruction is idempotent:

Idempotent operators satisfy: x op x === x

In LLVM, the And and Or operators are idempotent.

Definition at line 469 of file Instruction.h.

References isIdempotent().

Referenced by IncorporateWeight(), and isIdempotent().

◆ isIdempotent() [2/2]

static bool llvm::Instruction::isIdempotent ( unsigned  Opcode)
inlinestatic

Definition at line 470 of file Instruction.h.

◆ isIdenticalTo()

bool Instruction::isIdenticalTo ( const Instruction I) const

◆ isIdenticalToWhenDefined()

bool Instruction::isIdenticalToWhenDefined ( const Instruction I) const

This is like isIdenticalTo, except that it ignores the SubclassOptionalData flags, which may specify conditions under which the instruction's result is undefined.

Definition at line 437 of file Instruction.cpp.

References llvm::PHINode::block_begin(), llvm::lltok::equal, llvm::User::getNumOperands(), getOpcode(), llvm::Value::getType(), haveSameSpecialState(), I, llvm::User::op_begin(), and llvm::User::op_end().

Referenced by GetLocation(), llvm::DenseMapInfo< SimpleValue >::getTombstoneKey(), HoistThenElseCodeToIf(), and isIdenticalTo().

◆ isLogicalShift()

bool llvm::Instruction::isLogicalShift ( ) const
inline

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

Definition at line 150 of file Instruction.h.

Referenced by canEvaluateShiftedShift(), llvm::InstCombiner::FoldShiftByConstant(), and simplifyValueKnownNonZero().

◆ isNilpotent() [1/2]

bool llvm::Instruction::isNilpotent ( ) const
inline

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.

Definition at line 483 of file Instruction.h.

References isNilpotent().

Referenced by IncorporateWeight(), and isNilpotent().

◆ isNilpotent() [2/2]

static bool llvm::Instruction::isNilpotent ( unsigned  Opcode)
inlinestatic

Definition at line 484 of file Instruction.h.

◆ isSameOperationAs()

bool Instruction::isSameOperationAs ( const Instruction I,
unsigned  flags = 0 
) const

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.

Returns
true if the specified instruction is the same operation as the current one. Determine if one instruction is the same operation as another.

Definition at line 463 of file Instruction.cpp.

References CompareIgnoringAlignment, CompareUsingScalarTypes, llvm::User::getNumOperands(), getOpcode(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::Value::getType(), and haveSameSpecialState().

Referenced by canSinkInstructions(), getIncrmentFactorSCEV(), isIgnorableInst(), isSafeAndProfitableToSinkLoad(), and llvm::InstCombiner::visitStoreInst().

◆ isShift() [1/2]

bool llvm::Instruction::isShift ( )
inline

◆ isShift() [2/2]

static bool llvm::Instruction::isShift ( unsigned  Opcode)
inlinestatic

Determine if the Opcode is one of the shift instructions.

Definition at line 145 of file Instruction.h.

◆ isTerminator() [1/2]

bool llvm::Instruction::isTerminator ( ) const
inline

◆ isTerminator() [2/2]

static bool llvm::Instruction::isTerminator ( unsigned  OpCode)
inlinestatic

Definition at line 136 of file Instruction.h.

◆ isUsedOutsideOfBlock()

bool Instruction::isUsedOutsideOfBlock ( const BasicBlock BB) const

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.

Definition at line 487 of file Instruction.cpp.

References llvm::dyn_cast(), getParent(), I, and llvm::Value::uses().

◆ mayHaveSideEffects()

bool llvm::Instruction::mayHaveSideEffects ( ) const
inline

Return true if the instruction may have side effects.

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.

Definition at line 535 of file Instruction.h.

Referenced by canMoveAboveCall(), llvm::CloneFunction(), ConvertToSInt(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), ExposePointerBase(), FoldCondBranchOnPHI(), genLoopLimit(), getRangeForAffineARHelper(), insertDebugValues(), isAlwaysLive(), llvm::isInTailCallPosition(), isLoopDead(), isOnlyReachableViaThisEdge(), IsSafeComputationToRemove(), isSafePHIToSpeculate(), isUnconditionalBranch(), replaceAndRecursivelySimplifyImpl(), ReplaceFoldableUses(), ReplaceUsesOfWith(), llvm::InnerLoopVectorizer::sinkScalarOperands(), SpeculativelyExecuteBB(), TryToSinkInstruction(), unswitchAllTrivialConditions(), and llvm::wouldInstructionBeTriviallyDead().

◆ mayReadFromMemory()

bool Instruction::mayReadFromMemory ( ) const

◆ mayReadOrWriteMemory()

bool llvm::Instruction::mayReadOrWriteMemory ( ) const
inline

◆ mayThrow()

bool Instruction::mayThrow ( ) const

◆ mayWriteToMemory()

bool Instruction::mayWriteToMemory ( ) const

◆ moveAfter()

void Instruction::moveAfter ( Instruction MovePos)

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

Definition at line 92 of file Instruction.cpp.

References llvm::ilist_node_impl< OptionsT >::getIterator(), getParent(), and moveBefore().

Referenced by hasSameExtUse(), and optimizeDivRem().

◆ moveBefore() [1/2]

void Instruction::moveBefore ( Instruction MovePos)

◆ moveBefore() [2/2]

void Instruction::moveBefore ( BasicBlock BB,
SymbolTableList< Instruction >::iterator  I 
)

◆ operator=()

Instruction& llvm::Instruction::operator= ( const Instruction )
delete

◆ removeFromParent()

void Instruction::removeFromParent ( )

◆ setAAMetadata()

void Instruction::setAAMetadata ( const AAMDNodes N)

◆ setDebugLoc()

void llvm::Instruction::setDebugLoc ( DebugLoc  Loc)
inline

◆ setFast()

void Instruction::setFast ( bool  B)

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.

Definition at line 149 of file Instruction.cpp.

References assert().

◆ setFastMathFlags()

void Instruction::setFastMathFlags ( FastMathFlags  FMF)

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.

Definition at line 184 of file Instruction.cpp.

References assert().

Referenced by buildMultiplyTree(), ClearSubclassDataAfterReassociation(), CreateAdd(), CreateMul(), CreateNeg(), llvm::IRBuilder< TargetFolder >::CreateUnreachable(), foldSelectICmpAndOr(), FunctionNumber(), LinearizeExprTree(), readWideAPInt(), simplifyAssocCastAssoc(), and llvm::InstCombiner::visitFDiv().

◆ setHasAllowReassoc()

void Instruction::setHasAllowReassoc ( bool  B)

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.

Definition at line 154 of file Instruction.cpp.

References assert().

◆ setHasAllowReciprocal()

void Instruction::setHasAllowReciprocal ( bool  B)

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.

Definition at line 174 of file Instruction.cpp.

References assert().

◆ setHasApproxFunc()

void Instruction::setHasApproxFunc ( bool  B)

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.

Definition at line 179 of file Instruction.cpp.

References assert().

◆ setHasNoInfs()

void Instruction::setHasNoInfs ( bool  B)

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.

Definition at line 164 of file Instruction.cpp.

References assert().

◆ setHasNoNaNs()

void Instruction::setHasNoNaNs ( bool  B)

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.

Definition at line 159 of file Instruction.cpp.

References assert().

◆ setHasNoSignedWrap()

void Instruction::setHasNoSignedWrap ( bool  b = true)

◆ setHasNoSignedZeros()

void Instruction::setHasNoSignedZeros ( bool  B)

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.

Definition at line 169 of file Instruction.cpp.

References assert().

◆ setHasNoUnsignedWrap()

void Instruction::setHasNoUnsignedWrap ( bool  b = true)

◆ setInstructionSubclassData()

void llvm::Instruction::setInstructionSubclassData ( unsigned short  D)
inlineprotected

◆ setIsExact()

void Instruction::setIsExact ( bool  b = true)

◆ setMetadata() [1/2]

void Instruction::setMetadata ( unsigned  KindID,
MDNode Node 
)

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.

Definition at line 1214 of file Metadata.cpp.

References assert(), llvm::MDNode::getContext(), llvm::LLVMContextImpl::InstructionMetadata, llvm::LLVMContext::MD_dbg, and llvm::LLVMContext::pImpl.

Referenced by AddAliasScopeMetadata(), llvm::LoopVersioning::annotateInstWithNoAlias(), llvm::annotateValueSite(), CloneAliasScopeMetadata(), combineLoadToNewType(), llvm::combineMetadata(), combineStoreToNewValue(), ComputePostOrders(), llvm::ConstantFoldTerminator(), copyMetadata(), llvm::copyNonnullMetadata(), llvm::copyRangeMetadata(), createDirectCallInst(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemCpy(), llvm::createFalkorMarkStridedAccessesPass(), llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), llvm::createObjCARCOptPass(), llvm::IRBuilder< TargetFolder >::CreateUnreachable(), findBasePointer(), llvm::CodeExtractor::findInputsOutputs(), llvm::FoldBranchToCommonDest(), foldCtpop(), foldCttzCtlz(), getNegativeIsTrueBoolVec(), handlePhiDef(), handleSwitchExpect(), hasOnlyUniformBranches(), insertUniqueBackedgeBlock(), isKnownTypeIdMember(), isSafeAndProfitableToSinkLoad(), llvm::AMDGPUSubtarget::makeLIDRangeMetadata(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment(), parseOptionalLinkageAux(), llvm::peelLoop(), llvm::promoteIndirectCall(), llvm::propagateMetadata(), PropagateParallelLoopAccessMetadata(), RemoveNonValidAttrAtIndex(), runCVP(), setBranchWeights(), llvm::setIrrLoopHeaderMetadata(), llvm::Loop::setLoopID(), setNoClobberMetadata(), llvm::setProfMetadata(), setProfWeight(), SortCallTargets(), llvm::SplitBlockAndInsertIfThen(), llvm::SplitBlockAndInsertIfThenElse(), swapProfMetadata(), llvm::JumpThreadingPass::ThreadEdge(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), tryUnmergingGEPsAcrossIndirectBr(), updateBranchWeights(), updatePredecessorProfileMetadata(), updateProfWeight(), llvm::UpgradeIntrinsicCall(), llvm::InstCombiner::visitCallInst(), and wrapConstantAsMetadata().

◆ setMetadata() [2/2]

void Instruction::setMetadata ( StringRef  Kind,
MDNode Node 
)

Definition at line 1177 of file Metadata.cpp.

References llvm::MDNode::getContext(), Kind, and setMetadata().

◆ setProfWeight()

void Instruction::setProfWeight ( uint64_t  W)

◆ swapProfMetadata()

void Instruction::swapProfMetadata ( )

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

Definition at line 612 of file Instruction.cpp.

References llvm::MDNode::get(), llvm::MDNode::getContext(), getMetadata(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::MDString::getString(), llvm::LLVMContext::MD_prof, and setMetadata().

Referenced by CloneLoop(), foldSelectICmpAndOr(), and llvm::BranchInst::swapSuccessors().

◆ updateProfWeight()

void Instruction::updateProfWeight ( uint64_t  S,
uint64_t  T 
)

◆ user_back() [1/2]

Instruction* llvm::Instruction::user_back ( )
inline

◆ user_back() [2/2]

const Instruction* llvm::Instruction::user_back ( ) const
inline

Definition at line 64 of file Instruction.h.

Friends And Related Function Documentation

◆ SymbolTableListTraits< Instruction >

friend class SymbolTableListTraits< Instruction >
friend

Definition at line 644 of file Instruction.h.


The documentation for this class was generated from the following files: