|
LLVM
10.0.0
|
#include "llvm/IR/Instruction.h"
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 | UnaryOps |
| 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 | |
| Instruction & | operator= (const Instruction &)=delete |
| Instruction * | user_back () |
| Specialize the methods defined in Value, as we know that an instruction can only be used by other instructions. More... | |
| const Instruction * | user_back () const |
| const BasicBlock * | getParent () const |
| BasicBlock * | getParent () |
| const Module * | getModule () const |
| Return the module owning the function this instruction belongs to or nullptr it the function does not have a module. More... | |
| Module * | getModule () |
| const Function * | getFunction () const |
| Return the function this instruction belongs to. More... | |
| Function * | getFunction () |
| 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 char * | getOpcodeName () const |
| bool | isTerminator () const |
| bool | isUnaryOp () const |
| bool | isBinaryOp () const |
| bool | isIntDivRem () const |
| bool | isShift () const |
| bool | isCast () const |
| bool | isFuncletPad () const |
| bool | isExceptionalTerminator () const |
| bool | isIndirectTerminator () 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... | |
| bool | hasMetadata (unsigned KindID) const |
| Return true if this instruction has the given type of metadata attached. More... | |
| bool | hasMetadata (StringRef Kind) const |
| Return true if this instruction has the given type of metadata attached. More... | |
| MDNode * | getMetadata (unsigned KindID) const |
| Get the metadata of given kind attached to this Instruction. More... | |
| MDNode * | getMetadata (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 | 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 DebugLoc & | getDebugLoc () const |
| Return the debug location for this node as a DebugLoc. More... | |
| void | setHasNoUnsignedWrap (bool b=true) |
| Set or clear the nuw 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 | isSafeToRemove () const |
| Return true if the instruction can be removed if the result is unused. More... | |
| bool | isEHPad () const |
| Return true if the instruction is a variety of EH-block. More... | |
| bool | isLifetimeStartOrEnd () const |
| Return true if the instruction is a llvm.lifetime.start or llvm.lifetime.end marker. More... | |
| const Instruction * | getNextNonDebugInstruction () const |
| Return a pointer to the next non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists. More... | |
| Instruction * | getNextNonDebugInstruction () |
| const Instruction * | getPrevNonDebugInstruction () const |
| Return a pointer to the previous non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists. More... | |
| Instruction * | getPrevNonDebugInstruction () |
| Instruction * | clone () 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... | |
| unsigned | getNumSuccessors () const |
| Return the number of successors that this instruction has. More... | |
| BasicBlock * | getSuccessor (unsigned Idx) const |
| Return the specified successor. This instruction must be a terminator. More... | |
| void | setSuccessor (unsigned Idx, BasicBlock *BB) |
| Update the specified successor to point at the provided block. More... | |
| void | replaceSuccessorWith (BasicBlock *OldBB, BasicBlock *NewBB) |
| Replace specified successor OldBB to point at the provided 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 *Usr, unsigned) |
| Placement delete - required by std, called if the ctor throws. More... | |
| void | operator delete (void *Usr, unsigned, unsigned) |
| Placement delete - required by std, called if the ctor throws. More... | |
| const Use * | getOperandList () const |
| Use * | getOperandList () |
| Value * | getOperand (unsigned i) const |
| void | setOperand (unsigned i, Value *Val) |
| const Use & | getOperandUse (unsigned i) const |
| Use & | getOperandUse (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_iterator > | operand_values () |
| const_value_op_iterator | value_op_begin () const |
| const_value_op_iterator | value_op_end () const |
| iterator_range< const_value_op_iterator > | operand_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 | |
| Value & | operator= (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... | |
| Type * | getType () const |
| All values are typed, get the type of this value. More... | |
| LLVMContext & | getContext () const |
| All values hold a context through their type. More... | |
| bool | hasName () const |
| ValueName * | getValueName () 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 | replaceUsesWithIf (Value *New, llvm::function_ref< bool(Use &U)> ShouldReplace) |
| Go through the uses list for this definition and make each use point to "V" if the callback ShouldReplace returns true for the given Use. 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 | assertModuleIsMaterializedImpl () const |
| void | assertModuleIsMaterialized () const |
| bool | use_empty () const |
| bool | materialized_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_iterator > | materialized_uses () |
| iterator_range< const_use_iterator > | materialized_uses () const |
| iterator_range< use_iterator > | uses () |
| iterator_range< const_use_iterator > | uses () 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 |
| User * | user_back () |
| const User * | user_back () const |
| iterator_range< user_iterator > | materialized_users () |
| iterator_range< const_user_iterator > | materialized_users () const |
| iterator_range< user_iterator > | users () |
| iterator_range< const_user_iterator > | users () 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 Value * | stripPointerCasts () const |
| Strip off pointer casts, all-zero GEPs and address space casts. More... | |
| Value * | stripPointerCasts () |
| const Value * | stripPointerCastsAndAliases () const |
| Strip off pointer casts, all-zero GEPs, address space casts, and aliases. More... | |
| Value * | stripPointerCastsAndAliases () |
| const Value * | stripPointerCastsSameRepresentation () const |
| Strip off pointer casts, all-zero GEPs and address space casts but ensures the representation of the result stays the same. More... | |
| Value * | stripPointerCastsSameRepresentation () |
| const Value * | stripPointerCastsAndInvariantGroups () const |
| Strip off pointer casts, all-zero GEPs and invariant group info. More... | |
| Value * | stripPointerCastsAndInvariantGroups () |
| const Value * | stripInBoundsConstantOffsets () const |
| Strip off pointer casts and all-constant inbounds GEPs. More... | |
| Value * | stripInBoundsConstantOffsets () |
| const Value * | stripAndAccumulateConstantOffsets (const DataLayout &DL, APInt &Offset, bool AllowNonInbounds) const |
| Accumulate the constant offset this value has compared to a base pointer. More... | |
| Value * | stripAndAccumulateConstantOffsets (const DataLayout &DL, APInt &Offset, bool AllowNonInbounds) |
| const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
| This is a wrapper around stripAndAccumulateConstantOffsets with the in-bounds requirement set to false. More... | |
| Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
| const Value * | stripInBoundsOffsets () const |
| Strip off pointer casts and inbounds GEPs. More... | |
| Value * | stripInBoundsOffsets () |
| uint64_t | getPointerDereferenceableBytes (const DataLayout &DL, bool &CanBeNull) const |
| Returns the number of bytes known to be dereferenceable for the pointer value. More... | |
| MaybeAlign | getPointerAlignment (const DataLayout &DL) const |
| Returns an alignment of the pointer value. More... | |
| const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
| Translate PHI node to its predecessor from the given basic block. More... | |
| Value * | DoPHITranslation (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 > | |
| Instruction * | getPrevNode () |
| const Instruction * | getPrevNode () const |
Get the previous node, or nullptr for the list head. More... | |
| Instruction * | getNextNode () |
Get the next node, or nullptr for the list tail. More... | |
| const Instruction * | getNextNode () 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 char * | getOpcodeName (unsigned OpCode) |
| static bool | isTerminator (unsigned OpCode) |
| static bool | isUnaryOp (unsigned Opcode) |
| static bool | isBinaryOp (unsigned Opcode) |
| static bool | isIntDivRem (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 | isExceptionalTerminator (unsigned OpCode) |
| Returns true if the OpCode is a terminator related to exception handling. More... | |
| static bool | isIndirectTerminator (unsigned OpCode) |
| Returns true if the OpCode is a terminator with indirect targets. 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> | |
| Use & | Op () |
| template<int Idx> | |
| const Use & | Op () 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 > |
Definition at line 43 of file Instruction.h.
Definition at line 704 of file Instruction.h.
Definition at line 718 of file Instruction.h.
Definition at line 725 of file Instruction.h.
Definition at line 711 of file Instruction.h.
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 644 of file Instruction.h.
Definition at line 732 of file Instruction.h.
Definition at line 690 of file Instruction.h.
Definition at line 697 of file Instruction.h.
|
protected |
Definition at line 44 of file Instruction.cpp.
|
delete |
|
protected |
Definition at line 23 of file Instruction.cpp.
References assert(), llvm::BasicBlock::getInstList(), llvm::ilist_node_impl< OptionsT >::getIterator(), getParent(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::insert().
|
protected |
Definition at line 35 of file Instruction.cpp.
References assert(), llvm::BasicBlock::getInstList(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::push_back().
Logical 'and' of any supported wrapping, exact, and fast-math flags of V and this instruction.
Definition at line 267 of file Instruction.cpp.
References copyFastMathFlags(), getFastMathFlags(), hasNoSignedWrap(), hasNoUnsignedWrap(), isExact(), llvm::X86II::OB, setHasNoSignedWrap(), setHasNoUnsignedWrap(), and setIsExact().
Referenced by llvm::GVNExpression::Expression::dump(), foldSelectShuffle(), HoistThenElseCodeToIf(), isSafeAndProfitableToSinkLoad(), NegateValue(), llvm::patchReplacementInstruction(), llvm::propagateIRFlags(), and sinkLastInstruction().
| 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 689 of file DebugInfo.cpp.
References llvm::DILocation::getMergedLocation().
Referenced by HoistThenElseCodeToIf(), sinkLastInstruction(), SpeculativelyExecuteBB(), and updateForIncomingValueLocation().
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 683 of file Instruction.h.
References llvm::Value::getValueID().
| Instruction * Instruction::clone | ( | ) | const |
Create a copy of 'this' instruction that is identical in all ways except the following:
Definition at line 730 of file Instruction.cpp.
References copyMetadata(), getOpcode(), llvm_unreachable, and llvm::Value::SubclassOptionalData.
Referenced by canonicalizeSaturatedAdd(), Cleanup(), llvm::CloneFunction(), cloneInstForMustTail(), CloneInstructionInExitBlock(), llvm::createSeparateConstOffsetFromGEPPass(), ehAwareSplitEdge(), llvm::FoldReturnIntoUncondBranch(), HoistThenElseCodeToIf(), llvm::insertDebugValuesForPHIs(), isBroadcastShuffle(), isOnlyReachableViaThisEdge(), isProfitableForVectorization(), isReportingError(), LLVMInstructionClone(), okayForPHIOfOps(), optimizeSQRT(), rematerializeLiveValues(), replaceGEPIdxWithZero(), llvm::InnerLoopVectorizer::scalarizeInstruction(), shouldRotateLoopExitingLatch(), simplifyTerminatorLeadingToRet(), sinkInstruction(), llvm::SplitLandingPadPredecessors(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), updateOperand(), and llvm::InnerLoopVectorizer::widenGEP().
| 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(), createCallHelper(), foldOperationIntoPhiValue(), foldOperationIntoSelectOperand(), getMulHu(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFMul(), and llvm::InstCombiner::visitFPTrunc().
| void Instruction::copyFastMathFlags | ( | const Instruction * | I | ) |
Copy I's fast-math flags.
Definition at line 239 of file Instruction.cpp.
References copyFastMathFlags(), and getFastMathFlags().
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::CmpInst::CmpInst(), llvm::UnaryOperator::CreateWithCopiedFlags(), llvm::BinaryOperator::CreateWithCopiedFlags(), foldSelectShuffle(), foldSelectShuffleWith1Binop(), llvm::InstCombiner::foldVariableSignZeroExtensionOfVariableHighBitExtract(), isSafeAndProfitableToSinkLoad(), isSelect01(), shouldMergeGEPs(), llvm::InstCombiner::visitCallInst(), and llvm::InstCombiner::visitSub().
| void Instruction::copyMetadata | ( | const Instruction & | SrcInst, |
| ArrayRef< unsigned > | WL = ArrayRef<unsigned>() |
||
| ) |
Copy metadata from SrcInst to this instruction.
WL, if not empty, specifies the list of meta data that needs to be copied. If WL is empty, all meta data will be copied.
Definition at line 709 of file Instruction.cpp.
References llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count(), getAllMetadataOtherThanDebugLoc(), getDebugLoc(), hasMetadata(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), setDebugLoc(), setMetadata(), and llvm::ARMISD::WLS.
Referenced by clone(), llvm::SelectInst::Create(), llvm::createCallMatchingInvoke(), llvm::createSeparateConstOffsetFromGEPPass(), getMulHu(), getTypePartition(), ShrinkDemandedConstant(), and llvm::sroa::AllocaSliceRewriter::visit().
| void Instruction::dropPoisonGeneratingFlags | ( | ) |
Drops flags that may cause this instruction to evaluate to poison despite having non-poison inputs.
Definition at line 120 of file Instruction.cpp.
References llvm::MCID::Add, getOpcode(), setHasNoSignedWrap(), setHasNoUnsignedWrap(), and setIsExact().
Referenced by clearAssumptionsOfUsers(), foldSelectShuffle(), foldSelectShuffleWith1Binop(), and ShrinkDemandedConstant().
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.
Definition at line 1197 of file Metadata.cpp.
References llvm::ArrayRef< T >::begin(), llvm::SmallSet< T, N, C >::count(), llvm::SmallSet< T, N, C >::empty(), llvm::ArrayRef< T >::end(), llvm::MDNode::getContext(), I, Info, llvm::SmallSet< T, N, C >::insert(), llvm::LLVMContextImpl::InstructionMetadata, and llvm::LLVMContext::pImpl.
Referenced by llvm::combineMetadata(), hoist(), llvm::hoistAllInstructionsInto(), llvm::Loop::makeLoopInvariant(), SpeculativelyExecuteBB(), and stripInvalidMetadataFromInstruction().
|
inline |
Definition at line 299 of file Instruction.h.
References llvm::None.
|
inline |
Definition at line 302 of file Instruction.h.
References llvm::makeArrayRef().
Definition at line 305 of file Instruction.h.
References llvm::RISCVFenceField::W.
| iplist< Instruction >::iterator Instruction::eraseFromParent | ( | ) |
This method unlinks 'this' from the containing basic block and deletes it.
Definition at line 67 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(), assertBranchOrSelectConditionHoisted(), atomicSizeSupported(), buildMultiplyTree(), BuildSubAggregate(), calcArraySize(), llvm::changeToCall(), Cleanup(), CleanupPointerRootUsers(), llvm::CloneAndPruneIntoFromInst(), ComputePostOrders(), ConnectEpilog(), ConnectProlog(), ConvertToSInt(), createCallInst(), llvm::OpenMPIRBuilder::CreateCancel(), createCast(), llvm::createDeadArgHackingPass(), llvm::createDwarfEHPass(), CreateGCRelocates(), llvm::createMemCpyLoopUnknownSize(), createMemMoveLoop(), createMemSetLoop(), llvm::createObjCARCOptPass(), createOrdering(), llvm::OpenMPIRBuilder::CreateParallel(), CreatePrologue(), llvm::createScalarizerPass(), llvm::createSeparateConstOffsetFromGEPPass(), cse(), DCEInstruction(), deleteDeadInstruction(), DeleteTriviallyDeadInstructions(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), despeculateCountZeros(), doPromotion(), llvm::GVNExpression::Expression::dump(), llvm::EliminateDuplicatePHINodes(), llvm::SwitchInstProfUpdateWrapper::eraseFromParent(), llvm::InstCombiner::eraseInstFromFunction(), llvm::objcarc::EraseInstruction(), eraseInstruction(), llvm::VPlan::execute(), llvm::expandAtomicRMWToCmpXchg(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), llvm::CodeExtractor::extractCodeRegion(), findPHIToPartitionLoops(), llvm::FoldReturnIntoUncondBranch(), FoldTwoEntryPHINode(), getChainID(), getInnermostLoopFor(), getMulHu(), getOrInsertValueProfilingCall(), getReducedType(), GetRMWLibcall(), getScalarIntrinsicDeclaration(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), GlobalWasGeneratedByCompiler(), handleMemIntrinsicPtrUse(), hasSameExtUse(), hasUndefContents(), llvm::hoistAllInstructionsInto(), INITIALIZE_PASS(), llvm::InlineFunction(), insertBoundsCheck(), insertLifetimeMarkersSurroundingCall(), InsertRootInitializers(), insertValues(), isBroadcastShuffle(), isCallPromotable(), isKnownTypeIdMember(), IsNonLocalValue(), isOnlyReachableViaThisEdge(), isPromotedResultSafe(), isUnconditionalBranch(), llvm::log2(), LowerAtomicCmpXchgInst(), LowerAtomicRMWInst(), llvm::LowerDbgDeclare(), lowerExpectIntrinsic(), LowerFenceInst(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerRotate(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::makeGuardControlFlowExplicit(), mapBinOpcode(), MarkBlocksLiveIn(), llvm::MergeBasicBlockIntoOnlyPred(), mergeCleanupPad(), mergeConditionalStoreToAddress(), mergeEmptyReturnBlocks(), mergeInlinedArrayAllocas(), moveUp(), llvm::InstDeleterIRStrategy::mutate(), llvm::RandomIRBuilder::newSource(), optimizeDivRem(), OptimizeEmptyGlobalCXXDtors(), OptimizeExtractBits(), OptimizeGlobalAddressOfMalloc(), OptimizeNoopCopyExpression(), optimizeSQRT(), patchAndReplaceAllUsesWith(), performMaskedAtomicOp(), llvm::PHITransAddr::PHITranslateWithInsertion(), postDominates(), processAnd(), processAShr(), llvm::JumpThreadingPass::ProcessBlock(), llvm::JumpThreadingPass::ProcessBranchOnXOR(), processCmp(), processOverflowIntrinsic(), processPHI(), processSaturatingInst(), processSDiv(), processSelect(), processSExt(), processSRem(), processUDivOrURem(), promotedOpIsNUW(), promoteSingleBlockAlloca(), PropagateConstantReturn(), propagateMetadata(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), llvm::Attributor::registerFunctionSignatureRewrite(), llvm::safestack::StackColoring::removeAllMarkers(), llvm::removeAllNonTerminatorAndEHPadInstructions(), llvm::PHINode::removeIncomingValue(), removeLifetimeIntrinsicUsers(), llvm::BasicBlock::removePredecessor(), RemoveSwitchAfterSelectConversion(), removeUndefIntroducingPredecessor(), llvm::removeUnreachableBlocks(), llvm::removeUnwindEdge(), replaceAndRecursivelySimplifyImpl(), llvm::AMDGPULibCalls::replaceCall(), replaceConditionalBranchesOnConstant(), llvm::replaceCreatedSSACopys(), llvm::replaceDbgDeclare(), replaceFrameSize(), replaceOneDbgValueForAlloca(), replacePrepare(), ReplaceUsesOfWith(), reportMayClobberedLoad(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), rewritePHIs(), rewriteSingleStoreAlloca(), RewriteUsesOfLoadForHeapSRoA(), llvm::runIPSCCP(), runSCCP(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scaleWeights(), shouldFixMainFunction(), shouldKeepFDivF32(), shouldRotateLoopExitingLatch(), simplifyAndDCEInstruction(), simplifyCommonValuePhi(), SimplifyIndirectBrOnSelect(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), simplifySuspendPoint(), sinkAndCmp0Expression(), SinkCast(), sinkCmpExpression(), sinkLastInstruction(), speculatePHINodeLoads(), speculateSelectInstLoads(), SpeculativelyExecuteBB(), splitBeforeCatchSwitch(), llvm::fuzzerop::splitBlockDescriptor(), splitCallSite(), llvm::SplitLandingPadPredecessors(), splitMergedValStore(), StripSymbolNames(), SwitchToLookupTable(), llvm::InnerLoopVectorizer::truncateToMinimalBitwidths(), tryCSEWithPredecessor(), tryPromoteAllocaToVector(), TryToMergeLandingPad(), tryToOptimizeStoreOfMallocToGlobal(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), TurnSwitchRangeIntoICmp(), turnToExplicitForm(), TypeSizeToSizeIndex(), llvm::JumpThreadingPass::UnfoldSelectInstr(), unifyReturnBlockSet(), llvm::UnrollAndJamLoop(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), unswitchTrivialSwitch(), updateOperand(), llvm::UpgradeARCRuntime(), llvm::AMDGPULibCalls::useNative(), llvm::LoopVersioning::versionLoop(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), willNotOverflow(), and llvm::SwitchInstProfUpdateWrapper::~SwitchInstProfUpdateWrapper().
| 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 1314 of file Metadata.cpp.
References assert(), llvm::dyn_cast(), getOpcode(), and llvm::MCID::Select.
Referenced by extractPredSuccWeights(), llvm::getLoopEstimatedTripCount(), hasProfileData(), initBranchWeights(), isFormingBranchFromSelectProfitable(), and updatePredecessorProfileMetadata().
| 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 1339 of file Metadata.cpp.
References assert(), llvm::MCID::Call, llvm::dyn_cast(), llvm::MDNode::getContext(), getOpcode(), llvm::LLVMContextImpl::InstructionMetadata, llvm::LLVMContext::pImpl, and llvm::MCID::Select.
Referenced by annotateAnyAllocSite(), llvm::createDeadArgHackingPass(), llvm::ProfileSummaryInfo::getProfileCount(), GetSortedValueDataFromCallTargets(), and llvm::Attributor::registerFunctionSignatureRewrite().
Fills the AAMDNodes structure with AA metadata from this instruction.
When Merge is true, the existing AA metadata is merged with that from this instruction providing the most-general result.
Definition at line 523 of file TypeBasedAliasAnalysis.cpp.
References llvm::MDNode::getMostGenericAliasScope(), llvm::MDNode::getMostGenericTBAA(), llvm::MDNode::intersect(), llvm::AAMDNodes::NoAlias, llvm::AAMDNodes::Scope, llvm::AAMDNodes::TBAA, and llvm::AAMDNodes::TBAAStruct.
Referenced by checkFunctionMemoryAccess(), llvm::FastISel::createMachineMemOperandFor(), doPromotion(), llvm::MemoryLocation::get(), llvm::MemoryLocation::getForArgument(), llvm::MemoryLocation::getForDest(), llvm::MemoryLocation::getForSource(), getOffsetFromIndices(), getUniformBase(), isSwiftError(), mergeConditionalStoreToAddress(), llvm::promoteLoopAccessesToScalars(), reportMayClobberedLoad(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), speculatePHINodeLoads(), speculateSelectInstLoads(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::sroa::AllocaSliceRewriter::visit(), and llvm::InstCombiner::visitStoreInst().
|
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 260 of file Instruction.h.
Referenced by combineStoreToNewValue(), llvm::copyMetadataForLoad(), llvm::SlotTracker::initializeIndexIfNeeded(), maybePrintCallAddrSpace(), and wrapConstantAsMetadata().
|
inline |
This does the same thing as getAllMetadata, except that it filters out the debug location.
Definition at line 267 of file Instruction.h.
References hasMetadataOtherThanDebugLoc(), Merge, N, and setMetadata().
Referenced by llvm::combineMetadata(), copyMetadata(), llvm::createScalarizerPass(), and llvm::propagateMetadata().
Return the debug location for this node as a DebugLoc.
Definition at line 331 of file Instruction.h.
References B, hasNoSignedWrap(), hasNoUnsignedWrap(), isAssociative(), and LLVM_READONLY.
Referenced by annotateAnyAllocSite(), llvm::LoopAccessInfo::blockNeedsPredication(), canFoldIVIncExpr(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::changeToUnreachable(), ConvertShiftToMul(), copyMetadata(), llvm::CallInst::Create(), llvm::InvokeInst::Create(), llvm::CallBrInst::Create(), createAndInstr(), createCallInst(), llvm::createCallMatchingInvoke(), llvm::createDeadArgHackingPass(), createFFSIntrinsic(), createHWLoopAnalysis(), createLVAnalysis(), llvm::createScalarizerPass(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), despeculateCountZeros(), detectShiftUntilZeroIdiom(), eliminateRecursiveTailCall(), emitSignedInt64(), llvm::CodeExtractor::extractCodeRegion(), FitWeights(), FixedPointIntrinsicToOpcode(), fixupLineNumbers(), FoldCondBranchOnPHI(), llvm::formLCSSAForInstructions(), getCompareCC(), llvm::SelectionDAGBuilder::getCurDebugLoc(), getDebugLocFromInstOrOperands(), getDebugValueLoc(), llvm::VNCoercion::getLoadValueForLoad(), getMulHu(), getNegatibleInsts(), getOffsetFromIndices(), getParentPad(), GetSortedValueDataFromCallTargets(), getSubprogram(), getTypePartition(), hasSameExtUse(), hoist(), llvm::hoistAllInstructionsInto(), HoistThenElseCodeToIf(), INITIALIZE_PASS(), llvm::InlineFunction(), insertLifetimeMarkersSurroundingCall(), llvm::InstCombiner::InsertNewInstWith(), insertValues(), instrumentMaskedLoadOrStore(), llvm::IRTranslator::IRTranslator(), isBroadcastShuffle(), isOnlyReachableViaThisEdge(), isPromotedResultSafe(), isUnconditionalBranch(), mayLoopAccessLocation(), OptimizeExtractBits(), processAShr(), llvm::JumpThreadingPass::ProcessBlock(), processDbgDeclares(), llvm::DebugInfoFinder::processInstruction(), processSaturatingInst(), processSDiv(), processSExt(), processSRem(), promotedOpIsNUW(), llvm::Attributor::registerFunctionSignatureRewrite(), llvm::removeUnwindEdge(), llvm::ReplaceInstWithInst(), replaceOneDbgValueForAlloca(), reportLoadElim(), reportMayClobberedLoad(), llvm::InstCombiner::run(), runOnFunction(), llvm::IRTranslator::runOnMachineFunction(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), llvm::SDLoc::SDLoc(), llvm::FastISel::selectInstruction(), llvm::FastISel::selectOperator(), llvm::IRBuilderBase::SetInsertPoint(), shouldKeepFDivF32(), shouldRotateLoopExitingLatch(), SimplifyIndirectBrOnSelect(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), sinkAndCmp0Expression(), SinkCast(), sinkCmpExpression(), sinkLastInstruction(), SinkShiftAndTruncate(), SpeculativelyExecuteBB(), llvm::SplitBlockPredecessors(), splitCallSite(), llvm::SplitCriticalEdge(), llvm::SplitLandingPadPredecessors(), llvm::JumpThreadingPass::ThreadEdge(), TryToShrinkGlobalToBoolean(), llvm::UnrollRuntimeLoopRemainder(), updateForIncomingValueLocation(), updateOperand(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitStoreInst(), llvm::InstCombiner::visitXor(), and X86ChooseCmpImmediateOpcode().
| FastMathFlags Instruction::getFastMathFlags | ( | ) | const |
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.
Definition at line 234 of file Instruction.cpp.
References assert().
Referenced by addStackMapLiveVars(), andIRFlags(), canonicalizeSaturatedAdd(), ClearSubclassDataAfterReassociation(), copyFastMathFlags(), llvm::IRBuilder< TargetFolder >::CreateFAddFMF(), llvm::IRBuilder< TargetFolder >::CreateFDivFMF(), llvm::IRBuilder< TargetFolder >::CreateFMulFMF(), llvm::IRBuilder< TargetFolder >::CreateFNegFMF(), llvm::IRBuilder< TargetFolder >::CreateFRemFMF(), llvm::IRBuilder< TargetFolder >::CreateFSubFMF(), createPowWithIntegerExponent(), FoldTwoEntryPHINode(), getBinOpsForFactorization(), llvm::hoistRegion(), impliesEquivalanceIfFalse(), impliesEquivalanceIfTrue(), LinearizeExprTree(), llvm::matchDecomposedSelectPattern(), optimizeBinaryDoubleFP(), optimizeDoubleFP(), optimizeTrigReflections(), replaceUnaryCall(), llvm::ARMTTIImpl::shouldExpandReduction(), llvm::AArch64TTIImpl::shouldExpandReduction(), simplifyAssocCastAssoc(), llvm::SimplifyInstruction(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitFNeg(), llvm::InstCombiner::visitFPTrunc(), llvm::InstCombiner::visitFRem(), and llvm::InstCombiner::visitFSub().
Return the function this instruction belongs to.
Note: it is undefined behavior to call this on an instruction not currently inserted into a function.
Definition at line 59 of file Instruction.cpp.
References getParent(), and llvm::BasicBlock::getParent().
Referenced by addCallToCallGraph(), annotateAnyAllocSite(), canSimplifyNullLoadOrGEP(), canSimplifyNullStoreOrGEP(), canTransformToMemCmp(), llvm::Attributor::checkForAllCallSites(), checkWFRetconPrototype(), llvm::createSeparateConstOffsetFromGEPPass(), llvm::SCEVExpander::expandCodeFor(), llvm::IRPosition::getAttrs(), getFirstNonAllocaInTheEntryBlock(), getMemsetValue(), getOrInsertValueProfilingCall(), getParentPad(), llvm::coro::Shape::getRetconResultTypes(), GetRMWLibcall(), HandleByValArgument(), hasSameExtUse(), llvm::InlineFunction(), insertLifetimeMarkersSurroundingCall(), insertParsePoints(), insertSinCosCall(), llvm::Attributor::isAssumedDead(), isKnownNonNullFromDominatingCondition(), isKnownNonZeroFromAssume(), llvm::AAIsDead::isLiveInstSet(), IsNonLocalValue(), IsOperandAMemoryOperand(), llvm::AArch64TargetLowering::isProfitableToHoist(), isReportingError(), llvm::lowerObjectSizeCall(), LowerRotate(), llvm::LoopInfo::movementPreservesLCSSAForm(), llvm::mustSuppressSpeculation(), OptimizeAwayTrappingUsesOfValue(), optimizeDoubleFP(), passingValueIsAlwaysUndefined(), llvm::PointerMayBeCaptured(), removeTailCallAttribute(), replacePrepare(), llvm::Attributor::run(), SimplifyNVVMIntrinsic(), valueDominatesPHI(), llvm::CodeExtractor::verifyAssumptionCache(), llvm::misexpect::verifyMisExpect(), and llvm::InstCombiner::visitCallInst().
|
inline |
Definition at line 85 of file Instruction.h.
References getFunction(), and I.
Get the metadata of given kind attached to this Instruction.
If the metadata is not found then return null.
Definition at line 244 of file Instruction.h.
Referenced by AddAliasScopeMetadata(), llvm::LoopVersioning::annotateInstWithNoAlias(), calcArraySize(), checkBiasedBranch(), checkBiasedSelect(), llvm::misexpect::checkFrontendInstrumentation(), CloneAliasScopeMetadata(), llvm::FunctionComparator::cmpOperations(), llvm::combineMetadata(), llvm::FastISel::createMachineMemOperandFor(), llvm::createObjCARCOptPass(), llvm::DiagnosticInfoInlineAsm::DiagnosticInfoInlineAsm(), findMatchingInlineAsmOperand(), foldCtpop(), foldCttzCtlz(), llvm::getAlign(), GetBranchWeights(), llvm::DOTGraphTraits< const Function * >::getEdgeAttributes(), llvm::ConstrainedFPIntrinsic::getExceptionBehavior(), llvm::FPMathOperator::getFPAccuracy(), getFromRangeMetadata(), llvm::BasicBlock::getIrrLoopHeaderWeight(), llvm::Loop::getLoopID(), getMemSetPatternValue(), llvm::InstrInfoQuery::getMetadata(), llvm::AArch64TargetLowering::getMMOFlags(), llvm::TypeBasedAAResult::getModRefBehavior(), llvm::ScopedNoAliasAAResult::getModRefInfo(), llvm::TypeBasedAAResult::getModRefInfo(), getMulHu(), getParentPad(), llvm::ConstrainedFPCmpIntrinsic::getPredicate(), llvm::SwitchInstProfUpdateWrapper::getProfBranchWeightsMD(), GetRangeFromMetadata(), llvm::DbgVariableIntrinsic::getRawExpression(), llvm::DbgLabelInst::getRawLabel(), llvm::DbgVariableIntrinsic::getRawVariable(), llvm::ConstrainedFPIntrinsic::getRoundingMode(), getUniformBase(), getValueFromICmpCondition(), llvm::getValueProfDataFromInst(), llvm::DbgVariableIntrinsic::getVariableLocation(), handleMemIntrinsicPtrUse(), HasBranchWeights(), llvm::objcarc::BottomUpPtrState::InitBottomUp(), insertUniqueBackedgeBlock(), llvm::intersectAccessGroups(), isConstant(), isContiguous(), llvm::SITargetLowering::isMemOpHasNoClobberedMemOperand(), isSafeAndProfitableToSinkLoad(), isSwiftError(), llvm::AMDGPUInstrInfo::isUniformMMO(), isVtableAccess(), llvm::CallLowering::lowerCall(), llvm::FastISel::lowerCallTo(), llvm::SelectionDAGBuilder::lowerRangeToAssertZExt(), llvm::makeGuardControlFlowExplicit(), llvm::objcarc::TopDownPtrState::MatchWithRelease(), memOpHasNoClobbered(), moveUp(), promoteSingleBlockAlloca(), llvm::propagateMetadata(), PropagateParallelLoopAccessMetadata(), reportMayClobberedLoad(), rewriteSingleStoreAlloca(), llvm::MachinePipeliner::runOnMachineFunction(), selectSGPRVectorRegClassID(), AAValueConstantRangeImpl::setRangeMetadataIfisBetterRange(), shouldKeepFDivF32(), swapProfMetadata(), llvm::JumpThreadingPass::ThreadEdge(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), TypeSizeToSizeIndex(), UpdatePDTWorklist(), llvm::CallInst::updateProfWeight(), llvm::misexpect::verifyMisExpect(), and llvm::sroa::AllocaSliceRewriter::visit().
Get the metadata of given kind attached to this Instruction.
If the metadata is not found then return null.
Definition at line 251 of file Instruction.h.
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 55 of file Instruction.cpp.
References llvm::BasicBlock::getModule(), and getParent().
Referenced by addAssumeNonNull(), addMappingsFromTLI(), llvm::IVUsers::AddUsersImpl(), addVariantDeclaration(), annotateNonNullAndDereferenceable(), atomicSizeSupported(), llvm::AAResults::callCapturesBefore(), llvm::objcarc::CanAlterRefCount(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), canonicalizeSaturatedAdd(), llvm::objcarc::CanUse(), computeRecurrenceType(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessorsImpl(), llvm::copyMetadataForLoad(), llvm::createAArch64StackTaggingPass(), createCoroSave(), CreateGCRelocates(), createMaskInstrs(), createPowWithIntegerExponent(), llvm::DemotePHIToStack(), llvm::AMDGPULibCalls::fold(), foldCttzCtlz(), foldGuardedRotateToFunnelShift(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldToUnsignedSaturatedAdd(), foldVecTruncToExtElt(), llvm::MemoryLocation::get(), getAllocaSizeInBytes(), llvm::IRTranslator::getAnalysisUsage(), getAtomicOpAlign(), getAtomicOpSize(), GetCtorAndDtorPriority(), llvm::DemandedBits::getDemandedBits(), llvm::getGEPInductionOperand(), getIntrinsicForMaskedAtomicRMWBinOp(), getIntToFPVal(), llvm::MemoryDependenceResults::getLoadLoadClobberFullWidthSize(), llvm::LazyValueInfo::getPredicateAt(), GetRMWLibcall(), getScalarIntrinsicDeclaration(), getSignature(), getSqrtCall(), llvm::InstrProfIncrementInst::getStep(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::NVPTXTargetLowering::getTgtMemIntrinsic(), getTypePartition(), llvm::VFABI::getVectorVariantNames(), GlobalWasGeneratedByCompiler(), handleFree(), hasUndefContents(), llvm::hoistRegion(), INITIALIZE_PASS(), llvm::AMDGPULibCalls::initNativeFuncs(), insertUseHolderAfter(), llvm::LoopVectorizationCostModel::interleavedAccessCanBeWidened(), isAlwaysLive(), isCallingConvCCompatible(), llvm::isDereferenceableAndAlignedInLoop(), llvm::InductionDescriptor::isInductionPHI(), isLoadInvariantInLoop(), isOnlyReachableViaThisEdge(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), llvm::isSafeToSpeculativelyExecute(), llvm::LoopVectorizationLegality::isUniform(), isZero(), llvm::AArch64TargetLowering::isZExtFree(), llvm::LibCallSimplifier::LibCallSimplifier(), llvm::log2(), llvm::AArch64TargetLowering::lowerInterleavedLoad(), llvm::ARMTargetLowering::lowerInterleavedLoad(), llvm::AArch64TargetLowering::lowerInterleavedStore(), llvm::ARMTargetLowering::lowerInterleavedStore(), llvm::IntrinsicLowering::LowerToByteSwap(), matchRotate(), llvm::gvn::AvailableValue::MaterializeAdjustedValue(), llvm::LoopVectorizationCostModel::memoryInstructionCanBeWidened(), mightWriteIntoAllocaPtr(), moveUp(), operator<<(), optimizeBinaryDoubleFP(), optimizeDoubleFP(), performMaskedAtomicOp(), llvm::PointerMayBeCaptured(), PrintOps(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), promoteSingleBlockAlloca(), llvm::recognizeBSwapOrBitReverseIdiom(), llvm::replaceAllDbgUsesWith(), replaceAndRecursivelySimplifyImpl(), ReplaceCallWith(), replaceUnaryCall(), reportMayClobberedLoad(), rewriteSingleStoreAlloca(), llvm::HWAddressSanitizerPass::run(), llvm::salvageDebugInfoImpl(), llvm::VFABI::setVectorVariantNames(), llvm::HexagonTargetLowering::shouldExpandAtomicCmpXchgInIR(), SimplifyBSwap(), SimplifyNVVMIntrinsic(), simplifyX86vpermv(), AllocaSlices::SliceBuilder::SliceBuilder(), splitMergedValStore(), tryToRecognizePopCount(), TypeSizeToSizeIndex(), upgradeAVX512MaskToSelect(), UpgradeX86AddSubSatIntrinsics(), upgradeX86ConcatShift(), UpgradeX86MaskedShift(), upgradeX86Rotate(), UpgradeX86VPERMT2Intrinsics(), llvm::AMDGPULibCalls::useNative(), valueCoversEntireFragment(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InnerLoopVectorizer::vectorizeMemoryInstruction(), llvm::InstCombiner::visitAllocSite(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitCallInst(), and visitIVCast().
|
inline |
Definition at line 75 of file Instruction.h.
References getFunction().
| const Instruction * Instruction::getNextNonDebugInstruction | ( | ) | const |
Return a pointer to the next non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists.
Definition at line 616 of file Instruction.cpp.
References llvm::ilist_node_with_parent< Instruction, BasicBlock >::getNextNode(), and I.
Referenced by rewriteDebugUsers(), and llvm::InstCombiner::visitFenceInst().
|
inline |
Definition at line 612 of file Instruction.h.
| unsigned Instruction::getNumSuccessors | ( | ) | const |
Return the number of successors that this instruction has.
The instruction must be a terminator.
Definition at line 645 of file Instruction.cpp.
References getOpcode(), and llvm_unreachable.
Referenced by llvm::DivergenceAnalysis::addUniformOverride(), allPredecessorsComeFromSameSource(), llvm::CFGMST< Edge, BBInfo >::buildEdges(), canRenameComdat(), llvm::changeToUnreachable(), llvm::CatchReturnInst::classof(), llvm::FunctionComparator::compare(), llvm::createObjCARCOptPass(), llvm::OpenMPIRBuilder::CreateParallel(), eliminateDeadStores(), llvm::FastISel::fastEmitZExtFromI1(), FindMostPopularDest(), findUnconditionalPreds(), FoldCondBranchOnPHI(), llvm::SwitchInst::CaseIteratorImpl< CaseHandleT >::fromSuccessorIndex(), llvm::FunctionComparator::functionHash(), llvm::IRPosition::getAttrs(), GetBestDestForJumpOnUndef(), getBranchHint(), GetCaseResults(), llvm::DOTGraphTraits< const Function * >::getEdgeAttributes(), llvm::MustBeExecutedContextExplorer::getMustBeExecutedNextInstruction(), llvm::RegionTraits< Function >::getNumSuccessors(), getParentPad(), GetSortedValueDataFromCallTargets(), llvm::BranchInst::getSuccessor(), llvm::SwitchInst::getSuccessor(), llvm::CallBrInst::getSuccessor(), llvm::CatchSwitchInst::getSuccessor(), llvm::GetSuccessorNumber(), INITIALIZE_PASS(), insertLifetimeMarkersSurroundingCall(), llvm::isCriticalEdge(), llvm::CaptureTracker::isDereferenceableOrNull(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::isEdgeFeasible(), isSafeAndProfitableToSinkLoad(), isSafePHIToSpeculate(), llvm::BasicBlockEdge::isSingleEdge(), llvm::SyncDependenceAnalysis::join_blocks(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::MarkBlockExecutable(), llvm::JumpThreadingPass::MaybeMergeBasicBlockIntoOnlyPred(), mayUsePostIncMode(), partitionOuterLoopBlocks(), llvm::JumpThreadingPass::ProcessBlock(), ProcessBlock(), llvm::GVNHoist::rank(), replaceConstantExprOp(), replaceSuccessorWith(), reportMayClobberedLoad(), llvm::BranchInst::setSuccessor(), llvm::SwitchInst::setSuccessor(), llvm::CatchSwitchInst::setSuccessor(), shouldKeepInEntry(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), llvm::SplitAllCriticalEdges(), llvm::SplitCriticalEdge(), SplitCriticalSideEffectEdges(), llvm::SplitEdge(), llvm::SplitIndirectBrCriticalEdges(), llvm::JumpThreadingPass::ThreadEdge(), tryToElideArgumentCopy(), and UpdatePDTWorklist().
|
inline |
Returns a member of one of the enums like Instruction::Add.
Definition at line 125 of file Instruction.h.
Referenced by alwaysAvailable(), AreSequentialAccesses(), buildNew(), canEvaluateShifted(), canEvaluateShiftedShift(), canEvaluateShuffled(), llvm::AAResults::canInstructionRangeModRef(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), canonicalizeSaturatedAdd(), CanPHITrans(), llvm::canReplaceOperandWithVariable(), canTRE(), canVectorizeInst(), CC_MipsO32_FP64(), llvm::UnaryInstruction::classof(), llvm::OverflowingBinaryOperator::classof(), llvm::AllocaInst::classof(), llvm::PossiblyExactOperator::classof(), llvm::LoadInst::classof(), llvm::ConcreteOperator< Operator, Instruction::PtrToInt >::classof(), llvm::StoreInst::classof(), llvm::FenceInst::classof(), llvm::AtomicCmpXchgInst::classof(), llvm::AtomicRMWInst::classof(), llvm::CmpInst::classof(), llvm::GetElementPtrInst::classof(), llvm::CallBase::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::CallBrInst::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(), llvm::FreezeInst::classof(), clone(), llvm::UnaryOperator::cloneImpl(), llvm::BinaryOperator::cloneImpl(), cloneInstructionWithNewAddressSpace(), llvm::FunctionComparator::cmpOperations(), collectHomogenousInstGraphLoopInvariants(), collectInsertionElements(), collectValuesToDemote(), computeBytesPoppedByCalleeForSRet(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessorsImpl(), llvm::ConstantFoldInstOperands(), createFFSIntrinsic(), createPowWithIntegerExponent(), createRdxShuffleMask(), decomposeSimpleLinearExpr(), detectPopcountIdiom(), detectShiftUntilZeroIdiom(), determinePointerReadAttrs(), DivRemPairWorklistEntry::DivRemPairWorklistEntry(), dropPoisonGeneratingFlags(), llvm::GVNExpression::Expression::dump(), emitSignedInt64(), findDemandedEltsBySingleUser(), findIBRPredecessor(), llvm::InnerLoopVectorizer::fixupIVUsers(), foldGuardedRotateToFunnelShift(), foldOperationIntoSelectOperand(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldSignedTruncationCheck(), llvm::InstCombiner::foldVariableSignZeroExtensionOfVariableHighBitExtract(), generatePoisonChecks(), generatePoisonChecksForBinOp(), GenerateSignBits(), llvm::IRPosition::getAttrs(), llvm::AArch64TTIImpl::getCastInstrCost(), llvm::TargetTransformInfo::getCastInstrCost(), llvm::TargetTransformInfo::getCmpSelInstrCost(), getCompareCC(), getComparePred(), getExtractIndex(), getFromRangeMetadata(), llvm::getGuaranteedNonFullPoisonOp(), getHashValueImpl(), llvm::SCEVExpander::getIVIncOperand(), getLoopPhiForCounter(), llvm::TargetTransformInfo::getMemoryOpCost(), getNegatibleInsts(), llvm::CallBase::getNumSubclassExtraOperandsDynamic(), getNumSuccessors(), getOffsetFromIndices(), llvm::UnaryOperator::getOpcode(), llvm::BinaryOperator::getOpcode(), llvm::CastInst::getOpcode(), llvm::CmpInst::getOpcode(), llvm::SelectInst::getOpcode(), llvm::MemoryLocation::getOrNone(), getReducedType(), getReductionData(), getRelevantOperands(), getScalarIntrinsicDeclaration(), getShiftedValue(), getSuccessor(), llvm::DenseMapInfo< CallValue >::getTombstoneKey(), llvm::GCNTTIImpl::getUserCost(), hasAtomicLoad(), hasAtomicStore(), hasOnlyOneNonZeroIndex(), hasSameExtUse(), llvm::FastISel::hasTrivialKill(), llvm::NVPTXTTIImpl::hasVolatileVariant(), hasZeroSignBit(), haveSameSpecialState(), llvm::hoistRegion(), INITIALIZE_PASS(), llvm::InlineFunction(), InTreeUserNeedToExtract(), isAllocSiteRemovable(), isAlwaysLive(), isAssociative(), isAtomic(), isCallPromotable(), isCompatibleReplacement(), llvm::slpvectorizer::BoUpSLP::isDeleted(), isEqualImpl(), llvm::TargetLoweringBase::isExtFree(), isExtractBitsCandidateUse(), llvm::SystemZTTIImpl::isFoldableLoad(), isHighCostExpansion(), isIdenticalToWhenDefined(), isMulPowOf2(), isPotentiallyNaryReassociable(), llvm::AArch64TargetLowering::isProfitableToHoist(), isPromotedInstructionLegal(), isPromotedResultSafe(), llvm::RecurrenceDescriptor::isRecurrenceInstr(), DivRemPairWorklistEntry::isRemExpanded(), isReturnNonNull(), isSameOperationAs(), llvm::LoopVectorizationCostModel::isScalarWithPredication(), isSExtLoad(), isShuffle(), DivRemPairWorklistEntry::isSigned(), isStrideMul(), isVectorReductionOp(), llvm::AArch64TargetLowering::isZExtFree(), LinearizeExprTree(), LLVMGetInstructionOpcode(), llvm::GVN::ValueTable::lookupOrAdd(), mapBinOpcode(), matchExpandedRem(), matchVectorSplittingReduction(), llvm::gvn::AvailableValueInBlock::MaterializeAdjustedValue(), mayDivideByZero(), mayReadFromMemory(), mayWriteToMemory(), MightBeFoldableInst(), needsFP(), NegateValue(), llvm::InstCombiner::OptimizePointerDifference(), llvm::PointerMayBeCaptured(), PrintOps(), llvm::JumpThreadingPass::ProcessBlock(), promotedOpIsNSW(), promotedOpIsNUW(), llvm::propagateIRFlags(), propagateMetadata(), llvm::propagatesFullPoison(), PushDefUseChildren(), llvm::InstCombiner::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::CatchSwitchInst::removeHandler(), RemoveInstInputs(), replaceAllUsesOfWithIn(), runImpl(), llvm::FastISel::selectInstruction(), llvm::FastISel::selectPatchpoint(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), setSuccessor(), shouldMergeGEPs(), llvm::ARMTargetLowering::shouldSinkOperands(), llvm::AArch64TargetLowering::shouldSinkOperands(), ShrinkDemandedConstant(), llvm::SimplifyInstruction(), SinkShiftAndTruncate(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), ThreadBinOpOverSelect(), truncateIVUse(), tryPromoteAllocaToVector(), tryToRecognizePopCount(), llvm::VPRecipeBuilder::tryToWiden(), tryUnmergingGEPsAcrossIndirectBr(), llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visit(), llvm::SelectionDAGBuilder::visit(), llvm::Interpreter::visitAllocaInst(), llvm::InstCombiner::visitFCmpInst(), visitIVCast(), llvm::InnerLoopVectorizer::widenInstruction(), X86ChooseCmpImmediateOpcode(), and llvm::reassociate::XorOpnd::XorOpnd().
Definition at line 127 of file Instruction.h.
References getOpcode(), and getOpcodeName().
Referenced by llvm::VPRecipeBuilder::createReplicateRegion(), getOpcodeName(), llvm::ConstantExpr::getOpcodeName(), maybePrintCallAddrSpace(), llvm::VPInstruction::print(), and PrintOps().
Definition at line 292 of file Instruction.cpp.
References llvm::MCID::Add, llvm::SPII::Load, llvm::MipsISD::Ret, llvm::MCID::Select, and llvm::SPII::Store.
|
inline |
Definition at line 66 of file Instruction.h.
Referenced by llvm::InstCombineWorklist::Add(), llvm::GVN::ValueTable::add(), addBoundsChecking(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::DivergenceAnalysis::addUniformOverride(), llvm::IVUsers::AddUsersImpl(), allPredecessorsComeFromSameSource(), allSameBlock(), AllUsesDominatedByBlock(), alwaysAvailable(), llvm::InterleavedAccessInfo::analyzeInterleaving(), annotateAnyAllocSite(), llvm::PredicatedScalarEvolution::areAddRecsEqualWithPreds(), AreEquivalentPhiNodes(), areInnerLoopExitPHIsSupported(), areOuterLoopExitPHIsSupported(), AreSequentialAccesses(), BlockIsSimpleEnoughToThreadThrough(), llvm::LoopAccessInfo::blockNeedsPredication(), BrPHIToSelect(), llvm::SwitchCG::SwitchLowering::buildBitTests(), BuildConstantFromSCEV(), llvm::SwitchCG::SwitchLowering::buildJumpTable(), llvm::SwitchInstProfUpdateWrapper::buildProfBranchWeightsMD(), calcArraySize(), llvm::calculateClrEHStateNumbers(), calculateCXXStateNumbers(), calculateIterationsToInvariance(), calculateSEHStateNumbers(), calculateUnswitchCostMultiplier(), canConstantEvolve(), llvm::canConstantFoldCallTo(), canFoldIVIncExpr(), llvm::AAResults::canInstructionRangeModRef(), canonicalizeSaturatedAdd(), canSinkInstructions(), canSplitCallSite(), canSplitPredecessors(), CC_MipsO32_FP64(), llvm::MemorySSAUpdater::changeCondBranchToUnconditionalTo(), llvm::changeToCall(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::MemorySSAUpdater::changeToUnreachable(), llvm::changeToUnreachable(), checkHoistValue(), llvm::InnerLoopVectorizer::clearReductionWrapFlags(), llvm::CloneAndPruneIntoFromInst(), CloneInstructionInExitBlock(), CloneLoop(), llvm::CodeMetrics::collectEphemeralValues(), llvm::LoopVectorizationCostModel::collectInstsToScalarize(), combineADDToADDZE(), computeKnownBitsFromAssume(), ComputePostOrders(), llvm::IndexedReference::computeRefCost(), llvm::JumpThreadingPass::ComputeValueKnownInPredecessorsImpl(), ConstructSSAForLoadSet(), llvm::ConvertDebugDeclareToDebugValue(), ConvertToSInt(), llvm::createAArch64StackTaggingPass(), llvm::createArgumentPromotionPass(), llvm::createBlockExtractorPass(), createCallInst(), llvm::createCodeGenPreparePass(), llvm::createConstantHoistingPass(), llvm::createControlHeightReductionLegacyPass(), llvm::createDwarfEHPass(), createFree(), CreateGCRelocates(), createHWLoopAnalysis(), createLVAnalysis(), createMalloc(), createMaskInstrs(), llvm::createMemCpyLoopKnownSize(), llvm::createMemCpyLoopUnknownSize(), createMemMoveLoop(), llvm::MemorySSAUpdater::createMemoryAccessAfter(), llvm::MemorySSAUpdater::createMemoryAccessBefore(), createMemSetLoop(), llvm::createObjCARCOptPass(), llvm::OpenMPIRBuilder::CreateParallel(), createRdxShuffleMask(), llvm::VPRecipeBuilder::createReplicateRegion(), createRetPHINode(), llvm::createScalarizerPass(), llvm::createSeparateConstOffsetFromGEPPass(), createUnreachableSwitchDefault(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), despeculateCountZeros(), llvm::OrderedInstructions::dfsBefore(), llvm::ICFLoopSafetyInfo::doesNotWriteMemoryBefore(), llvm::PostDominatorTree::dominates(), llvm::OrderedInstructions::dominates(), llvm::OrderedBasicBlock::dominates(), llvm::DominatorTree::dominates(), llvm::InstCombiner::dominatesAllUses(), DominatesMergePoint(), llvm::GVNExpression::Expression::dump(), eliminateRecursiveTailCall(), enableCallSafepoints(), llvm::LazyValueInfo::enableDT(), eraseFromParent(), llvm::VPPredInstPHIRecipe::execute(), llvm::SCEVExpander::expandCodeFor(), llvm::AlignmentFromAssumptionsPass::extractAlignmentInfo(), FindAllMemoryUses(), findBasePointer(), llvm::findDevirtualizableCallsForTypeTest(), findInitTrampolineFromBB(), llvm::SwitchCG::SwitchLowering::findJumpTables(), findLiveSetAtInst(), findRetainForStoreStrongContraction(), findSafeStoreForStoreStrongContraction(), findTRECandidate(), findUnwindDestinations(), first_use_of_in_block(), FitWeights(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), llvm::InnerLoopVectorizer::fixNonInductionPHIs(), llvm::AMDGPULibCalls::fold(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnPHI(), foldGuardedRotateToFunnelShift(), foldICmpBitCast(), foldICmpWithDominatingICmp(), foldOperationIntoPhiValue(), foldReturnAndProcessPred(), FoldTwoEntryPHINode(), forceIndeterminateEdge(), llvm::formLCSSAForInstructions(), ForwardSwitchConditionToPHI(), llvm::IRTranslator::getAnalysisUsage(), llvm::IRPosition::getAttrs(), llvm::ScalarEvolution::getBlockDisposition(), getBlockName(), getBranchInsertPoint(), llvm::InnerLoopVectorizer::getBroadcastInstrs(), llvm::CallBase::getCaller(), GetCaseResults(), llvm::SystemZTTIImpl::getCmpSelInstrCost(), getCommonReturnValue(), getCompareCC(), getComparePred(), getConstantAt(), getConstantPart(), llvm::MemoryDependenceResults::getDependency(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getEstimatedNumberOfCaseClusters(), getFirstInst(), getFromRangeMetadata(), getFunction(), getIdentityValueForAtomicOp(), getInsertPointForUses(), llvm::MemoryDependenceResults::getInvariantGroupPointerDependency(), getJumpThreadDuplicationCost(), llvm::MemoryDependenceResults::getLoadLoadClobberFullWidthSize(), llvm::VNCoercion::getLoadValueForLoad(), getLoopPhiForCounter(), llvm::ARMTTIImpl::getMemcpyCost(), getModule(), llvm::MustBeExecutedContextExplorer::getMustBeExecutedNextInstruction(), getNegatibleInsts(), llvm::MemoryDependenceResults::getNonLocalCallDependency(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), getOffsetFromIndices(), getOtherIncomingValue(), getParameterABIAttributes(), getParentPad(), GetPointerOperand(), getPointerOperands(), llvm::LazyValueInfo::getPredicateAt(), llvm::ProfileSummaryInfo::getProfileCount(), getRangeForAffineARHelper(), getReductionValue(), getRetComponentType(), getScalarIntrinsicDeclaration(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), getSubprogram(), llvm::HexagonTargetLowering::getTgtMemIntrinsic(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), getVarName(), handleFree(), HandleInlinedEHPad(), HandleInlinedLandingPad(), handlePhiDef(), hasCallsBetween(), hasProfileData(), HasSafePathToPredecessorCall(), hasSameExtUse(), llvm::FastISel::hasTrivialKill(), hasUndefContents(), llvm::SCEVExpander::hoistIVInc(), llvm::hoistRegion(), HoistThenElseCodeToIf(), hoistValue(), InBlock(), INITIALIZE_PASS(), llvm::InlineFunction(), llvm::DivergenceAnalysis::inRegion(), insertAfter(), insertBefore(), insertCall(), llvm::DIBuilder::insertDbgValueIntrinsic(), llvm::DIBuilder::insertDeclare(), llvm::DIBuilder::insertLabel(), insertLifetimeMarkersSurroundingCall(), llvm::InstCombiner::InsertNewInstBefore(), insertSpills(), Instruction(), llvm::LoopVectorizationCostModel::interleavedAccessCanBeWidened(), inversePermutation(), IsAcceptableTarget(), llvm::isAllocaPromotable(), llvm::Loop::isAuxiliaryInductionVariable(), isBlockInLCSSAForm(), isBroadcastShuffle(), isCallPromotable(), isChainSelectCmpBranch(), isColdCallSite(), llvm::isControlFlowEquivalent(), llvm::isCriticalEdge(), llvm::CaptureTracker::isDereferenceableOrNull(), llvm::DivergenceAnalysis::isDivergentUse(), isDynamicConstant(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::isEdgeFeasible(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), llvm::InductionDescriptor::isFPInductionPHI(), isFreeInLoop(), llvm::SimpleLoopSafetyInfo::isGuaranteedToExecute(), llvm::ICFLoopSafetyInfo::isGuaranteedToExecute(), llvm::isGuaranteedToExecuteForEveryIteration(), isIndirectBrTarget(), llvm::isInTailCallPosition(), isIntegerLoopHeaderPHI(), isInteresting(), isKnownNonNullFromDominatingCondition(), isKnownTypeIdMember(), isLoadConditional(), isLoadInvariantInLoop(), isLoadOrStore(), isLocalAlloca(), isLoopCounter(), llvm::ScalarEvolution::isLoopEntryGuardedByCond(), IsNonLocalValue(), isOnlyReachableViaThisEdge(), isOrdered(), isPointerValueDeadOnEntryToFunction(), llvm::isPotentiallyReachable(), llvm::InstructionPrecedenceTracking::isPreceededBySpecialInstruction(), llvm::LoopVectorizationCostModel::isPredicatedInst(), isPredicatedOnPHI(), isProfitableForVectorization(), isPromotedResultSafe(), llvm::DominatorTree::isReachableFromEntry(), isReportingError(), isSafeAndProfitableToSinkLoad(), isSafePHIToSpeculate(), isSafeToExecuteUnconditionally(), llvm::isSafeToExpandAt(), llvm::isSafeToLoadUnconditionally(), isSafeToSpeculatePHIUsers(), llvm::isSafeToUnrollAndJam(), isSameUnderlyingObjectInLoop(), llvm::LoopVectorizationCostModel::isScalarWithPredication(), llvm::AllocaInst::isStaticAlloca(), llvm::TargetLoweringBase::isSuitableForJumpTable(), isSupportedGuardInstruction(), isUnconditionalBranch(), llvm::AMDGPULibCalls::isUnsafeMath(), isUsedOutsideOfBlock(), isUsedOutsideOfDefiningBlock(), llvm::isValidAssumeForContext(), isValidCandidateForColdCC(), isZero(), IVUseShouldUsePostIncValue(), LdStHasDebugValue(), LLVMGetNextInstruction(), LLVMGetPreviousInstruction(), LLVMPositionBuilderBefore(), llvm::log2(), llvm::SelectionDAGBuilder::LowerAsSTATEPOINT(), llvm::SelectionDAGBuilder::LowerCallSiteWithDeoptBundle(), llvm::SelectionDAGBuilder::LowerCallTo(), llvm::SelectionDAGBuilder::LowerStatepoint(), lowerStatepointMetaArgs(), makeBitReverse(), llvm::makeGuardControlFlowExplicit(), llvm::AMDGPUSubtarget::makeLIDRangeMetadata(), llvm::Loop::makeLoopInvariant(), MarkBlocksLiveIn(), matchUAddWithOverflowConstantEdgeCases(), llvm::SITargetLowering::mayBeEmittedAsTailCall(), mayUsePostIncMode(), memoryIsNotModifiedBetween(), MergeAliasResults(), mergeCleanupPad(), mergeConditionalStores(), mergeConditionalStoreToAddress(), mergeInlinedArrayAllocas(), moveAfter(), moveBBContents(), moveBefore(), moveHeaderPhiOperandsToForeBlocks(), moveInstructionBefore(), llvm::LoopInfo::movementPreservesLCSSAForm(), moveUp(), llvm::InstDeleterIRStrategy::mutate(), needsRuntimeRegistrationOfSectionRange(), NegateValue(), okayForPHIOfOps(), operator<<(), OptimizeExtractBits(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), OptimizeNoopCopyExpression(), llvm::OrderedBasicBlock::OrderedBasicBlock(), passingValueIsAlwaysUndefined(), patchAndReplaceAllUsesWith(), performMaskedAtomicOp(), llvm::GVN::ValueTable::phiTranslate(), llvm::PointerMayBeCapturedBefore(), postDominates(), llvm::LegacyDivergenceAnalysis::print(), llvm::Value::print(), processAnd(), processBinOp(), llvm::JumpThreadingPass::ProcessBlock(), llvm::JumpThreadingPass::ProcessBranchOnPHI(), llvm::JumpThreadingPass::ProcessBranchOnXOR(), processCmp(), processHeaderPhiOperands(), processMemAccess(), processPHI(), processSelect(), processUDivOrURem(), processUGT_ADDCST_ADD(), llvm::programUndefinedIfFullPoison(), llvm::promoteLoopAccessesToScalars(), promoteSingleBlockAlloca(), propagateMetadata(), PushLoopPHIs(), llvm::GVNHoist::rank(), ReduceSwitchRange(), llvm::AssumptionCache::registerAssumption(), removeEmptyCleanup(), removeFromParent(), RemoveInstInputs(), llvm::InstructionPrecedenceTracking::removeInstruction(), RemoveSwitchAfterSelectConversion(), removeTriviallyEmptyRange(), replaceAndRecursivelySimplifyImpl(), ReplaceCallWith(), replaceConditionalBranchesOnConstant(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::InstCombiner::replacedSelectWithOperand(), replaceExtractElements(), llvm::ReplaceInstWithInst(), llvm::LoopInfo::replacementPreservesLCSSAForm(), llvm::replaceNonLocalUsesWith(), ReplaceUsesOfWith(), reportLoadElim(), reportMayClobberedLoad(), returnEdge(), reuseTableCompare(), llvm::GCNTTIImpl::rewriteIntrinsicWithAddressSpace(), rewriteSingleStoreAlloca(), llvm::SSAUpdater::RewriteUse(), llvm::SSAUpdater::RewriteUseAfterInsertions(), RewriteUsesOfClonedInstructions(), llvm::SyntheticCountsPropagation::run(), llvm::InstCombiner::run(), llvm::SLPVectorizerPass::runImpl(), safeCxtI(), SafeToMergeTerminators(), scalarizeMaskedCompressStore(), scalarizeMaskedExpandLoad(), scalarizeMaskedGather(), scalarizeMaskedLoad(), scalarizeMaskedScatter(), scalarizeMaskedStore(), scaleCaseProbality(), scanPHIsAndUpdateValueMap(), llvm::FastISel::selectInstruction(), setBranchWeights(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), llvm::IRBuilderBase::SetInsertPoint(), llvm::setProfMetadata(), llvm::AArch64TTIImpl::shouldConsiderAddressTypePromotion(), shouldConvert(), shouldKeepFDivF32(), shouldSplitOnPHIPredicatedArgument(), shouldSplitOnPredicatedArgument(), ShrinkDemandedConstant(), simplifyCommonValuePhi(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), llvm::InstCombiner::simplifyDivRemOfSelectWithZeroOp(), SimplifyIndirectBrOnSelect(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), simplifyRelocatesOffABase(), simplifySuspendPoint(), simplifyTerminatorLeadingToRet(), llvm::simplifyUsersOfIV(), sink(), sinkAndCmp0Expression(), SinkCast(), sinkCmpExpression(), SinkInstruction(), sinkInstruction(), sinkLastInstruction(), llvm::sinkRegion(), llvm::InnerLoopVectorizer::sinkScalarOperands(), SinkShiftAndTruncate(), sinkThroughTriviallyReplaceablePHI(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), SpeculativelyExecuteBB(), splitBeforeCatchSwitch(), splitBlockIfNotFirst(), splitCallSite(), llvm::SplitCriticalEdge(), splitMergedValStore(), splitPredecessorsOfLoopExit(), supportedAddressingMode(), SwitchToLookupTable(), truncateIVUse(), llvm::VPRecipeBuilder::tryToBlend(), llvm::FastISel::tryToFoldLoad(), TryToMergeLandingPad(), tryToMoveFreeBeforeNullTest(), TryToSinkInstruction(), llvm::JumpThreadingPass::TryToUnfoldSelect(), llvm::JumpThreadingPass::TryToUnfoldSelectInCurrBB(), tryToVectorizeHorReductionOrInstOperands(), llvm::VPRecipeBuilder::tryToWidenMemory(), tryUnmergingGEPsAcrossIndirectBr(), tryWidenCondBranchToCondBranch(), turnGuardIntoBranch(), TurnSwitchRangeIntoICmp(), turnToExplicitForm(), TypeSizeToSizeIndex(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), unswitchTrivialSwitch(), updateOperand(), updatePredecessorProfileMetadata(), llvm::CallInst::updateProfWeight(), llvm::SelectionDAGBuilder::UpdateSplitBlock(), llvm::JumpThreadingPass::UpdateSSA(), updateSuccessor(), llvm::UpgradeARCRuntime(), llvm::UpgradeIntrinsicCall(), useFuncSeen(), valueDominatesPHI(), llvm::SelectionDAGBuilder::visit(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitAllocaInst(), llvm::Interpreter::visitCallSite(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitGetElementPtrInst(), visitIVCast(), llvm::InstCombiner::visitLandingPadInst(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitStoreInst(), llvm::InnerLoopVectorizer::widenPHIInstruction(), willNotOverflow(), and X86ChooseCmpImmediateOpcode().
|
inline |
Definition at line 67 of file Instruction.h.
| const Instruction * Instruction::getPrevNonDebugInstruction | ( | ) | const |
Return a pointer to the previous non-debug instruction in the same basic block as 'this', or nullptr if no such instruction exists.
Definition at line 623 of file Instruction.cpp.
References llvm::ilist_node_with_parent< Instruction, BasicBlock >::getPrevNode(), and I.
|
inline |
Definition at line 620 of file Instruction.h.
|
inlineprotected |
Definition at line 769 of file Instruction.h.
Referenced by llvm::CallBrInst::Create(), llvm::LoadInst::getAlign(), llvm::StoreInst::getAlign(), llvm::AllocaInst::getAlignment(), llvm::AtomicCmpXchgInst::getFailureOrdering(), llvm::AtomicRMWInst::getOperation(), llvm::LoadInst::getOrdering(), llvm::StoreInst::getOrdering(), llvm::FenceInst::getOrdering(), llvm::AtomicRMWInst::getOrdering(), 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::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().
| BasicBlock * Instruction::getSuccessor | ( | unsigned | Idx | ) | const |
Return the specified successor. This instruction must be a terminator.
Definition at line 657 of file Instruction.cpp.
References getOpcode(), and llvm_unreachable.
Referenced by allPredecessorsComeFromSameSource(), llvm::CFGMST< Edge, BBInfo >::buildEdges(), canSinkInstructions(), llvm::ReturnInst::classof(), llvm::ResumeInst::classof(), llvm::CatchReturnInst::classof(), llvm::CleanupReturnInst::classof(), llvm::UnreachableInst::classof(), llvm::FunctionComparator::compare(), llvm::OpenMPIRBuilder::CreateParallel(), llvm::FastISel::fastEmitZExtFromI1(), FindMostPopularDest(), FoldCondBranchOnPHI(), llvm::FunctionComparator::functionHash(), llvm::IRPosition::getAttrs(), GetBestDestForJumpOnUndef(), getBranchHint(), GetCaseResults(), llvm::IndirectBrInst::getDestination(), llvm::MustBeExecutedContextExplorer::getMustBeExecutedNextInstruction(), getOnlyLiveSuccessor(), GetSortedValueDataFromCallTargets(), llvm::GetSuccessorNumber(), INITIALIZE_PASS(), insertLifetimeMarkersSurroundingCall(), instrumentMaskedLoadOrStore(), llvm::isCriticalEdge(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::isEdgeFeasible(), llvm::BasicBlockEdge::isSingleEdge(), llvm::makeGuardControlFlowExplicit(), partitionOuterLoopBlocks(), llvm::JumpThreadingPass::ProcessBlock(), llvm::InstCombiner::replacedSelectWithOperand(), replaceSuccessorWith(), shouldKeepInEntry(), shouldRotateLoopExitingLatch(), SimplifyIndirectBrOnSelect(), SpeculativelyExecuteBB(), llvm::SplitCriticalEdge(), llvm::SplitEdge(), llvm::JumpThreadingPass::ThreadEdge(), tryToElideArgumentCopy(), llvm::MemorySSAUpdater::updateForClonedBlockIntoPred(), UpdatePDTWorklist(), and llvm::InstCombiner::visitStoreInst().
| bool Instruction::hasAllowContract | ( | ) | const |
Determine whether the allow-contract flag is set.
Definition at line 224 of file Instruction.cpp.
References assert().
| bool Instruction::hasAllowReassoc | ( | ) | const |
Determine whether the allow-reassociation flag is set.
Definition at line 199 of file Instruction.cpp.
References assert().
Referenced by factorizeFAddFSub(), foldFDivConstantDividend(), getSqrtCall(), isAssociative(), llvm::RecurrenceDescriptor::isRecurrenceInstr(), simplifyUnaryIntrinsic(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), and llvm::InstCombiner::visitFSub().
| bool Instruction::hasAllowReciprocal | ( | ) | const |
Determine whether the allow-reciprocal flag is set.
Definition at line 219 of file Instruction.cpp.
References assert().
Referenced by foldFDivConstantDividend(), foldFDivConstantDivisor(), llvm::hoistRegion(), and llvm::InstCombiner::visitFDiv().
| bool Instruction::hasApproxFunc | ( | ) | const |
Determine whether the approximate-math-functions flag is set.
Definition at line 229 of file Instruction.cpp.
References assert().
Referenced by createPowWithIntegerExponent(), getIntToFPVal(), and getSqrtCall().
| bool Instruction::hasAtomicLoad | ( | ) | const |
Return true if this atomic instruction loads from memory.
Definition at line 569 of file Instruction.cpp.
References assert(), getOpcode(), isAtomic(), and llvm::SPII::Load.
Referenced by llvm::PPCTargetLowering::emitTrailingFence().
| bool Instruction::hasAtomicStore | ( | ) | const |
Return true if this atomic instruction stores to memory.
Definition at line 581 of file Instruction.cpp.
References assert(), getOpcode(), isAtomic(), and llvm::SPII::Store.
Referenced by llvm::ARMTargetLowering::emitLeadingFence(), and llvm::TargetLoweringBase::emitLeadingFence().
|
inline |
Return true if this instruction has any metadata attached to it.
Definition at line 224 of file Instruction.h.
Referenced by copyMetadata(), llvm::FastISel::createMachineMemOperandFor(), llvm::MemoryDependenceResults::getInvariantGroupPointerDependency(), llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), getUniformBase(), GlobalWasGeneratedByCompiler(), isUseTriviallyOptimizableToLiveOnEntry(), propagateMetadata(), llvm::HWAddressSanitizerPass::run(), and llvm::SelectionDAGBuilder::ShouldEmitAsBranches().
Return true if this instruction has the given type of metadata attached.
Definition at line 233 of file Instruction.h.
Return true if this instruction has the given type of metadata attached.
Definition at line 238 of file Instruction.h.
|
inline |
Return true if this instruction has metadata attached to it other than a debug location.
Definition at line 228 of file Instruction.h.
Referenced by emitSignedInt64(), and hoist().
| bool Instruction::hasNoInfs | ( | ) | const |
Determine whether the no-infs flag is set.
Definition at line 209 of file Instruction.cpp.
References assert().
Referenced by foldFCmpReciprocalAndZero(), getIntToFPVal(), getSqrtCall(), and llvm::InstCombiner::visitFDiv().
| bool Instruction::hasNoNaNs | ( | ) | const |
Determine whether the no-NaNs flag is set.
Definition at line 204 of file Instruction.cpp.
References assert().
Referenced by foldFabsWithFcmpZero(), getIntToFPVal(), llvm::InstCombiner::visitFDiv(), and llvm::InstCombiner::visitFMul().
| bool Instruction::hasNoSignedWrap | ( | ) | const |
Determine whether the no signed wrap flag is set.
Definition at line 116 of file Instruction.cpp.
Referenced by andIRFlags(), buildNew(), llvm::createSeparateConstOffsetFromGEPPass(), foldICmpBitCast(), foldICmpShlOne(), foldNoWrapAdd(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), generatePoisonChecksForBinOp(), getBinOpsForFactorization(), GetLoopInvariantInsertPosition(), getRangeForAffineARHelper(), isPromotedInstructionLegal(), processBinOp(), processUGT_ADDCST_ADD(), llvm::InstCombiner::reassociateShiftAmtsOfTwoSameDirectionShifts(), replaceAllUsesOfWithIn(), setLimitsForBinOp(), shouldMergeGEPs(), ShrinkDemandedConstant(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitSub().
| 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 factorizeFAddFSub(), foldSelectBinOpIdentity(), getSqrtCall(), isAssociative(), mapBinOpcode(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitFNeg(), and llvm::InstCombiner::visitFSub().
| bool Instruction::hasNoUnsignedWrap | ( | ) | const |
Determine whether the no unsigned wrap flag is set.
Definition at line 112 of file Instruction.cpp.
Referenced by andIRFlags(), buildNew(), canonicalizeLowbitMask(), llvm::createSeparateConstOffsetFromGEPPass(), foldICmpShlOne(), foldNoWrapAdd(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), generatePoisonChecksForBinOp(), getBinOpsForFactorization(), GetLoopInvariantInsertPosition(), getRangeForAffineARHelper(), isPromotedInstructionLegal(), processBinOp(), promotedOpIsNSW(), promotedOpIsNUW(), llvm::InstCombiner::reassociateShiftAmtsOfTwoSameDirectionShifts(), replaceAllUsesOfWithIn(), ShrinkDemandedConstant(), simplifyValueKnownNonZero(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), and llvm::InstCombiner::visitSub().
| void Instruction::insertAfter | ( | Instruction * | InsertPos | ) |
Insert an unlinked instruction into a basic block immediately after the specified instruction.
Definition at line 79 of file Instruction.cpp.
References llvm::BasicBlock::getInstList(), llvm::ilist_node_impl< OptionsT >::getIterator(), getParent(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::insertAfter().
Referenced by addAssumeNonNull(), llvm::ConvertDebugDeclareToDebugValue(), GetPointerOperand(), getStartOrEndSlot(), insertRelocationStores(), insertRematerializationStores(), InsertRootInitializers(), makeBitReverse(), MarkBlocksLiveIn(), operator<<(), optimizeDivRem(), relocationViaAlloca(), and replaceExtractElements().
| void Instruction::insertBefore | ( | Instruction * | InsertPos | ) |
Insert an unlinked instruction into a basic block immediately before the specified instruction.
Definition at line 73 of file Instruction.cpp.
References llvm::BasicBlock::getInstList(), llvm::ilist_node_impl< OptionsT >::getIterator(), getParent(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::insert().
Referenced by llvm::changeToCall(), Cleanup(), cloneInstForMustTail(), llvm::createAMDGPUPrintfRuntimeBinding(), llvm::createObjCARCOptPass(), llvm::createSeparateConstOffsetFromGEPPass(), llvm::DuplicateInstructionsInSplitBetween(), INITIALIZE_PASS(), insertLifetimeMarkersSurroundingCall(), isOnlyReachableViaThisEdge(), isProfitableForVectorization(), makeAllConstantUsesInstructions(), makeBitReverse(), moveLCSSAPhis(), operator<<(), propagateMetadata(), relocationViaAlloca(), rematerializeLiveValues(), replaceGEPIdxWithZero(), rewriteMaterializableInstructions(), scaleWeights(), shouldRotateLoopExitingLatch(), splitCallSite(), llvm::JumpThreadingPass::ThreadGuard(), and llvm::InstCombiner::visitUDiv().
|
inline |
Return true if this is an arithmetic shift right.
Definition at line 170 of file Instruction.h.
References getOpcode().
Referenced by processUGT_ADDCST_ADD().
| 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 630 of file Instruction.cpp.
References getOpcode(), hasAllowReassoc(), and hasNoSignedZeros().
Referenced by canTransformAccumulatorRecursion(), llvm::ConstantFoldBinaryInstruction(), createRdxShuffleMask(), getNegatibleInsts(), isIgnorableInst(), LinearizeExprTree(), simplifyAssocCastAssoc(), and SimplifyAssociativeBinOp().
Definition at line 486 of file Instruction.h.
References llvm::MCID::Add.
| bool Instruction::isAtomic | ( | ) | const |
Return true if this instruction has an AtomicOrdering of unordered or higher.
Definition at line 554 of file Instruction.cpp.
References getOpcode(), llvm::SPII::Load, llvm::NotAtomic, and llvm::SPII::Store.
Referenced by alwaysAvailable(), atomicSizeSupported(), llvm::InstCombiner::combineLoadToNewType(), combineLoadToOperationType(), combineStoreToNewValue(), combineStoreToValueType(), llvm::FindAvailableLoadedValue(), llvm::IRPosition::getAttrs(), getMemSetPatternValue(), hasAtomicLoad(), hasAtomicStore(), isContiguous(), isSafeAndProfitableToSinkLoad(), llvm::LoadInst::isSimple(), llvm::StoreInst::isSimple(), llvm::AllocaInst::isStaticAlloca(), llvm::TargetLowering::lowerAtomicLoadAsLoadSDNode(), llvm::TargetLowering::lowerAtomicStoreAsStoreSDNode(), reportMayClobberedLoad(), llvm::LoadInst::setAlignment(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), TypeSizeToSizeIndex(), and llvm::sroa::AllocaSliceRewriter::visit().
|
inline |
Definition at line 130 of file Instruction.h.
References getOpcode(), and isBinaryOp().
Referenced by alwaysAvailable(), llvm::ConstantRange::binaryOp(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), llvm::BinaryOperator::classof(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldBinaryOpOperands(), llvm::ConstantFoldLoadFromConstPtr(), llvm::IRBuilder< TargetFolder >::CreateNAryOp(), foldOperationIntoSelectOperand(), llvm::ConstantExpr::get(), llvm::ConstantExpr::getBinOpIdentity(), hasUsesOutsideLoop(), INITIALIZE_PASS(), isBinaryOp(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), llvm::ConstantRange::makeGuaranteedNoWrapRegion(), llvm::VPRecipeBase::moveAfter(), and llvm::ConstantRange::overflowingBinaryOp().
Definition at line 151 of file Instruction.h.
Determine if the Opcode is and/or/xor.
Definition at line 175 of file Instruction.h.
Referenced by foldBitCastBitwiseLogic(), foldLogicCastConstant(), simplifyAssocCastAssoc(), and SimplifyBSwap().
|
inline |
Return true if this is and/or/xor.
Definition at line 180 of file Instruction.h.
References getOpcode().
Referenced by llvm::PatternMatch::is_bitwiselogic_op::isOpType(), and rightDistributesOverLeft().
|
inline |
Definition at line 133 of file Instruction.h.
References getOpcode(), and isCast().
Referenced by llvm::slpvectorizer::BoUpSLP::canMapToVector(), llvm::CastInst::classof(), llvm::ConstantFoldCastOperand(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantExprKeyType::create(), llvm::createConstantHoistingPass(), emitSignedInt64(), findArgumentCopyElisionCandidates(), foldConstantCastPair(), llvm::ConstantExpr::getCast(), INITIALIZE_PASS(), isCast(), llvm::ConstantExpr::isCast(), isZero(), and updateOperand().
Determine if the OpCode is one of the CastInst instructions.
Definition at line 185 of file Instruction.h.
|
inline |
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.
Definition at line 498 of file Instruction.h.
References getOpcode(), and isCommutative().
Referenced by alwaysAvailable(), areCommutative(), canTransformAccumulatorRecursion(), llvm::InstCombiner::computeOverflow(), llvm::ConstantFoldBinaryInstruction(), ExpandBinOp(), foldOrCommuteConstant(), foldSelectBinOpIdentity(), llvm::ConstantExpr::getBinOpIdentity(), getBinOpsForFactorization(), llvm::RISCVTTIImpl::getIntImmCostInst(), getNegatibleInsts(), isCommutative(), isCommutative(), isIgnorableInst(), isReassociableOp(), LinearizeExprTree(), llvm::gvn::AvailableValueInBlock::MaterializeAdjustedValue(), rightDistributesOverLeft(), shouldMergeGEPs(), simplifyAssocCastAssoc(), SimplifyAssociativeBinOp(), llvm::BinaryOperator::swapOperands(), and ThreadBinOpOverSelect().
Definition at line 499 of file Instruction.h.
References llvm::MCID::Add.
|
inline |
Return true if the instruction is a variety of EH-block.
Definition at line 593 of file Instruction.h.
References getOpcode().
Referenced by canFoldIVIncExpr(), canSinkInstructions(), llvm::BasicBlock::canSplitPredecessors(), canSplitPredecessors(), CloneInstructionInExitBlock(), llvm::createConstantHoistingPass(), llvm::GVNExpression::Expression::dump(), ehAwareSplitEdge(), getEHPadFromPredecessor(), getParentPad(), HandleInlinedEHPad(), llvm::InlineFunction(), llvm::insertDebugValuesForPHIs(), isAlwaysLive(), llvm::BasicBlock::isEHPad(), isFoldedOrDeadInstruction(), isPromotedInstructionLegal(), isSafeToMove(), isUnconditionalBranch(), makeBitReverse(), llvm::Loop::makeLoopInvariant(), llvm::removeAllNonTerminatorAndEHPadInstructions(), replaceAndRecursivelySimplifyImpl(), SinkCast(), llvm::SplitIndirectBrCriticalEdges(), TryToSinkInstruction(), and llvm::wouldInstructionBeTriviallyDead().
| bool Instruction::isExact | ( | ) | const |
Determine whether the exact flag is set.
Definition at line 145 of file Instruction.cpp.
Referenced by andIRFlags(), buildNew(), llvm::InstCombiner::commonIDivTransforms(), foldICmpShlOne(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), foldUDivPow2Cst(), foldUDivShl(), generatePoisonChecksForBinOp(), GetLoopInvariantInsertPosition(), processAShr(), processSDiv(), processUDivOrURem(), llvm::InstCombiner::reassociateShiftAmtsOfTwoSameDirectionShifts(), simplifyValueKnownNonZero(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitLShr(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitSDiv(), and llvm::InstCombiner::visitUDiv().
|
inline |
Definition at line 135 of file Instruction.h.
References getOpcode().
Referenced by GetCaseResults(), IsAcceptableTarget(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::MarkBlockExecutable(), llvm::JumpThreadingPass::MaybeMergeBasicBlockIntoOnlyPred(), and llvm::MergeBlockIntoPredecessor().
Returns true if the OpCode is a terminator related to exception handling.
Definition at line 195 of file Instruction.h.
| bool Instruction::isFast | ( | ) | const |
Determine whether all fast-math-flags are set.
Definition at line 194 of file Instruction.cpp.
References assert().
Referenced by createPowWithIntegerExponent(), getIntToFPVal(), getNegatibleInsts(), llvm::RecurrenceDescriptor::isConditionalRdxPattern(), optimizeBinaryDoubleFP(), llvm::LibCallSimplifier::optimizeCall(), llvm::InstCombiner::visitCallInst(), and llvm::InstCombiner::visitFMul().
|
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 561 of file Instruction.h.
References llvm::MCID::Call, and getOpcode().
Referenced by llvm::AAResults::getModRefInfo(), and llvm::MemorySSAWalker::MemorySSAWalker().
|
inline |
Definition at line 134 of file Instruction.h.
References getOpcode(), and isFuncletPad().
Referenced by llvm::FuncletPadInst::classof(), and isFuncletPad().
Determine if the OpCode is one of the FuncletPadInst instructions.
Definition at line 190 of file Instruction.h.
|
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 516 of file Instruction.h.
References getOpcode(), and isIdempotent().
Referenced by IncorporateWeight(), and isIdempotent().
Definition at line 517 of file Instruction.h.
| bool Instruction::isIdenticalTo | ( | const Instruction * | I | ) | const |
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.
Definition at line 441 of file Instruction.cpp.
References isIdenticalToWhenDefined(), and llvm::Value::SubclassOptionalData.
Referenced by llvm::EliminateDuplicatePHINodes(), llvm::InnerLoopVectorizer::fixupIVUsers(), foldOperationIntoPhiValue(), llvm::DenseMapInfo< CallValue >::getTombstoneKey(), HasSameValue(), markAliveBlocks(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), tryCSEWithPredecessor(), TryToMergeLandingPad(), and llvm::InstCombiner::visitFenceInst().
| 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 446 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(), HoistThenElseCodeToIf(), isEqualImpl(), and isIdenticalTo().
|
inline |
Definition at line 138 of file Instruction.h.
References getOpcode().
Referenced by llvm::InsertPreheaderForLoop(), insertUniqueBackedgeBlock(), and llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::MarkBlockExecutable().
Returns true if the OpCode is a terminator with indirect targets.
Definition at line 209 of file Instruction.h.
|
inline |
Definition at line 131 of file Instruction.h.
References getOpcode(), and isIntDivRem().
Referenced by llvm::ConstantFoldBinaryInstruction(), foldSelectShuffle(), foldSelectShuffleWith1Binop(), isIntDivRem(), isValidForAlternation(), shouldMergeGEPs(), and ShrinkDemandedConstant().
Definition at line 155 of file Instruction.h.
| bool Instruction::isLifetimeStartOrEnd | ( | ) | const |
Return true if the instruction is a llvm.lifetime.start or llvm.lifetime.end marker.
Definition at line 608 of file Instruction.cpp.
References llvm::dyn_cast().
Referenced by llvm::CodeExtractorAnalysisCache::CodeExtractorAnalysisCache(), llvm::IRPosition::getAttrs(), GetCtorAndDtorPriority(), llvm::BasicBlock::getFirstNonPHIOrDbgOrLifetime(), llvm::safestack::StackColoring::getLiveRange(), llvm::onlyUsedByLifetimeMarkers(), AllocaSlices::SliceBuilder::SliceBuilder(), and llvm::sroa::AllocaSliceRewriter::visit().
|
inline |
Return true if this is a logical shift left or a logical shift right.
Definition at line 165 of file Instruction.h.
References getOpcode().
Referenced by canEvaluateShiftedShift(), llvm::InstCombiner::FoldShiftByConstant(), and simplifyValueKnownNonZero().
|
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 530 of file Instruction.h.
References getOpcode(), and isNilpotent().
Referenced by IncorporateWeight(), and isNilpotent().
Definition at line 531 of file Instruction.h.
| bool Instruction::isSafeToRemove | ( | ) | const |
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.
Definition at line 603 of file Instruction.cpp.
References isTerminator(), and mayHaveSideEffects().
Referenced by llvm::runIPSCCP(), and tryToReplaceWithConstant().
| 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.
Definition at line 472 of file Instruction.cpp.
References CompareIgnoringAlignment, CompareUsingScalarTypes, llvm::numbers::e, llvm::User::getNumOperands(), getOpcode(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::Value::getType(), and haveSameSpecialState().
Referenced by canSinkInstructions(), Cleanup(), hasUsesOutsideLoop(), isIgnorableInst(), isSafeAndProfitableToSinkLoad(), and llvm::InstCombiner::visitStoreInst().
|
inline |
Definition at line 132 of file Instruction.h.
References getOpcode(), and isShift().
Referenced by detectShiftUntilZeroIdiom(), foldSelectShuffle(), foldSelectShuffleWith1Binop(), llvm::InstCombiner::FoldShiftByConstant(), foldShiftOfShiftedLogic(), llvm::ARMTTIImpl::getArithmeticInstrCost(), getTrueOrFalseValue(), isBroadcastShuffle(), llvm::PatternMatch::is_shift_op::isOpType(), isShift(), processUGT_ADDCST_ADD(), rightDistributesOverLeft(), shouldMergeGEPs(), and ShrinkDemandedConstant().
Determine if the Opcode is one of the shift instructions.
Definition at line 160 of file Instruction.h.
|
inline |
Definition at line 128 of file Instruction.h.
References getOpcode(), and isTerminator().
Referenced by annotateAnyAllocSite(), collectInstructionsInBetween(), llvm::DivergenceAnalysis::compute(), DeleteBasicBlock(), llvm::DemoteRegToStack(), llvm::slpvectorizer::BoUpSLP::eraseInstructions(), findLocationForEntrySafepoint(), FoldTwoEntryPHINode(), FunctionNumber(), llvm::IRPosition::getAttrs(), GetCaseResults(), llvm::MustBeExecutedContextExplorer::getMustBeExecutedNextInstruction(), HoistThenElseCodeToIf(), INITIALIZE_PASS(), isAlwaysLive(), llvm::isCriticalEdge(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::isEdgeFeasible(), isFoldedOrDeadInstruction(), isOnlyReachableViaThisEdge(), isSafeToMove(), llvm::isSafeToMoveBefore(), isSafeToRemove(), isTerminator(), isUnconditionalBranch(), LLVMIsATerminatorInst(), makeBitReverse(), mergeCleanupPad(), mergeConditionalStoreToAddress(), llvm::InstDeleterIRStrategy::mutate(), okayForPHIOfOps(), llvm::MemoryDependenceResults::removeInstruction(), replaceAllUsesOfWithIn(), replaceAndRecursivelySimplifyImpl(), runSCCP(), llvm::FastISel::selectInstruction(), shouldRotateLoopExitingLatch(), SimplifyCondBranchToTwoReturns(), simplifyTerminatorLeadingToRet(), TryToSinkInstruction(), llvm::SelectionDAGBuilder::visit(), and llvm::wouldInstructionBeTriviallyDead().
Definition at line 144 of file Instruction.h.
|
inline |
Definition at line 129 of file Instruction.h.
References getOpcode(), and isUnaryOp().
Referenced by llvm::UnaryInstruction::classof(), llvm::UnaryOperator::classof(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldUnaryInstruction(), llvm::ConstantFoldUnaryOpOperand(), llvm::IRBuilder< TargetFolder >::CreateNAryOp(), llvm::ConstantExpr::get(), and isUnaryOp().
Definition at line 148 of file Instruction.h.
| 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 496 of file Instruction.cpp.
References llvm::dyn_cast(), getParent(), I, and llvm::Value::uses().
|
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 582 of file Instruction.h.
References llvm::WebAssembly::mayThrow().
Referenced by canMoveAboveCall(), llvm::CloneFunction(), ConvertToSInt(), llvm::JumpThreadingPass::DuplicateCondBranchOnPHIIntoPred(), ExposePointerBase(), FoldCondBranchOnPHI(), getInductionVariable(), getMaxBackedgeTakenCount(), getRangeForAffineARHelper(), isAlwaysLive(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), llvm::isInTailCallPosition(), isLoopDead(), isOnlyReachableViaThisEdge(), isProfitableForVectorization(), IsSafeComputationToRemove(), isSafePHIToSpeculate(), isSafeToRemove(), llvm::isSafeToUnrollAndJam(), isUnconditionalBranch(), replaceAndRecursivelySimplifyImpl(), ReplaceUsesOfWith(), shouldRotateLoopExitingLatch(), llvm::sinkRegion(), SpeculativelyExecuteBB(), TryToSinkInstruction(), tryWidenCondBranchToCondBranch(), unswitchAllTrivialConditions(), and llvm::wouldInstructionBeTriviallyDead().
| bool Instruction::mayReadFromMemory | ( | ) | const |
Return true if this instruction may read memory.
Definition at line 514 of file Instruction.cpp.
References llvm::MCID::Call, getOpcode(), llvm::SPII::Load, and llvm::SPII::Store.
Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving(), checkFunctionMemoryAccess(), llvm::createMemDepPrinter(), llvm::IRPosition::getAttrs(), getInductionVariable(), GetLocation(), llvm::DependenceInfo::getSplitIteration(), hasConcreteDefImpl(), IsAcceptableTarget(), isIgnorableInst(), llvm::isInTailCallPosition(), isOnlyReachableViaThisEdge(), isOrdered(), llvm::Loop::makeLoopInvariant(), llvm::LoopDataPrefetchPass::run(), shouldRotateLoopExitingLatch(), TryToSinkInstruction(), and llvm::InstCombiner::visitStoreInst().
|
inline |
Return true if this instruction may read or write memory.
Definition at line 542 of file Instruction.h.
References isAtomic(), and llvm::WebAssembly::mayThrow().
Referenced by llvm::AliasSetTracker::addUnknown(), llvm::AliasSet::aliasesUnknownInst(), llvm::canSinkOrHoistInst(), CloneAliasScopeMetadata(), llvm::DependenceInfo::depends(), llvm::IRPosition::getAttrs(), getChainID(), llvm::intersectAccessGroups(), llvm::isSafeToUnrollAndJam(), llvm::mayBeMemoryDependent(), mergeConditionalStoreToAddress(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), propagateMetadata(), and PropagateParallelLoopAccessMetadata().
| bool Instruction::mayThrow | ( | ) | const |
Return true if this instruction may throw an exception.
Definition at line 593 of file Instruction.cpp.
Referenced by eliminateDeadStores(), getMaxBackedgeTakenCount(), InstrBreaksNonThrowing(), isSafeToMove(), llvm::isSafeToMoveBefore(), MarkBlocksLiveIn(), moveUp(), propagateMetadata(), llvm::GVNHoist::rank(), runImpl(), and llvm::InstCombiner::visitStoreInst().
| bool Instruction::mayWriteToMemory | ( | ) | const |
Return true if this instruction may modify memory.
Definition at line 534 of file Instruction.cpp.
References llvm::MCID::Call, getOpcode(), llvm::SPII::Load, and llvm::SPII::Store.
Referenced by llvm::InterleavedAccessInfo::analyzeInterleaving(), AreSequentialAccesses(), checkFunctionMemoryAccess(), llvm::createMemDepPrinter(), llvm::FindAvailablePtrLoadStore(), findInitTrampolineFromBB(), llvm::IRPosition::getAttrs(), GetLocation(), llvm::DependenceInfo::getSplitIteration(), isFoldedOrDeadInstruction(), isIgnorableInst(), isOrdered(), isSafeToMove(), llvm::MemoryWriteTracking::isSpecialInstruction(), memoryIsNotModifiedBetween(), propagateMetadata(), shouldRotateLoopExitingLatch(), tryWidenCondBranchToCondBranch(), and llvm::InstCombiner::visitStoreInst().
| 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 90 of file Instruction.cpp.
References llvm::ilist_node_impl< OptionsT >::getIterator(), getParent(), and moveBefore().
Referenced by hasSameExtUse(), isPromotedResultSafe(), and rewriteDebugUsers().
| void Instruction::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.
Definition at line 86 of file Instruction.cpp.
References llvm::ilist_node_impl< OptionsT >::getIterator(), and getParent().
Referenced by canonicalizeSaturatedAdd(), despeculateCountZeros(), llvm::GVNExpression::Expression::dump(), llvm::CodeExtractor::extractCodeRegion(), llvm::SCEVExpander::hoistIVInc(), isProfitableForVectorization(), isPromotedResultSafe(), LinearizeExprTree(), llvm::Loop::makeLoopInvariant(), MarkBlocksLiveIn(), moveAfter(), moveHeaderPhiOperandsToForeBlocks(), moveInstructionBefore(), llvm::moveInstsBottomUp(), NegateValue(), operator<<(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), removeEmptyCleanup(), RetagMask(), llvm::setWidenableBranchCond(), shouldRotateLoopExitingLatch(), simplifyRelocatesOffABase(), SinkInstruction(), sinkInstruction(), sinkLastInstruction(), TryToSinkInstruction(), turnGuardIntoBranch(), llvm::UnrollAndJamLoop(), llvm::InstCombiner::visitAllocaInst(), and llvm::widenWidenableBranch().
| void Instruction::moveBefore | ( | BasicBlock & | BB, |
| SymbolTableList< Instruction >::iterator | I | ||
| ) |
Unlink this instruction and insert into BB before I.
Definition at line 94 of file Instruction.cpp.
References assert(), llvm::BasicBlock::end(), llvm::BasicBlock::getInstList(), llvm::ilist_node_impl< ilist_detail::compute_node_options< Instruction, Options... >::type >::getIterator(), getParent(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::splice().
|
delete |
| void Instruction::removeFromParent | ( | ) |
This method unlinks 'this' from the containing basic block, but does not delete it.
Definition at line 63 of file Instruction.cpp.
References llvm::BasicBlock::getInstList(), llvm::ilist_node_impl< ilist_detail::compute_node_options< Instruction, Options... >::type >::getIterator(), getParent(), and llvm::iplist_impl< IntrusiveListT, TraitsT >::remove().
Referenced by CloneLoop(), llvm::OpenMPIRBuilder::CreateParallel(), hasSameExtUse(), makeBitReverse(), operator<<(), propagateMetadata(), scaleWeights(), llvm::JumpThreadingPass::UnfoldSelectInstr(), and llvm::InstCombiner::visitAnd().
| void Instruction::replaceSuccessorWith | ( | BasicBlock * | OldBB, |
| BasicBlock * | NewBB | ||
| ) |
Replace specified successor OldBB to point at the provided block.
This instruction must be a terminator.
Definition at line 681 of file Instruction.cpp.
References getNumSuccessors(), getSuccessor(), llvm_unreachable, and setSuccessor().
Referenced by insertUniqueBackedgeBlock().
Sets the metadata on this instruction from the AAMDNodes structure.
Definition at line 1263 of file Metadata.cpp.
References assert(), llvm::MDNode::getContext(), Info, llvm::LLVMContextImpl::InstructionMetadata, llvm::AAMDNodes::NoAlias, llvm::LLVMContext::pImpl, llvm::AAMDNodes::Scope, setMetadata(), llvm::AAMDNodes::TBAA, and llvm::AAMDNodes::TBAAStruct.
Referenced by doPromotion(), isSafeToExecuteUnconditionally(), mergeConditionalStoreToAddress(), llvm::promoteLoopAccessesToScalars(), speculatePHINodeLoads(), speculateSelectInstLoads(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::sroa::AllocaSliceRewriter::visit(), llvm::InstCombiner::visitExtractValueInst(), and llvm::InstCombiner::visitStoreInst().
|
inline |
Set the debug location information for this instruction.
Definition at line 328 of file Instruction.h.
Referenced by annotateAnyAllocSite(), canCreateThunkFor(), llvm::changeToInvokeAndSplitBasicBlock(), llvm::changeToUnreachable(), ConvertShiftToMul(), copyMetadata(), createAndInstr(), createCallInst(), llvm::createCallMatchingInvoke(), createFFSIntrinsic(), createPopcntIntrinsic(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), eliminateRecursiveTailCall(), findInsertPointAfter(), FitWeights(), llvm::formLCSSAForInstructions(), getSignature(), getTypePartition(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), hasSameExtUse(), hoist(), llvm::hoistAllInstructionsInto(), INITIALIZE_PASS(), llvm::InlineFunction(), insertCall(), insertLifetimeMarkersSurroundingCall(), llvm::InstCombiner::InsertNewInstWith(), instrumentMaskedLoadOrStore(), isBroadcastShuffle(), isOnlyReachableViaThisEdge(), isSafeToExecuteUnconditionally(), isUnconditionalBranch(), LowerNegateToMultiply(), OptimizeExtractBits(), llvm::PHITransAddr::PHITranslateWithInsertion(), llvm::JumpThreadingPass::ProcessBlock(), processSaturatingInst(), processSExt(), llvm::promoteLoopAccessesToScalars(), llvm::Attributor::registerFunctionSignatureRewrite(), llvm::removeUnwindEdge(), llvm::ReplaceInstWithInst(), reportLoadElim(), reportMayClobberedLoad(), llvm::IRBuilderBase::SetInstDebugLocation(), shouldRotateLoopExitingLatch(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), sinkAndCmp0Expression(), SinkCast(), sinkCmpExpression(), SinkShiftAndTruncate(), llvm::BasicBlock::splitBasicBlock(), splitCallSite(), llvm::SplitLandingPadPredecessors(), llvm::JumpThreadingPass::ThreadEdge(), truncateIVUse(), tryToShorten(), TryToShrinkGlobalToBoolean(), tryUnmergingGEPsAcrossIndirectBr(), llvm::UnrollRuntimeLoopRemainder(), updateForIncomingValueLocation(), updateOperand(), llvm::InstCombiner::visitLoadInst(), and llvm::InstCombiner::visitStoreInst().
| 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().
| 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 canonicalizeSaturatedAdd(), ClearSubclassDataAfterReassociation(), CreateAdd(), CreateMul(), CreateNeg(), llvm::IRBuilder< TargetFolder >::CreateUnreachable(), FunctionNumber(), LinearizeExprTree(), and simplifyAssocCastAssoc().
| 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().
| 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().
| 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().
| 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().
| 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().
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.
Definition at line 104 of file Instruction.cpp.
Referenced by andIRFlags(), ConvertShiftToMul(), copyIRFlags(), llvm::NoFolder::CreateAdd(), llvm::NoFolder::CreateMul(), llvm::NoFolder::CreateNeg(), llvm::BinaryOperator::CreateNSW(), llvm::NoFolder::CreateShl(), llvm::NoFolder::CreateSub(), llvm::IRBuilder< TargetFolder >::CreateUnreachable(), dropPoisonGeneratingFlags(), findInsertPointAfter(), foldSelectShuffle(), foldShiftedShift(), llvm::ConstantExpr::getAsInstruction(), GetLoopInvariantInsertPosition(), NegateValue(), llvm::PHITransAddr::PHITranslateWithInsertion(), ShrinkDemandedConstant(), simplifyAssocCastAssoc(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), llvm::InstCombiner::visitSub(), and willNotOverflow().
| 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().
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.
Definition at line 100 of file Instruction.cpp.
Referenced by andIRFlags(), ConvertShiftToMul(), copyIRFlags(), llvm::NoFolder::CreateAdd(), llvm::NoFolder::CreateMul(), llvm::NoFolder::CreateNeg(), llvm::BinaryOperator::CreateNUW(), llvm::NoFolder::CreateShl(), llvm::NoFolder::CreateSub(), llvm::IRBuilder< TargetFolder >::CreateUnreachable(), dropPoisonGeneratingFlags(), findInsertPointAfter(), foldShiftedShift(), llvm::ConstantExpr::getAsInstruction(), GetLoopInvariantInsertPosition(), NegateValue(), llvm::InstCombiner::OptimizePointerDifference(), llvm::PHITransAddr::PHITranslateWithInsertion(), ShrinkDemandedConstant(), simplifyAssocCastAssoc(), simplifyValueKnownNonZero(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitShl(), and willNotOverflow().
|
inlineprotected |
Definition at line 764 of file Instruction.h.
References assert().
Referenced by llvm::AllocaInst::classof(), llvm::LoadInst::classof(), llvm::StoreInst::classof(), llvm::FenceInst::classof(), llvm::AtomicCmpXchgInst::classof(), llvm::AtomicRMWInst::classof(), llvm::CallInst::classof(), llvm::InvokeInst::classof(), llvm::CallBrInst::classof(), and llvm::CleanupReturnInst::classof().
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.
Definition at line 108 of file Instruction.cpp.
Referenced by andIRFlags(), llvm::InstCombiner::commonIDivTransforms(), copyIRFlags(), llvm::BinaryOperator::CreateExact(), dropPoisonGeneratingFlags(), foldShiftedShift(), foldUDivPow2Cst(), foldUDivShl(), llvm::ConstantExpr::getAsInstruction(), GetLoopInvariantInsertPosition(), processUDivOrURem(), ShrinkDemandedConstant(), simplifyValueKnownNonZero(), llvm::InstCombiner::visitAShr(), llvm::InstCombiner::visitLShr(), and llvm::InstCombiner::visitUDiv().
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 1224 of file Metadata.cpp.
Referenced by AddAliasScopeMetadata(), llvm::LoopVersioning::annotateInstWithNoAlias(), llvm::annotateValueSite(), assertBranchOrSelectConditionHoisted(), CloneAliasScopeMetadata(), llvm::combineMetadata(), combineStoreToNewValue(), ComputePostOrders(), copyMetadata(), llvm::copyMetadataForLoad(), llvm::copyNonnullMetadata(), llvm::copyRangeMetadata(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemCpy(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemMove(), llvm::IRBuilderBase::CreateElementUnorderedAtomicMemSet(), llvm::createFalkorMarkStridedAccessesPass(), llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), llvm::createObjCARCOptPass(), llvm::IRBuilder< TargetFolder >::CreatePreserveArrayAccessIndex(), llvm::IRBuilder< TargetFolder >::CreatePreserveStructAccessIndex(), llvm::IRBuilder< TargetFolder >::CreatePreserveUnionAccessIndex(), llvm::IRBuilder< TargetFolder >::CreateUnreachable(), findBasePointer(), fixupBranchWeights(), foldCtpop(), foldCttzCtlz(), getMulHu(), getNegativeIsTrueBoolVec(), GetSortedValueDataFromCallTargets(), handlePhiDef(), handleSwitchExpect(), hasOnlyUniformBranches(), insertLifetimeMarkersSurroundingCall(), insertUniqueBackedgeBlock(), isKnownTypeIdMember(), isSafeAndProfitableToSinkLoad(), parseOptionalLinkageAux(), llvm::promoteCall(), llvm::pgo::promoteIndirectCall(), llvm::propagateMetadata(), PropagateParallelLoopAccessMetadata(), runCVP(), setBranchWeights(), llvm::setIrrLoopHeaderMetadata(), setNoClobberMetadata(), llvm::setProfMetadata(), setProfWeight(), AAValueConstantRangeImpl::setRangeMetadataIfisBetterRange(), swapProfMetadata(), llvm::JumpThreadingPass::ThreadEdge(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), tryUnmergingGEPsAcrossIndirectBr(), updateBranchWeights(), updatePredecessorProfileMetadata(), llvm::CallInst::updateProfWeight(), wrapConstantAsMetadata(), and llvm::SwitchInstProfUpdateWrapper::~SwitchInstProfUpdateWrapper().
Definition at line 1187 of file Metadata.cpp.
| void Instruction::setProfWeight | ( | uint64_t | W | ) |
Sets the branch_weights metadata to W for CallInst.
Definition at line 748 of file Instruction.cpp.
References assert(), llvm::MDBuilder::createBranchWeights(), llvm::Value::getContext(), llvm::SmallVectorTemplateBase< T >::push_back(), and setMetadata().
Referenced by annotateAnyAllocSite(), and llvm::Attributor::registerFunctionSignatureRewrite().
| void Instruction::setSuccessor | ( | unsigned | Idx, |
| BasicBlock * | BB | ||
| ) |
Update the specified successor to point at the provided block.
This instruction must be a terminator.
Definition at line 669 of file Instruction.cpp.
References getOpcode(), and llvm_unreachable.
Referenced by llvm::ReturnInst::classof(), llvm::ResumeInst::classof(), llvm::CatchReturnInst::classof(), llvm::CleanupReturnInst::classof(), llvm::UnreachableInst::classof(), CloneLoopBlocks(), cloneLoopBlocks(), llvm::createMemCpyLoopKnownSize(), FoldCondBranchOnPHI(), insertLifetimeMarkersSurroundingCall(), isUnconditionalBranch(), replaceSuccessorWith(), llvm::SplitCriticalEdge(), and llvm::JumpThreadingPass::ThreadEdge().
| 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 692 of file Instruction.cpp.
References llvm::MDNode::get(), llvm::MDNode::getContext(), getMetadata(), llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), llvm::MDString::getString(), and setMetadata().
Referenced by canonicalizeSaturatedAdd(), CloneLoop(), and llvm::BranchInst::swapSuccessors().
|
inline |
Specialize the methods defined in Value, as we know that an instruction can only be used by other instructions.
Definition at line 63 of file Instruction.h.
Referenced by AreSequentialAccesses(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), canTransformAccumulatorRecursion(), cheapToScalarize(), combineLoadToOperationType(), ConvertToSInt(), DeadPHICycle(), llvm::DemoteRegToStack(), doPromotion(), foldInsSequenceIntoSplat(), llvm::ARMTTIImpl::getArithmeticInstrCost(), getNegatibleInsts(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), IsInterestingCmp(), llvm::AArch64TargetLowering::isProfitableToHoist(), OptimizeGlobalAddressOfMalloc(), promoteSingleBlockAlloca(), llvm::recognizeBSwapOrBitReverseIdiom(), replaceExtractElements(), ShouldBreakUpSubtract(), shouldMergeGEPs(), SimplifyIndirectBrOnSelect(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::FastISel::tryToFoldLoad(), updateOperand(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitSExt(), and llvm::InstCombiner::visitZExt().
|
inline |
Definition at line 64 of file Instruction.h.
|
friend |
Definition at line 740 of file Instruction.h.
1.8.13