LLVM API Documentation
#include <Instruction.h>
Public Types | |
enum | OperationEquivalenceFlags { CompareIgnoringAlignment = 1<<0, CompareUsingScalarTypes = 1<<1 } |
enum | TermOps |
enum | BinaryOps |
enum | MemoryOps |
enum | CastOps |
enum | OtherOps |
![]() | |
typedef Use * | op_iterator |
typedef const Use * | const_op_iterator |
![]() | |
enum | ValueTy { ArgumentVal, BasicBlockVal, FunctionVal, GlobalAliasVal, GlobalVariableVal, UndefValueVal, BlockAddressVal, ConstantExprVal, ConstantAggregateZeroVal, ConstantDataArrayVal, ConstantDataVectorVal, ConstantIntVal, ConstantFPVal, ConstantArrayVal, ConstantStructVal, ConstantVectorVal, ConstantPointerNullVal, MDNodeVal, MDStringVal, InlineAsmVal, PseudoSourceValueVal, FixedStackPseudoSourceValueVal, InstructionVal, ConstantFirstVal = FunctionVal, ConstantLastVal = ConstantPointerNullVal } |
typedef value_use_iterator< User > | use_iterator |
typedef value_use_iterator < const User > | const_use_iterator |
Public Member Functions | |
~Instruction () | |
Instruction * | use_back () |
const Instruction * | use_back () const |
const BasicBlock * | getParent () const |
BasicBlock * | getParent () |
void | removeFromParent () |
void | eraseFromParent () |
void | insertBefore (Instruction *InsertPos) |
void | insertAfter (Instruction *InsertPos) |
void | moveBefore (Instruction *MovePos) |
unsigned | getOpcode () const |
getOpcode() returns a member of one of the enums like Instruction::Add. More... | |
const char * | getOpcodeName () const |
bool | isTerminator () const |
bool | isBinaryOp () const |
bool | isShift () |
bool | isCast () const |
bool | isLogicalShift () const |
bool | isArithmeticShift () const |
isArithmeticShift - Return true if this is an arithmetic shift right. More... | |
bool | hasMetadata () const |
bool | hasMetadataOtherThanDebugLoc () const |
MDNode * | getMetadata (unsigned KindID) const |
MDNode * | getMetadata (StringRef Kind) const |
void | getAllMetadata (SmallVectorImpl< std::pair< unsigned, MDNode * > > &MDs) const |
void | getAllMetadataOtherThanDebugLoc (SmallVectorImpl< std::pair< unsigned, MDNode * > > &MDs) const |
void | setMetadata (unsigned KindID, MDNode *Node) |
void | setMetadata (StringRef Kind, MDNode *Node) |
void | setDebugLoc (const DebugLoc &Loc) |
setDebugLoc - Set the debug location information for this instruction. More... | |
const DebugLoc & | getDebugLoc () const |
getDebugLoc - Return the debug location for this node as a DebugLoc. More... | |
void | setHasUnsafeAlgebra (bool B) |
void | setHasNoNaNs (bool B) |
void | setHasNoInfs (bool B) |
void | setHasNoSignedZeros (bool B) |
void | setHasAllowReciprocal (bool B) |
void | setFastMathFlags (FastMathFlags FMF) |
bool | hasUnsafeAlgebra () const |
Determine whether the unsafe-algebra 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... | |
FastMathFlags | getFastMathFlags () const |
void | copyFastMathFlags (const Instruction *I) |
Copy I's fast-math flags. More... | |
bool | isAssociative () const |
bool | isCommutative () const |
bool | isIdempotent () const |
bool | isNilpotent () const |
bool | mayWriteToMemory () const |
bool | mayReadFromMemory () const |
bool | mayReadOrWriteMemory () const |
bool | mayThrow () const |
bool | mayReturn () const |
bool | mayHaveSideEffects () const |
Instruction * | clone () const |
bool | isIdenticalTo (const Instruction *I) const |
bool | isIdenticalToWhenDefined (const Instruction *I) const |
bool | isSameOperationAs (const Instruction *I, unsigned flags=0) const |
Determine if one instruction is the same operation as another. More... | |
bool | isUsedOutsideOfBlock (const BasicBlock *BB) const |
![]() | |
~User () | |
void | operator delete (void *Usr) |
operator delete - free memory allocated for User and Use objects More... | |
void | operator delete (void *, unsigned) |
placement delete - required by std, but never called. More... | |
void | operator delete (void *, unsigned, bool) |
placement delete - required by std, but never called. More... | |
Value * | getOperand (unsigned i) const |
void | setOperand (unsigned i, Value *Val) |
const Use & | getOperandUse (unsigned i) const |
Use & | getOperandUse (unsigned i) |
unsigned | getNumOperands () const |
op_iterator | op_begin () |
const_op_iterator | op_begin () const |
op_iterator | op_end () |
const_op_iterator | op_end () const |
value_op_iterator | value_op_begin () |
value_op_iterator | value_op_end () |
void | dropAllReferences () |
void | replaceUsesOfWith (Value *From, Value *To) |
![]() | |
virtual | ~Value () |
void | dump () const |
dump - Support for debugging, callable in GDB: V->dump() More... | |
void | print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const |
Type * | getType () const |
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 |
void | setName (const Twine &Name) |
void | takeName (Value *V) |
void | replaceAllUsesWith (Value *V) |
bool | use_empty () const |
use_iterator | use_begin () |
const_use_iterator | use_begin () const |
use_iterator | use_end () |
const_use_iterator | use_end () const |
User * | use_back () |
const User * | use_back () const |
bool | hasOneUse () const |
bool | hasNUses (unsigned N) const |
bool | hasNUsesOrMore (unsigned N) const |
bool | isUsedInBasicBlock (const BasicBlock *BB) const |
unsigned | getNumUses () const |
void | addUse (Use &U) |
unsigned | getValueID () const |
unsigned | getRawSubclassOptionalData () const |
void | clearSubclassOptionalData () |
bool | hasSameSubclassOptionalData (const Value *V) const |
void | intersectOptionalDataWith (const Value *V) |
bool | hasValueHandle () const |
Value * | stripPointerCasts () |
Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCasts () const |
Value * | stripPointerCastsNoFollowAliases () |
Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCastsNoFollowAliases () const |
Value * | stripInBoundsConstantOffsets () |
Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsConstantOffsets () const |
Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More... | |
const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
Value * | stripInBoundsOffsets () |
Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsOffsets () const |
bool | isDereferenceablePointer () const |
Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
void | mutateType (Type *Ty) |
![]() | |
Instruction * | getPrevNode () |
Get the previous node, or 0 for the list head. More... | |
const Instruction * | getPrevNode () const |
Get the previous node, or 0 for the list head. More... | |
Instruction * | getNextNode () |
Get the next node, or 0 for the list tail. More... | |
const Instruction * | getNextNode () const |
Get the next node, or 0 for the list tail. More... | |
Static Public Member Functions | |
static const char * | getOpcodeName (unsigned OpCode) |
static bool | isTerminator (unsigned OpCode) |
static bool | isBinaryOp (unsigned Opcode) |
static bool | isShift (unsigned Opcode) |
Determine if the Opcode is one of the shift instructions. More... | |
static bool | isCast (unsigned OpCode) |
Determine if the OpCode is one of the CastInst instructions. More... | |
static bool | isAssociative (unsigned op) |
static bool | isCommutative (unsigned op) |
static bool | isIdempotent (unsigned op) |
static bool | isNilpotent (unsigned op) |
static bool | classof (const Value *V) |
Methods for support type inquiry through isa, cast, and dyn_cast: More... | |
![]() | |
static bool | classof (const Value *V) |
Protected Member Functions | |
void | setInstructionSubclassData (unsigned short D) |
unsigned | getSubclassDataFromInstruction () const |
Instruction (Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, Instruction *InsertBefore=0) | |
Instruction (Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd) | |
virtual Instruction * | clone_impl () const =0 |
![]() | |
void * | operator new (size_t s, unsigned Us) |
User (Type *ty, unsigned vty, Use *OpList, unsigned NumOps) | |
Use * | allocHungoffUses (unsigned) const |
void | dropHungoffUses () |
template<int Idx> | |
Use & | Op () |
template<int Idx> | |
const Use & | Op () const |
![]() | |
virtual void | printCustom (raw_ostream &O) const |
Value (Type *Ty, unsigned scid) | |
unsigned short | getSubclassDataFromValue () const |
void | setValueSubclassData (unsigned short D) |
![]() | |
ilist_node () | |
Friends | |
class | SymbolTableListTraits< Instruction, BasicBlock > |
Additional Inherited Members | |
![]() | |
static const unsigned | MaximumAlignment = 1u << 29 |
![]() | |
template<int Idx, typename U > | |
static Use & | OpFrom (const U *that) |
![]() | |
Use * | OperandList |
unsigned | NumOperands |
![]() | |
unsigned char | SubclassOptionalData: 7 |
Definition at line 31 of file Instruction.h.
Definition at line 387 of file Instruction.h.
Definition at line 401 of file Instruction.h.
Definition at line 394 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 347 of file Instruction.h.
Definition at line 408 of file Instruction.h.
Definition at line 380 of file Instruction.h.
Instruction::~Instruction | ( | ) |
Definition at line 51 of file Instruction.cpp.
|
protected |
Definition at line 24 of file Instruction.cpp.
References llvm::LeakDetector::addGarbageObject(), llvm::BasicBlock::getInstList(), getParent(), and llvm::iplist< NodeTy, Traits >::insert().
|
protected |
Definition at line 38 of file Instruction.cpp.
References llvm::LeakDetector::addGarbageObject(), llvm::BasicBlock::getInstList(), and llvm::iplist< NodeTy, Traits >::push_back().
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 373 of file Instruction.h.
References llvm::Value::getValueID(), and llvm::Value::InstructionVal.
Instruction * Instruction::clone | ( | ) | const |
clone() - Create a copy of 'this' instruction that is identical in all ways except the following:
Definition at line 541 of file Instruction.cpp.
References clone_impl(), getAllMetadataOtherThanDebugLoc(), getDebugLoc(), hasMetadata(), setDebugLoc(), setMetadata(), llvm::SmallVectorTemplateCommon< T >::size(), and llvm::Value::SubclassOptionalData.
Referenced by llvm::CloneBasicBlock(), llvm::FoldBranchToCommonDest(), llvm::FoldReturnIntoUncondBranch(), HoistThenElseCodeToIf(), and llvm::SplitLandingPadPredecessors().
|
protectedpure virtual |
Implemented in llvm::AddrSpaceCastInst, llvm::BitCastInst, llvm::PtrToIntInst, llvm::IntToPtrInst, llvm::FPToSIInst, llvm::FPToUIInst, llvm::SIToFPInst, llvm::UIToFPInst, llvm::FPExtInst, llvm::FPTruncInst, llvm::SExtInst, llvm::ZExtInst, llvm::TruncInst, llvm::UnreachableInst, llvm::ResumeInst, llvm::InvokeInst, llvm::IndirectBrInst, llvm::SwitchInst, llvm::BranchInst, llvm::ReturnInst, llvm::LandingPadInst, llvm::PHINode, llvm::InsertValueInst, llvm::ExtractValueInst, llvm::ShuffleVectorInst, llvm::InsertElementInst, llvm::ExtractElementInst, llvm::VAArgInst, llvm::SelectInst, llvm::CallInst, llvm::FCmpInst, llvm::ICmpInst, llvm::GetElementPtrInst, llvm::AtomicRMWInst, llvm::AtomicCmpXchgInst, llvm::FenceInst, llvm::StoreInst, llvm::BinaryOperator, llvm::LoadInst, llvm::AllocaInst, and llvm::TerminatorInst.
Referenced by clone().
void Instruction::copyFastMathFlags | ( | const Instruction * | I | ) |
Copy I's fast-math flags.
Definition at line 181 of file Instruction.cpp.
References getFastMathFlags(), and setFastMathFlags().
Referenced by llvm::InstCombiner::visitFMul(), and llvm::InstCombiner::visitFSub().
void Instruction::eraseFromParent | ( | ) |
eraseFromParent - This method unlinks 'this' from the containing basic block and deletes it.
Definition at line 72 of file Instruction.cpp.
References llvm::iplist< NodeTy, Traits >::erase(), llvm::BasicBlock::getInstList(), and getParent().
Referenced by AddReachableCodeToWorklist(), BuildSubAggregate(), changeToCall(), checkCSEInPredecessor(), CleanupPointerRootUsers(), llvm::CloneAndPruneFunctionInto(), CloneLoopBlocks(), ConnectProlog(), llvm::ConstantFoldTerminator(), cse(), DeleteDeadInstruction(), deleteDeadInstruction(), DeleteTriviallyDeadInstructions(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), llvm::InstCombiner::DoOneIteration(), llvm::EliminateDuplicatePHINodes(), llvm::InstCombiner::EraseInstFromFunction(), llvm::objcarc::EraseInstruction(), EraseTerminatorInstAndDCECond(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), FindPHIToPartitionLoops(), llvm::FoldReturnIntoUncondBranch(), FoldTwoEntryPHINode(), generateUnsignedDivisionCode(), getAdjustedPtr(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), INITIALIZE_PASS(), InlineCallIfPossible(), llvm::InlineFunction(), insertFastDiv(), LowerAtomicCmpXchgInst(), LowerAtomicRMWInst(), llvm::LowerDbgDeclare(), LowerFenceInst(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::IntrinsicLowering::LowerToByteSwap(), markAliveBlocks(), llvm::BitcodeReader::MaterializeModule(), llvm::MergeBasicBlockIntoOnlyPred(), mergeEmptyReturnBlocks(), OptimizeCmpExpression(), OptimizeGlobalAddressOfMalloc(), OptimizeNoopCopyExpression(), PerformHeapAllocSRoA(), llvm::PHITransAddr::PHITranslateWithInsertion(), promoteSingleBlockAlloca(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), llvm::PHINode::removeIncomingValue(), removeLifetimeIntrinsicUsers(), llvm::BasicBlock::removePredecessor(), removeUndefIntroducingPredecessor(), llvm::LibCallSimplifier::replaceAllUsesWith(), replaceAndRecursivelySimplifyImpl(), llvm::replaceDbgDeclareForAlloca(), ReplaceUsesOfMallocWithGlobal(), ReplaceUsesOfWith(), reuseOrInsertFastDiv(), rewriteSingleStoreAlloca(), RewriteUsesOfLoadForHeapSRoA(), llvm::LoadAndStorePromoter::run(), llvm::NVPTXLowerAggrCopies::runOnFunction(), llvm::Inliner::runOnSCC(), SimplifyBranchOnICmpChain(), SinkThenElseCodeToEnd(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::SplitLandingPadPredecessors(), StripDebugInfo(), SwitchToLookupTable(), tryToMakeAllocaBePromotable(), TryToOptimizeStoreOfMallocToGlobal(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), TryToSimplifyUncondBranchWithICmpInIt(), TurnSwitchRangeIntoICmp(), llvm::UnrollLoop(), llvm::UpgradeIntrinsicCall(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().
|
inline |
getAllMetadata - 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 155 of file Instruction.h.
References hasMetadata().
Referenced by llvm::AssemblyWriter::printInstruction(), and llvm::RemapInstruction().
|
inline |
getAllMetadataOtherThanDebugLoc - This does the same thing as getAllMetadata, except that it filters out the debug location.
Definition at line 162 of file Instruction.h.
References hasMetadataOtherThanDebugLoc().
Referenced by clone(), and llvm::TypeFinder::run().
|
inline |
getDebugLoc - Return the debug location for this node as a DebugLoc.
Definition at line 178 of file Instruction.h.
Referenced by BreakUpSubtract(), changeToCall(), changeToUnreachable(), clone(), llvm::ConvertDebugDeclareToDebugValue(), ConvertShiftToMul(), createAndInstr(), llvm::InstCombiner::DoOneIteration(), fixupLineNumbers(), llvm::SelectionDAGBuilder::getCurDebugLoc(), llvm::SDLoc::getDebugLoc(), GetLoadValueForLoad(), llvm::InlineFunction(), llvm::InstCombiner::InsertNewInstWith(), llvm::InsertPreheaderForLoop(), llvm::IRBuilder< true, TargetFolder >::IRBuilder(), LowerNegateToMultiply(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::FastISel::SelectInstruction(), llvm::FastISel::SelectOperator(), llvm::FunctionLoweringInfo::set(), llvm::IRBuilderBase::SetInsertPoint(), SimplifyTerminatorOnSelect(), llvm::SplitCriticalEdge(), TryToSimplifyUncondBranchWithICmpInIt(), llvm::InstCombiner::visitFDiv(), and llvm::InstCombiner::visitXor().
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 flats.
Definition at line 175 of file Instruction.cpp.
Referenced by ClearSubclassDataAfterReassociation(), copyFastMathFlags(), llvm::SimplifyInstruction(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), and llvm::InstCombiner::visitFSub().
getMetadata - Get the metadata of given kind attached to this Instruction. If the metadata is not found then return null.
Definition at line 140 of file Instruction.h.
References hasMetadata().
Referenced by llvm::AliasSetTracker::add(), llvm::LLVMContext::emitError(), ExtractBranchMetadata(), llvm::getAlign(), GetBranchWeights(), llvm::AliasAnalysis::getLocation(), llvm::AliasAnalysis::getLocationForDest(), llvm::AliasAnalysis::getLocationForSource(), llvm::Loop::getLoopID(), llvm::AliasAnalysis::getModRefInfo(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), HasBranchWeights(), isVtableAccess(), patchReplacementInstruction(), llvm::AliasSetTracker::remove(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::BranchInst::swapSuccessors(), tryToMakeAllocaBePromotable(), and llvm::UpgradeInstWithTBAATag().
getMetadata - Get the metadata of given kind attached to this Instruction. If the metadata is not found then return null.
Definition at line 147 of file Instruction.h.
References hasMetadata().
|
inline |
getOpcode() returns a member of one of the enums like Instruction::Add.
Definition at line 83 of file Instruction.h.
References llvm::Value::getValueID(), and llvm::Value::InstructionVal.
Referenced by BuildNew(), CanEvaluateSExtd(), CanEvaluateShifted(), CanEvaluateShuffled(), CanEvaluateTruncated(), CanEvaluateZExtd(), CanPHITrans(), CheapToScalarize(), llvm::OverflowingBinaryOperator::classof(), llvm::AllocaInst::classof(), llvm::UnaryInstruction::classof(), llvm::PossiblyExactOperator::classof(), llvm::LoadInst::classof(), llvm::ConcreteOperator< OverflowingBinaryOperator, Instruction::Mul >::classof(), llvm::StoreInst::classof(), llvm::FenceInst::classof(), llvm::AtomicCmpXchgInst::classof(), llvm::AtomicRMWInst::classof(), llvm::CmpInst::classof(), llvm::GetElementPtrInst::classof(), llvm::ICmpInst::classof(), llvm::FCmpInst::classof(), llvm::CallInst::classof(), llvm::SelectInst::classof(), llvm::VAArgInst::classof(), llvm::ExtractElementInst::classof(), llvm::InsertElementInst::classof(), llvm::ShuffleVectorInst::classof(), llvm::ExtractValueInst::classof(), llvm::InsertValueInst::classof(), llvm::PHINode::classof(), llvm::LandingPadInst::classof(), llvm::ReturnInst::classof(), llvm::BranchInst::classof(), llvm::SwitchInst::classof(), llvm::IndirectBrInst::classof(), llvm::InvokeInst::classof(), llvm::ResumeInst::classof(), llvm::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(), CollectBSwapParts(), collectFailStats(), CollectInsertionElements(), ConstantFold(), llvm::ConstantFoldInstruction(), detectLog2OfHalf(), determinePointerReadAttrs(), dyn_castFoldableMul(), EvaluateExpression(), llvm::SelectionDAGBuilder::FindMergedConditions(), llvm::InstCombiner::foldFMulConst(), FoldOperationIntoSelectOperand(), llvm::InstCombiner::FoldSelectOpOp(), GatherConstantCompares(), llvm::SCEVExpander::getIVIncOperand(), getLoopPhiForCounter(), llvm::AliasAnalysis::getModRefInfo(), llvm::BinaryOperator::getOpcode(), llvm::CastInst::getOpcode(), llvm::CmpInst::getOpcode(), llvm::SelectInst::getOpcode(), getOpcodeName(), GetSelectFoldableConstant(), GetSelectFoldableOperands(), GetShiftedValue(), llvm::InlineFunction(), isAllocSiteRemovable(), isArithmeticShift(), isAssociative(), isBinaryOp(), isCast(), isCommutative(), isFMulOrFDivWithConstant(), isHighCostExpansion(), isIdempotent(), isIdenticalToWhenDefined(), isLogicalShift(), isNilpotent(), isSameOperationAs(), isShift(), isTerminator(), isUnmovableInstruction(), LookThroughFPExtensions(), mayReadFromMemory(), mayWriteToMemory(), llvm::PointerMayBeCaptured(), PrintOps(), llvm::FastISel::SelectInstruction(), SimplifyBranchOnICmpChain(), llvm::SimplifyInstruction(), SimplifyWithOpReplaced(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), ThreadBinOpOverSelect(), llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visit(), llvm::SelectionDAGBuilder::visit(), llvm::Interpreter::visitAllocaInst(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitSwitchInst(), and WriteInstruction().
|
inline |
Definition at line 85 of file Instruction.h.
References getOpcode(), and getOpcodeName().
Referenced by getOpcodeName(), llvm::ConstantExpr::getOpcodeName(), llvm::AssemblyWriter::printInstruction(), and PrintOps().
|
static |
Definition at line 186 of file Instruction.cpp.
References llvm::APIntOps::And(), llvm::Call, ExtractElement(), llvm::SPII::Load, llvm::APIntOps::Or(), llvm::TargetOpcode::PHI, llvm::AArch64ISD::Ret, llvm::MCID::Select, llvm::SPII::Store, and llvm::APIntOps::Xor().
|
inline |
Definition at line 52 of file Instruction.h.
Referenced by llvm::IVUsers::AddUsersImpl(), BlockIsSimpleEnoughToThreadThrough(), canConstantEvolve(), llvm::AliasAnalysis::canInstructionRangeModify(), CanSelectOperandBeMappingIntoPredBlock(), CanTRE(), changeToCall(), changeToUnreachable(), llvm::CloneAndPruneFunctionInto(), ConstructSSAForLoadSet(), llvm::Region::contains(), convertMemSetToLoop(), convertTransferToLoop(), createFree(), createMalloc(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), llvm::DependenceAnalysis::depends(), llvm::DominatorTree::dominates(), DominatesMergePoint(), llvm::InstCombiner::DoOneIteration(), llvm::Value::DoPHITranslation(), EliminateDeadSwitchCases(), eraseFromParent(), llvm::SCEVExpander::expandCodeFor(), FindInitTrampolineFromBB(), llvm::SelectionDAGBuilder::FindMergedConditions(), FindPhiPredForUseInBlock(), llvm::SimplifyFortifiedLibCalls::fold(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnPHI(), FoldTwoEntryPHINode(), GetCaseResults(), getCommonReturnValue(), llvm::MemoryDependenceAnalysis::getDependency(), getInsertPointForUses(), llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), GetLoadValueForLoad(), getLoopPhiForCounter(), GetMemInstValueForLoad(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), llvm::DependenceAnalysis::getSplitIteration(), GetStoreValueForLoad(), HandleByValArgument(), HandleInlinedInvoke(), HasSafePathToPredecessorCall(), llvm::SCEVExpander::hoistIVInc(), HoistThenElseCodeToIf(), InBlock(), InlineCallIfPossible(), llvm::InlineFunction(), insertAfter(), insertBefore(), llvm::InstCombiner::InsertNewInstBefore(), Instruction(), isDynamicConstant(), llvm::isInTailCallPosition(), isInteresting(), isLoopInvariant(), IsNonLocalValue(), llvm::isPotentiallyReachable(), isProfitableToFoldUnconditional(), llvm::DominatorTree::isReachableFromEntry(), isSafeAndProfitableToSinkLoad(), isSafePHIToSpeculate(), llvm::isSafeToLoadUnconditionally(), llvm::AllocaInst::isStaticAlloca(), llvm::Value::isUsedInBasicBlock(), isUsedOutsideOfDefiningBlock(), IVUseShouldUsePostIncValue(), LdStHasDebugValue(), LLVMGetNextInstruction(), LLVMGetPreviousInstruction(), LLVMPositionBuilderBefore(), LowerAtomicCmpXchgInst(), LowerAtomicRMWInst(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::IntrinsicLowering::LowerToByteSwap(), moveBefore(), NegateValue(), OptimizeCmpExpression(), OptimizeNoopCopyExpression(), passingValueIsAlwaysUndefined(), PerformHeapAllocSRoA(), llvm::PHITransAddr::PHITranslateValue(), PrintOps(), ProcessUAddIdiom(), ProcessUGT_ADDCST_ADD(), promoteSingleBlockAlloca(), removeFromParent(), replaceAndRecursivelySimplifyImpl(), ReplaceCallWith(), llvm::replaceDbgDeclareForAlloca(), llvm::ReplaceInstWithInst(), llvm::LoopInfo::replacementPreservesLCSSAForm(), rewriteSingleStoreAlloca(), llvm::SSAUpdater::RewriteUse(), llvm::SSAUpdater::RewriteUseAfterInsertions(), RewriteUsesOfClonedInstructions(), llvm::LoadAndStorePromoter::run(), llvm::NVPTXSplitBBatBar::runOnFunction(), SafeToMergeTerminators(), llvm::FastISel::SelectInstruction(), llvm::IRBuilderBase::SetInsertPoint(), SimplifyBranchOnICmpChain(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), llvm::InstCombiner::SimplifyDivRemOfSelect(), SimplifyTerminatorOnSelect(), llvm::simplifyUsersOfIV(), SinkThenElseCodeToEnd(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SparseSolver::Solve(), SpeculativelyExecuteBB(), llvm::SplitBlockAndInsertIfThen(), llvm::SplitCriticalEdge(), SwitchToLookupTable(), llvm::FastISel::tryToFoldLoad(), tryToMoveFreeBeforeNullTest(), TryToSimplifyUncondBranchWithICmpInIt(), TryToSinkInstruction(), TurnSwitchRangeIntoICmp(), UpdateCallGraphAfterInlining(), llvm::UpgradeIntrinsicCall(), ValueDominatesPHI(), llvm::SelectionDAGBuilder::visit(), llvm::InstCombiner::visitAllocaInst(), llvm::InstCombiner::visitCallInst(), llvm::Interpreter::visitCallSite(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitFPTrunc(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitPHINode(), and llvm::InstCombiner::visitStoreInst().
|
inline |
Definition at line 53 of file Instruction.h.
|
inlineprotected |
Definition at line 441 of file Instruction.h.
Referenced by llvm::AllocaInst::getAlignment(), llvm::LoadInst::getAlignment(), llvm::StoreInst::getAlignment(), llvm::CallInst::getCallingConv(), llvm::LoadInst::getOrdering(), llvm::StoreInst::getOrdering(), llvm::AtomicCmpXchgInst::getOrdering(), llvm::CmpInst::getPredicate(), llvm::LoadInst::getSynchScope(), llvm::StoreInst::getSynchScope(), llvm::AtomicCmpXchgInst::getSynchScope(), llvm::CallInst::isTailCall(), llvm::LoadInst::isVolatile(), llvm::StoreInst::isVolatile(), llvm::AtomicCmpXchgInst::isVolatile(), llvm::LoadInst::setAlignment(), llvm::StoreInst::setAlignment(), llvm::CallInst::setCallingConv(), llvm::LoadInst::setOrdering(), llvm::StoreInst::setOrdering(), llvm::AtomicCmpXchgInst::setOrdering(), llvm::LoadInst::setSynchScope(), llvm::StoreInst::setSynchScope(), llvm::AtomicCmpXchgInst::setSynchScope(), llvm::CallInst::setTailCall(), llvm::LoadInst::setVolatile(), llvm::StoreInst::setVolatile(), and llvm::AtomicCmpXchgInst::setVolatile().
bool Instruction::hasAllowReciprocal | ( | ) | const |
Determine whether the allow-reciprocal flag is set.
Definition at line 167 of file Instruction.cpp.
Referenced by llvm::InstCombiner::visitFDiv().
|
inline |
hasMetadata() - Return true if this instruction has any metadata attached to it.
Definition at line 128 of file Instruction.h.
References llvm::DebugLoc::isUnknown().
Referenced by clone(), getAllMetadata(), getMetadata(), and setMetadata().
|
inline |
hasMetadataOtherThanDebugLoc - Return true if this instruction has metadata attached to it other than a debug location.
Definition at line 134 of file Instruction.h.
Referenced by getAllMetadataOtherThanDebugLoc().
bool Instruction::hasNoInfs | ( | ) | const |
Determine whether the no-infs flag is set.
Definition at line 155 of file Instruction.cpp.
Referenced by SimplifyFAddInst(), and llvm::InstCombiner::visitFMul().
bool Instruction::hasNoNaNs | ( | ) | const |
Determine whether the no-NaNs flag is set.
Definition at line 149 of file Instruction.cpp.
Referenced by SimplifyFAddInst(), and llvm::InstCombiner::visitFMul().
bool Instruction::hasNoSignedZeros | ( | ) | const |
Determine whether the no-signed-zeros flag is set.
Definition at line 161 of file Instruction.cpp.
Referenced by llvm::BinaryOperator::isFNeg(), llvm::InstCombiner::visitFAdd(), and llvm::InstCombiner::visitFMul().
bool Instruction::hasUnsafeAlgebra | ( | ) | const |
Determine whether the unsafe-algebra flag is set.
Definition at line 143 of file Instruction.cpp.
Referenced by detectLog2OfHalf(), isAssociative(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), and llvm::InstCombiner::visitFSub().
void Instruction::insertAfter | ( | Instruction * | InsertPos | ) |
insertAfter - Insert an unlinked instructions into a basic block immediately after the specified instruction.
Definition at line 84 of file Instruction.cpp.
References llvm::BasicBlock::getInstList(), getParent(), and llvm::iplist< NodeTy, Traits >::insertAfter().
void Instruction::insertBefore | ( | Instruction * | InsertPos | ) |
insertBefore - Insert an unlinked instructions into a basic block immediately before the specified instruction.
Definition at line 78 of file Instruction.cpp.
References llvm::BasicBlock::getInstList(), getParent(), and llvm::iplist< NodeTy, Traits >::insert().
Referenced by llvm::FoldBranchToCommonDest(), INITIALIZE_PASS(), llvm::UnrollRuntimeLoopProlog(), and llvm::InstCombiner::visitUDiv().
|
inline |
isArithmeticShift - Return true if this is an arithmetic shift right.
Definition at line 113 of file Instruction.h.
References getOpcode().
Referenced by llvm::InstCombiner::visitICmpInstWithInstAndIntCst().
bool Instruction::isAssociative | ( | ) | const |
isAssociative - 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 482 of file Instruction.cpp.
References getOpcode(), and hasUnsafeAlgebra().
Referenced by llvm::ConstantFoldBinaryInstruction(), LinearizeExprTree(), SimplifyAssociativeBinOp(), and SimplifyBinOp().
isAssociative - 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 477 of file Instruction.cpp.
References llvm::APIntOps::And(), llvm::APIntOps::Or(), and llvm::APIntOps::Xor().
|
inline |
Definition at line 87 of file Instruction.h.
References getOpcode(), and isBinaryOp().
Referenced by llvm::BinaryOperator::classof(), llvm::ConstantFoldInstOperands(), and isBinaryOp().
Definition at line 97 of file Instruction.h.
|
inline |
Definition at line 89 of file Instruction.h.
References getOpcode(), and isCast().
Referenced by llvm::CastInst::classof(), llvm::ConstantCreator< ConstantExpr, Type, ExprMapKeyType >::create(), foldConstantCastPair(), llvm::InstCombiner::FoldSelectOpOp(), llvm::ConstantExpr::getCast(), isCast(), llvm::ConstantExpr::isCast(), WriteConstants(), and WriteInstruction().
Determine if the OpCode is one of the CastInst instructions.
Definition at line 118 of file Instruction.h.
|
inline |
isCommutative - Return true if the instruction is commutative:
Commutative operators satisfy: (x op y) === (y op x)
In LLVM, these are the associative operators, plus SetEQ and SetNE, when applied to any type.
Definition at line 269 of file Instruction.h.
References getOpcode(), and isCommutative().
Referenced by llvm::ConstantFoldBinaryInstruction(), ExpandBinOp(), FactorizeBinOp(), llvm::InstCombiner::FoldSelectOpOp(), isCommutative(), LinearizeExprTree(), RightDistributesOverLeft(), SimplifyAssociativeBinOp(), llvm::BinaryOperator::swapOperands(), and ThreadBinOpOverSelect().
isCommutative - Return true if the instruction is commutative:
Commutative operators satisfy: (x op y) === (y op x)
In LLVM, these are the associative operators, plus SetEQ and SetNE, when applied to any type.
Definition at line 503 of file Instruction.cpp.
References llvm::APIntOps::And(), llvm::APIntOps::Or(), and llvm::APIntOps::Xor().
|
inline |
isIdempotent - 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 278 of file Instruction.h.
References getOpcode(), and isIdempotent().
Referenced by IncorporateWeight(), and isIdempotent().
isIdempotent - 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 524 of file Instruction.cpp.
References llvm::APIntOps::And(), and llvm::APIntOps::Or().
bool Instruction::isIdenticalTo | ( | const Instruction * | I | ) | const |
isIdenticalTo - 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 264 of file Instruction.cpp.
References isIdenticalToWhenDefined(), and llvm::Value::SubclassOptionalData.
Referenced by checkCSEInPredecessor().
bool Instruction::isIdenticalToWhenDefined | ( | const Instruction * | I | ) | const |
isIdenticalToWhenDefined - This is like isIdenticalTo, except that it ignores the SubclassOptionalData flags, which specify conditions under which the instruction's result is undefined.
Definition at line 272 of file Instruction.cpp.
References llvm::Intrinsic::getAttributes(), llvm::PHINode::getIncomingBlock(), llvm::User::getNumOperands(), getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), I, and LI.
Referenced by HoistThenElseCodeToIf(), and isIdenticalTo().
|
inline |
isLogicalShift - Return true if this is a logical shift left or a logical shift right.
Definition at line 108 of file Instruction.h.
References getOpcode().
Referenced by CollectBSwapParts(), llvm::InstCombiner::FoldShiftByConstant(), and llvm::InstCombiner::visitICmpInstWithInstAndIntCst().
|
inline |
isNilpotent - 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 290 of file Instruction.h.
References getOpcode(), and isNilpotent().
Referenced by IncorporateWeight(), and isNilpotent().
isNilpotent - 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 537 of file Instruction.cpp.
References llvm::APIntOps::Xor().
bool Instruction::isSameOperationAs | ( | const Instruction * | I, |
unsigned | flags = 0 |
||
) | const |
Determine if one instruction is the same operation as another.
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 334 of file Instruction.cpp.
References CompareIgnoringAlignment, CompareUsingScalarTypes, llvm::Intrinsic::getAttributes(), llvm::User::getNumOperands(), getOpcode(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::Value::getType(), I, and LI.
Referenced by SinkThenElseCodeToEnd().
|
inline |
Definition at line 88 of file Instruction.h.
References getOpcode(), and isShift().
Referenced by llvm::InstCombiner::FoldShiftByConstant(), isShift(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), and llvm::InstCombiner::visitXor().
Determine if the Opcode is one of the shift instructions.
Definition at line 102 of file Instruction.h.
|
inline |
Definition at line 86 of file Instruction.h.
References getOpcode(), and isTerminator().
Referenced by llvm::TerminatorInst::classof(), isTerminator(), llvm::MemoryDependenceAnalysis::removeInstruction(), and SimplifyCondBranchToTwoReturns().
Definition at line 93 of file Instruction.h.
bool Instruction::isUsedOutsideOfBlock | ( | const BasicBlock * | BB | ) | const |
isUsedOutsideOfBlock - 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.
isUsedOutsideOfBlock - Return true if there are any uses of I outside of the specified block. Note that PHI nodes are considered to evaluate their operands in the corresponding predecessor block.
Definition at line 401 of file Instruction.cpp.
References llvm::dyn_cast(), llvm::PHINode::getIncomingBlock(), llvm::Value::use_begin(), and llvm::Value::use_end().
|
inline |
mayHaveSideEffects - 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 used the returned value. For cases where this matters, isSafeToSpeculativelyExecute may be more appropriate.
Definition at line 324 of file Instruction.h.
References mayReturn(), mayThrow(), and mayWriteToMemory().
Referenced by InstructionWillNotHaveChain(), llvm::isInstructionTriviallyDead(), llvm::isInTailCallPosition(), IsSafeComputationToRemove(), isSafePHIToSpeculate(), isSafeToSpeculateStore(), SinkThenElseCodeToEnd(), SpeculativelyExecuteBB(), and TryToSinkInstruction().
bool Instruction::mayReadFromMemory | ( | ) | const |
mayReadFromMemory - Return true if this instruction may read memory.
Definition at line 421 of file Instruction.cpp.
References llvm::Call, getOpcode(), llvm::SPII::Load, and llvm::SPII::Store.
Referenced by llvm::DependenceAnalysis::depends(), GetLocation(), llvm::DependenceAnalysis::getSplitIteration(), hasConcreteDefImpl(), InstructionWillNotHaveChain(), llvm::Dependence::isAnti(), llvm::Dependence::isFlow(), llvm::Dependence::isInput(), llvm::isInTailCallPosition(), llvm::Loop::makeLoopInvariant(), mayReadOrWriteMemory(), and TryToSinkInstruction().
|
inline |
mayReadOrWriteMemory - Return true if this instruction may read or write memory.
Definition at line 304 of file Instruction.h.
References mayReadFromMemory(), and mayWriteToMemory().
Referenced by llvm::AliasSetTracker::addUnknown(), llvm::AliasSet::aliasesUnknownInst(), llvm::AliasSetTracker::deleteValue(), llvm::AliasSetTracker::removeUnknown(), and SinkThenElseCodeToEnd().
bool Instruction::mayReturn | ( | ) | const |
mayReturn - Return true if this is a function that may return. this is true for all normal instructions. The only exception is functions that are marked with the 'noreturn' attribute.
Definition at line 465 of file Instruction.cpp.
Referenced by mayHaveSideEffects().
bool Instruction::mayThrow | ( | ) | const |
mayThrow - Return true if this instruction may throw an exception.
Definition at line 459 of file Instruction.cpp.
Referenced by mayHaveSideEffects().
bool Instruction::mayWriteToMemory | ( | ) | const |
mayWriteToMemory - Return true if this instruction may modify memory.
Definition at line 441 of file Instruction.cpp.
References llvm::Call, getOpcode(), llvm::SPII::Load, and llvm::SPII::Store.
Referenced by llvm::DependenceAnalysis::depends(), llvm::FindAvailableLoadedValue(), FindInitTrampolineFromBB(), GetLocation(), llvm::DependenceAnalysis::getSplitIteration(), llvm::Dependence::isAnti(), llvm::Dependence::isFlow(), isFoldedOrDeadInstruction(), llvm::Dependence::isOutput(), isSafeToMove(), mayHaveSideEffects(), and mayReadOrWriteMemory().
void Instruction::moveBefore | ( | Instruction * | MovePos | ) |
moveBefore - 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 91 of file Instruction.cpp.
References llvm::BasicBlock::getInstList(), getParent(), and llvm::iplist< NodeTy, Traits >::splice().
Referenced by llvm::SCEVExpander::hoistIVInc(), llvm::Loop::makeLoopInvariant(), NegateValue(), llvm::NVPTXAllocaHoisting::runOnFunction(), tryToMoveFreeBeforeNullTest(), TryToSinkInstruction(), llvm::InstCombiner::visitAllocaInst(), and llvm::InstCombiner::visitSelectInstWithICmp().
void Instruction::removeFromParent | ( | ) |
removeFromParent - This method unlinks 'this' from the containing basic block, but does not delete it.
Definition at line 68 of file Instruction.cpp.
References llvm::BasicBlock::getInstList(), getParent(), and llvm::iplist< NodeTy, Traits >::remove().
|
inline |
setDebugLoc - Set the debug location information for this instruction.
Definition at line 175 of file Instruction.h.
Referenced by clone(), llvm::ConvertDebugDeclareToDebugValue(), ConvertShiftToMul(), createAndInstr(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), llvm::InlineFunction(), llvm::InstCombiner::InsertNewInstWith(), llvm::InsertPreheaderForLoop(), and llvm::IRBuilderBase::SetInstDebugLocation().
void Instruction::setFastMathFlags | ( | FastMathFlags | FMF | ) |
Convenience function for setting all the fast-math flags on this instruction, which must be an operator which supports these flags. See LangRef.html for the meaning of these flats.
Definition at line 137 of file Instruction.cpp.
Referenced by ClearSubclassDataAfterReassociation(), copyFastMathFlags(), and llvm::InstCombiner::visitFDiv().
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 129 of file Instruction.cpp.
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 113 of file Instruction.cpp.
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.
Set or clear the NoNaNs 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 106 of file Instruction.cpp.
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 121 of file Instruction.cpp.
void Instruction::setHasUnsafeAlgebra | ( | bool | B | ) |
Set or clear the unsafe-algebra 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 99 of file Instruction.cpp.
|
inlineprotected |
Definition at line 436 of file Instruction.h.
Referenced by llvm::CmpInst::setPredicate().
setMetadata - Set the metadata of the specified kind to the specified node. This updates/replaces metadata if already present, or removes it if Node is null.
setMetadata - Set the metadata of of the specified kind to the specified node. This updates/replaces metadata if already present, or removes it if Node is null.
Definition at line 589 of file Metadata.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorBase::empty(), llvm::Value::getContext(), llvm::DebugLoc::getFromDILocation(), hasMetadata(), llvm::LLVMContext::MD_dbg, llvm::LLVMContextImpl::MetadataStore, llvm::LLVMContext::pImpl, llvm::SmallVectorTemplateBase< T, isPodLike >::pop_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by AppendMDNodeToInstForPtr(), clone(), llvm::ConstantFoldTerminator(), llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), EliminateDeadSwitchCases(), llvm::FoldBranchToCommonDest(), llvm::RemapInstruction(), llvm::Loop::setLoopID(), setMetadata(), SimplifyCondBranchToCondBranch(), SimplifyTerminatorOnSelect(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::SplitBlockAndInsertIfThen(), llvm::BranchInst::swapSuccessors(), tryToMakeAllocaBePromotable(), TryToSimplifyUncondBranchWithICmpInIt(), TurnSwitchRangeIntoICmp(), llvm::UpgradeInstWithTBAATag(), and llvm::UpgradeIntrinsicCall().
Definition at line 577 of file Metadata.cpp.
References llvm::Value::getContext(), hasMetadata(), and setMetadata().
|
inline |
use_back - Specialize the methods defined in Value, as we know that an instruction can only be used by other instructions.
Definition at line 49 of file Instruction.h.
References llvm::Value::use_begin().
Referenced by DeadPHICycle(), llvm::DemoteRegToStack(), llvm::InstCombiner::DoOneIteration(), OptimizeGlobalAddressOfMalloc(), promoteSingleBlockAlloca(), ShouldBreakUpSubtract(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::FastISel::tryToFoldLoad(), tryToMakeAllocaBePromotable(), TryToSimplifyUncondBranchWithICmpInIt(), llvm::InstCombiner::visitInsertElementInst(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitSExt(), and llvm::InstCombiner::visitZExt().
|
inline |
Definition at line 50 of file Instruction.h.
References llvm::Value::use_begin().
|
friend |
Definition at line 429 of file Instruction.h.