LLVM API Documentation
#include <Instruction.h>
Definition at line 33 of file Instruction.h.
Definition at line 425 of file Instruction.h.
Definition at line 439 of file Instruction.h.
Definition at line 432 of file Instruction.h.
When checking for operation equivalence (using isSameOperationAs) it is sometimes useful to ignore certain attributes.
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 385 of file Instruction.h.
Definition at line 446 of file Instruction.h.
Definition at line 418 of file Instruction.h.
Definition at line 55 of file Instruction.cpp.
Instruction::Instruction | ( | Type * | Ty, |
unsigned | iType, | ||
Use * | Ops, | ||
unsigned | NumOps, | ||
Instruction * | InsertBefore = nullptr |
||
) | [protected] |
Definition at line 24 of file Instruction.cpp.
References llvm::LeakDetector::addGarbageObject(), llvm::BasicBlock::getInstList(), getParent(), and llvm::iplist< NodeTy, Traits >::insert().
Instruction::Instruction | ( | Type * | Ty, |
unsigned | iType, | ||
Use * | Ops, | ||
unsigned | NumOps, | ||
BasicBlock * | InsertAtEnd | ||
) | [protected] |
Definition at line 42 of file Instruction.cpp.
References llvm::LeakDetector::addGarbageObject(), llvm::BasicBlock::getInstList(), and llvm::iplist< NodeTy, Traits >::push_back().
static bool llvm::Instruction::classof | ( | const Value * | V | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::User.
Reimplemented 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::CmpInst, llvm::AtomicRMWInst, llvm::CastInst, llvm::AtomicCmpXchgInst, llvm::FenceInst, llvm::StoreInst, llvm::BinaryOperator, llvm::VACopyInst, llvm::VAEndInst, llvm::VAStartInst, llvm::MemMoveInst, llvm::LoadInst, llvm::MemCpyInst, llvm::MemTransferInst, llvm::MemSetInst, llvm::MemIntrinsic, llvm::AllocaInst, llvm::UnaryInstruction, llvm::DbgValueInst, llvm::DbgDeclareInst, llvm::TerminatorInst, llvm::DbgInfoIntrinsic, and llvm::IntrinsicInst.
Definition at line 411 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: The instruction has no parent The instruction has no name
Definition at line 543 of file Instruction.cpp.
References clone_impl(), getAllMetadataOtherThanDebugLoc(), getDebugLoc(), hasMetadata(), setDebugLoc(), setMetadata(), and llvm::Value::SubclassOptionalData.
Referenced by llvm::CloneBasicBlock(), llvm::FoldBranchToCommonDest(), llvm::FoldReturnIntoUncondBranch(), HoistThenElseCodeToIf(), llvm::SplitLandingPadPredecessors(), and llvm::InstCombiner::visitGetElementPtrInst().
virtual Instruction* llvm::Instruction::clone_impl | ( | ) | const [protected, pure 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::LoadInst, llvm::BinaryOperator, llvm::AllocaInst, and llvm::TerminatorInst.
Referenced by clone().
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 146 of file Instruction.cpp.
Referenced by llvm::BinaryOperator::andIRFlags(), copyFastMathFlags(), llvm::BinaryOperator::copyIRFlags(), FoldOperationIntoSelectOperand(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitFPTrunc(), and llvm::InstCombiner::visitFSub().
void Instruction::copyFastMathFlags | ( | const Instruction * | I | ) |
Copy I's fast-math flags.
Definition at line 190 of file Instruction.cpp.
References copyFastMathFlags(), and getFastMathFlags().
void Instruction::dropUnknownMetadata | ( | ArrayRef< unsigned > | KnownIDs | ) |
Drop unknown metadata. Passes are required to drop metadata they don't understand. This is a convenience method for passes to do so.
Definition at line 622 of file Metadata.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::ArrayRef< T >::begin(), llvm::SmallSet< T, N, C >::count(), llvm::SmallSet< T, N, C >::empty(), llvm::ArrayRef< T >::end(), llvm::SmallSet< T, N, C >::erase(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT >, KeyT, ValueT, KeyInfoT >::erase(), llvm::Value::getContext(), I, llvm::SmallSet< T, N, C >::insert(), llvm::LLVMContext::MD_dbg, llvm::LLVMContextImpl::MetadataStore, llvm::LLVMContext::pImpl, llvm::SmallVectorTemplateBase< T, isPodLike >::pop_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::combineMetadata(), and llvm::FoldBranchToCommonDest().
void llvm::Instruction::dropUnknownMetadata | ( | ) | [inline] |
Definition at line 187 of file Instruction.h.
References llvm::None.
Referenced by dropUnknownMetadata().
void llvm::Instruction::dropUnknownMetadata | ( | unsigned | ID1 | ) | [inline] |
Definition at line 190 of file Instruction.h.
References dropUnknownMetadata(), and llvm::makeArrayRef().
void llvm::Instruction::dropUnknownMetadata | ( | unsigned | ID1, |
unsigned | ID2 | ||
) | [inline] |
Definition at line 193 of file Instruction.h.
References dropUnknownMetadata().
void Instruction::eraseFromParent | ( | ) |
eraseFromParent - This method unlinks 'this' from the containing basic block and deletes it.
Definition at line 76 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::expandDivisionUpTo64Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), llvm::expandRemainderUpTo64Bits(), 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::MergeBasicBlockIntoOnlyPred(), mergeEmptyReturnBlocks(), OptimizeCmpExpression(), OptimizeExtractBits(), OptimizeGlobalAddressOfMalloc(), 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(), simplifyOneLoop(), SinkCast(), SinkThenElseCodeToEnd(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::SplitLandingPadPredecessors(), llvm::StripDebugInfo(), SwitchToLookupTable(), tryPromoteAllocaToVector(), tryToMakeAllocaBePromotable(), TryToOptimizeStoreOfMallocToGlobal(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), TryToSimplifyUncondBranchWithICmpInIt(), TurnSwitchRangeIntoICmp(), llvm::UnrollLoop(), llvm::UpgradeIntrinsicCall(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().
void Instruction::getAAMetadata | ( | AAMDNodes & | N, |
bool | Merge = false |
||
) | const |
getAAMetadata - 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 615 of file TypeBasedAliasAnalysis.cpp.
References getMetadata(), llvm::MDNode::getMostGenericTBAA(), llvm::MDNode::intersect(), llvm::LLVMContext::MD_alias_scope, llvm::LLVMContext::MD_noalias, llvm::LLVMContext::MD_tbaa, llvm::AAMDNodes::NoAlias, llvm::AAMDNodes::Scope, and llvm::AAMDNodes::TBAA.
Referenced by llvm::AliasSetTracker::add(), llvm::FastISel::createMachineMemOperandFor(), llvm::AliasAnalysis::getLocation(), llvm::AliasAnalysis::getLocationForSource(), llvm::AliasSetTracker::remove(), speculatePHINodeLoads(), speculateSelectInstLoads(), and tryToMakeAllocaBePromotable().
void llvm::Instruction::getAllMetadata | ( | SmallVectorImpl< std::pair< unsigned, MDNode * > > & | MDs | ) | const [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 159 of file Instruction.h.
References hasMetadata().
Referenced by llvm::AssemblyWriter::printInstruction(), and llvm::RemapInstruction().
void llvm::Instruction::getAllMetadataOtherThanDebugLoc | ( | SmallVectorImpl< std::pair< unsigned, MDNode * > > & | MDs | ) | const [inline] |
getAllMetadataOtherThanDebugLoc - This does the same thing as getAllMetadata, except that it filters out the debug location.
Definition at line 166 of file Instruction.h.
References hasMetadataOtherThanDebugLoc().
Referenced by clone(), llvm::combineMetadata(), and llvm::TypeFinder::run().
const DataLayout * Instruction::getDataLayout | ( | ) | const |
Definition at line 38 of file Instruction.cpp.
References llvm::BasicBlock::getDataLayout(), and getParent().
const DebugLoc& llvm::Instruction::getDebugLoc | ( | ) | const [inline] |
getDebugLoc - Return the debug location for this node as a DebugLoc.
Definition at line 206 of file Instruction.h.
Referenced by changeToCall(), changeToUnreachable(), clone(), llvm::ConvertDebugDeclareToDebugValue(), ConvertShiftToMul(), createAndInstr(), llvm::InstCombiner::DoOneIteration(), emitAnalysis(), fixupLineNumbers(), llvm::SelectionDAGBuilder::getCurDebugLoc(), llvm::SDLoc::getDebugLoc(), GetLoadValueForLoad(), llvm::Loop::getStartLoc(), HandleCallsInBlockInlinedThroughInvoke(), llvm::InlineFunction(), llvm::InstCombiner::InsertNewInstWith(), llvm::InsertPreheaderForLoop(), llvm::IRBuilder< true, TargetFolder >::IRBuilder(), llvm::LowerDbgDeclare(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::Inliner::runOnSCC(), llvm::FastISel::selectInstruction(), llvm::FastISel::selectOperator(), llvm::FunctionLoweringInfo::set(), llvm::IRBuilderBase::SetInsertPoint(), SimplifyTerminatorOnSelect(), llvm::SplitBlockAndInsertIfThen(), llvm::SplitBlockAndInsertIfThenElse(), 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 flags.
Definition at line 184 of file Instruction.cpp.
Referenced by llvm::BinaryOperator::andIRFlags(), ClearSubclassDataAfterReassociation(), copyFastMathFlags(), llvm::SimplifyInstruction(), llvm::InstCombiner::visitFAdd(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitFSub(), and llvm::InstCombiner::visitSelectInst().
MDNode* llvm::Instruction::getMetadata | ( | unsigned | KindID | ) | const [inline] |
getMetadata - Get the metadata of given kind attached to this Instruction. If the metadata is not found then return null.
Definition at line 144 of file Instruction.h.
References hasMetadata().
Referenced by AddAliasScopeMetadata(), CloneAliasScopeMetadata(), llvm::combineMetadata(), llvm::FastISel::createMachineMemOperandFor(), llvm::DiagnosticInfoInlineAsm::DiagnosticInfoInlineAsm(), ExtractBranchMetadata(), getAAMetadata(), llvm::getAlign(), GetBranchWeights(), llvm::AliasAnalysis::getLocationForDest(), llvm::Loop::getLoopID(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), HasBranchWeights(), isInterestingMemoryAccess(), isVtableAccess(), llvm::BranchInst::swapSuccessors(), and llvm::UpgradeInstWithTBAATag().
MDNode* llvm::Instruction::getMetadata | ( | StringRef | Kind | ) | const [inline] |
getMetadata - Get the metadata of given kind attached to this Instruction. If the metadata is not found then return null.
Definition at line 151 of file Instruction.h.
References hasMetadata().
unsigned llvm::Instruction::getOpcode | ( | ) | const [inline] |
getOpcode() returns a member of one of the enums like Instruction::Add.
Reimplemented in llvm::SelectInst, llvm::CmpInst, llvm::CastInst, and llvm::BinaryOperator.
Definition at line 87 of file Instruction.h.
References llvm::Value::getValueID(), and llvm::Value::InstructionVal.
Referenced by BuildNew(), CanEvaluateSExtd(), CanEvaluateShifted(), CanEvaluateShuffled(), CanEvaluateTruncated(), CanEvaluateZExtd(), CanPHITrans(), canVectorizeInst(), CheapToScalarize(), llvm::OverflowingBinaryOperator::classof(), llvm::UnaryInstruction::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::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(), 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::SelectInst::getOpcode(), getOpcodeName(), GetSelectFoldableConstant(), GetSelectFoldableOperands(), GetShiftedValue(), llvm::FastISel::hasTrivialKill(), haveSameSpecialState(), llvm::InlineFunction(), isAllocSiteRemovable(), isArithmeticShift(), isAssociative(), isAtomic(), isBinaryOp(), isCast(), isCommutative(), isExtractBitsCandidateUse(), isFMulOrFDivWithConstant(), isHighCostExpansion(), isIdempotent(), isIdenticalToWhenDefined(), isLogicalShift(), isNilpotent(), isSameOperationAs(), isShift(), isTerminator(), isUnmovableInstruction(), LookThroughFPExtensions(), mayReadFromMemory(), mayWriteToMemory(), llvm::PointerMayBeCaptured(), PrintOps(), llvm::FastISel::selectInstruction(), SimplifyBranchOnICmpChain(), llvm::SimplifyInstruction(), SimplifyWithOpReplaced(), SinkShiftAndTruncate(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), ThreadBinOpOverSelect(), tryPromoteAllocaToVector(), llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >::visit(), llvm::SelectionDAGBuilder::visit(), llvm::Interpreter::visitAllocaInst(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitSwitchInst(), and WriteInstruction().
const char* llvm::Instruction::getOpcodeName | ( | ) | const [inline] |
Definition at line 89 of file Instruction.h.
References getOpcode(), and getOpcodeName().
Referenced by getOpcodeName(), llvm::AssemblyWriter::printInstruction(), and PrintOps().
const char * Instruction::getOpcodeName | ( | unsigned | OpCode | ) | [static] |
Definition at line 195 of file Instruction.cpp.
References llvm::AddrSpaceCast, llvm::Alloca, llvm::APIntOps::And(), llvm::Call, ExtractElement(), llvm::ExtractValue, llvm::FCmp, llvm::FPExt, llvm::FPToSI, llvm::InsertElement, llvm::IntToPtr, llvm::LandingPad, llvm::SPII::Load, llvm::LShr, llvm::APIntOps::Or(), llvm::TargetOpcode::PHI, llvm::MipsISD::Ret, llvm::MCID::Select, llvm::SExt, llvm::SIToFP, llvm::SPII::Store, llvm::Trunc, llvm::VAArg, and llvm::APIntOps::Xor().
const BasicBlock* llvm::Instruction::getParent | ( | ) | const [inline] |
Definition at line 54 of file Instruction.h.
Referenced by llvm::IVUsers::AddUsersImpl(), BlockIsSimpleEnoughToThreadThrough(), canConstantEvolve(), llvm::AliasAnalysis::canInstructionRangeModify(), CanSelectOperandBeMappingIntoPredBlock(), changeToCall(), changeToUnreachable(), llvm::CloneAndPruneFunctionInto(), ConstructSSAForLoadSet(), 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(), getDataLayout(), llvm::MemoryDependenceAnalysis::getDependency(), getFirstInst(), getInsertPointForUses(), llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), GetLoadValueForLoad(), getLoopPhiForCounter(), GetMemInstValueForLoad(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), llvm::DependenceAnalysis::getSplitIteration(), GetStoreValueForLoad(), HandleByValArgument(), HandleInlinedInvoke(), llvm::FastISel::hasTrivialKill(), llvm::SCEVExpander::hoistIVInc(), HoistThenElseCodeToIf(), InBlock(), InlineCallIfPossible(), llvm::InlineFunction(), insertAfter(), insertBefore(), llvm::InstCombiner::InsertNewInstBefore(), Instruction(), isDynamicConstant(), llvm::isInTailCallPosition(), isInteresting(), llvm::Loop::isLCSSAForm(), isLoopInvariant(), IsNonLocalValue(), llvm::isPotentiallyReachable(), isProfitableToFoldUnconditional(), llvm::DominatorTree::isReachableFromEntry(), isSafeAndProfitableToSinkLoad(), isSafePHIToSpeculate(), llvm::isSafeToLoadUnconditionally(), llvm::isSafeToSpeculativelyExecute(), llvm::AllocaInst::isStaticAlloca(), llvm::Value::isUsedInBasicBlock(), isUsedOutsideOfBlock(), isUsedOutsideOfDefiningBlock(), isValidAssumeForContext(), IVUseShouldUsePostIncValue(), LdStHasDebugValue(), LLVMGetNextInstruction(), LLVMGetPreviousInstruction(), LLVMPositionBuilderBefore(), LowerAtomicCmpXchgInst(), LowerAtomicRMWInst(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::IntrinsicLowering::LowerToByteSwap(), moveBefore(), NegateValue(), OptimizeCmpExpression(), OptimizeExtractBits(), parentFunctionOfValue(), passingValueIsAlwaysUndefined(), PerformHeapAllocSRoA(), llvm::PHITransAddr::PHITranslateValue(), PrintOps(), processInstruction(), ProcessUAddIdiom(), ProcessUGT_ADDCST_ADD(), ProcessUMulZExtIdiom(), promoteSingleBlockAlloca(), llvm::AssumptionTracker::registerAssumption(), removeFromParent(), replaceAndRecursivelySimplifyImpl(), ReplaceCallWith(), llvm::replaceDbgDeclareForAlloca(), llvm::ReplaceInstWithInst(), llvm::LoopInfo::replacementPreservesLCSSAForm(), rewriteSingleStoreAlloca(), llvm::SSAUpdater::RewriteUse(), llvm::SSAUpdater::RewriteUseAfterInsertions(), RewriteUsesOfClonedInstructions(), llvm::LoadAndStorePromoter::run(), safeCxtI(), SafeToMergeTerminators(), llvm::FastISel::selectInstruction(), llvm::IRBuilderBase::SetInsertPoint(), SimplifyBranchOnICmpChain(), SimplifyCondBranchToCondBranch(), SimplifyCondBranchToTwoReturns(), llvm::InstCombiner::SimplifyDivRemOfSelect(), simplifyOneLoop(), SimplifyTerminatorOnSelect(), llvm::simplifyUsersOfIV(), SinkCast(), SinkShiftAndTruncate(), SinkThenElseCodeToEnd(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SparseSolver::Solve(), SpeculativelyExecuteBB(), llvm::SplitBlockAndInsertIfThen(), llvm::SplitBlockAndInsertIfThenElse(), 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::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitPHINode(), and llvm::InstCombiner::visitStoreInst().
BasicBlock* llvm::Instruction::getParent | ( | ) | [inline] |
Definition at line 55 of file Instruction.h.
unsigned llvm::Instruction::getSubclassDataFromInstruction | ( | ) | const [inline, protected] |
Definition at line 479 of file Instruction.h.
Referenced by llvm::AllocaInst::getAlignment(), llvm::LoadInst::getAlignment(), llvm::StoreInst::getAlignment(), llvm::CallInst::getCallingConv(), llvm::AtomicCmpXchgInst::getFailureOrdering(), llvm::LoadInst::getOrdering(), llvm::StoreInst::getOrdering(), llvm::CmpInst::getPredicate(), llvm::AtomicCmpXchgInst::getSuccessOrdering(), llvm::LoadInst::getSynchScope(), llvm::StoreInst::getSynchScope(), llvm::AtomicCmpXchgInst::getSynchScope(), llvm::CallInst::getTailCallKind(), llvm::CallInst::isMustTailCall(), llvm::CallInst::isTailCall(), llvm::AllocaInst::isUsedWithInAlloca(), llvm::LoadInst::isVolatile(), llvm::StoreInst::isVolatile(), llvm::AtomicCmpXchgInst::isVolatile(), llvm::AtomicCmpXchgInst::isWeak(), llvm::AllocaInst::setAlignment(), llvm::LoadInst::setAlignment(), llvm::StoreInst::setAlignment(), llvm::CallInst::setCallingConv(), llvm::AtomicCmpXchgInst::setFailureOrdering(), llvm::LoadInst::setOrdering(), llvm::StoreInst::setOrdering(), llvm::AtomicCmpXchgInst::setSuccessOrdering(), llvm::LoadInst::setSynchScope(), llvm::StoreInst::setSynchScope(), llvm::AtomicCmpXchgInst::setSynchScope(), llvm::CallInst::setTailCall(), llvm::CallInst::setTailCallKind(), llvm::AllocaInst::setUsedWithInAlloca(), llvm::LoadInst::setVolatile(), llvm::StoreInst::setVolatile(), llvm::AtomicCmpXchgInst::setVolatile(), and llvm::AtomicCmpXchgInst::setWeak().
bool Instruction::hasAllowReciprocal | ( | ) | const |
Determine whether the allow-reciprocal flag is set.
Definition at line 176 of file Instruction.cpp.
Referenced by llvm::InstCombiner::visitFDiv().
bool llvm::Instruction::hasMetadata | ( | ) | const [inline] |
hasMetadata() - Return true if this instruction has any metadata attached to it.
Definition at line 132 of file Instruction.h.
References llvm::DebugLoc::isUnknown().
Referenced by clone(), getAllMetadata(), getMetadata(), and setMetadata().
bool llvm::Instruction::hasMetadataOtherThanDebugLoc | ( | ) | const [inline] |
hasMetadataOtherThanDebugLoc - Return true if this instruction has metadata attached to it other than a debug location.
Definition at line 138 of file Instruction.h.
Referenced by getAllMetadataOtherThanDebugLoc().
bool Instruction::hasNoInfs | ( | ) | const |
Determine whether the no-infs flag is set.
Definition at line 164 of file Instruction.cpp.
Referenced by SimplifyFAddInst().
bool Instruction::hasNoNaNs | ( | ) | const |
Determine whether the no-NaNs flag is set.
Definition at line 158 of file Instruction.cpp.
Referenced by SimplifyFAddInst().
bool Instruction::hasNoSignedZeros | ( | ) | const |
Determine whether the no-signed-zeros flag is set.
Definition at line 170 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 152 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 88 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 82 of file Instruction.cpp.
References llvm::BasicBlock::getInstList(), getParent(), and llvm::iplist< NodeTy, Traits >::insert().
Referenced by llvm::FoldBranchToCommonDest(), INITIALIZE_PASS(), and llvm::InstCombiner::visitUDiv().
bool llvm::Instruction::isArithmeticShift | ( | ) | const [inline] |
isArithmeticShift - Return true if this is an arithmetic shift right.
Definition at line 117 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 484 of file Instruction.cpp.
References getOpcode(), and hasUnsafeAlgebra().
Referenced by llvm::ConstantFoldBinaryInstruction(), LinearizeExprTree(), SimplifyAssociativeBinOp(), and SimplifyBinOp().
bool Instruction::isAssociative | ( | unsigned | Opcode | ) | [static] |
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 479 of file Instruction.cpp.
References llvm::APIntOps::And(), llvm::APIntOps::Or(), and llvm::APIntOps::Xor().
bool Instruction::isAtomic | ( | ) | const |
isAtomic - Return true if this instruction has an AtomicOrdering of unordered or higher.
Definition at line 446 of file Instruction.cpp.
References getOpcode(), llvm::SPII::Load, llvm::NotAtomic, and llvm::SPII::Store.
Referenced by llvm::LoadInst::isSimple(), and llvm::StoreInst::isSimple().
bool llvm::Instruction::isBinaryOp | ( | ) | const [inline] |
Definition at line 91 of file Instruction.h.
References getOpcode(), and isBinaryOp().
Referenced by llvm::BinaryOperator::classof(), llvm::ConstantFoldInstOperands(), and isBinaryOp().
static bool llvm::Instruction::isBinaryOp | ( | unsigned | Opcode | ) | [inline, static] |
Definition at line 101 of file Instruction.h.
bool llvm::Instruction::isCast | ( | ) | const [inline] |
Definition at line 93 of file Instruction.h.
References getOpcode(), and isCast().
Referenced by llvm::CastInst::classof(), llvm::ConstantExprKeyType::create(), foldConstantCastPair(), llvm::InstCombiner::FoldSelectOpOp(), llvm::ConstantExpr::getCast(), isCast(), WriteConstants(), and WriteInstruction().
static bool llvm::Instruction::isCast | ( | unsigned | OpCode | ) | [inline, static] |
Determine if the OpCode is one of the CastInst instructions.
Definition at line 122 of file Instruction.h.
bool llvm::Instruction::isCommutative | ( | ) | const [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.
Reimplemented in llvm::FCmpInst, llvm::ICmpInst, and llvm::CmpInst.
Definition at line 302 of file Instruction.h.
References getOpcode(), and isCommutative().
Referenced by llvm::ConstantFoldBinaryInstruction(), ExpandBinOp(), llvm::InstCombiner::FoldSelectOpOp(), isCommutative(), LinearizeExprTree(), RightDistributesOverLeft(), SimplifyAssociativeBinOp(), llvm::BinaryOperator::swapOperands(), ThreadBinOpOverSelect(), and tryFactorization().
bool Instruction::isCommutative | ( | unsigned | op | ) | [static] |
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 505 of file Instruction.cpp.
References llvm::APIntOps::And(), llvm::APIntOps::Or(), and llvm::APIntOps::Xor().
bool llvm::Instruction::isIdempotent | ( | ) | const [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 311 of file Instruction.h.
References getOpcode(), and isIdempotent().
Referenced by IncorporateWeight(), and isIdempotent().
bool Instruction::isIdempotent | ( | unsigned | Opcode | ) | [static] |
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 526 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 326 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 334 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 HoistThenElseCodeToIf(), and isIdenticalTo().
bool llvm::Instruction::isLogicalShift | ( | ) | const [inline] |
isLogicalShift - Return true if this is a logical shift left or a logical shift right.
Definition at line 112 of file Instruction.h.
References getOpcode(), and llvm::LShr.
Referenced by CollectBSwapParts(), and llvm::InstCombiner::FoldShiftByConstant().
bool llvm::Instruction::isNilpotent | ( | ) | const [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 323 of file Instruction.h.
References getOpcode(), and isNilpotent().
Referenced by IncorporateWeight(), and isNilpotent().
bool Instruction::isNilpotent | ( | unsigned | Opcode | ) | [static] |
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 539 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 361 of file Instruction.cpp.
References CompareIgnoringAlignment, CompareUsingScalarTypes, llvm::User::getNumOperands(), getOpcode(), llvm::User::getOperand(), llvm::Type::getScalarType(), llvm::Value::getType(), and haveSameSpecialState().
Referenced by SinkThenElseCodeToEnd().
bool llvm::Instruction::isShift | ( | ) | [inline] |
Definition at line 92 of file Instruction.h.
References getOpcode(), and isShift().
Referenced by llvm::InstCombiner::FoldShiftByConstant(), isShift(), and llvm::InstCombiner::visitICmpInstWithInstAndIntCst().
static bool llvm::Instruction::isShift | ( | unsigned | Opcode | ) | [inline, static] |
Determine if the Opcode is one of the shift instructions.
Definition at line 106 of file Instruction.h.
bool llvm::Instruction::isTerminator | ( | ) | const [inline] |
Definition at line 90 of file Instruction.h.
References getOpcode(), and isTerminator().
Referenced by llvm::TerminatorInst::classof(), isTerminator(), llvm::MemoryDependenceAnalysis::removeInstruction(), and SimplifyCondBranchToTwoReturns().
static bool llvm::Instruction::isTerminator | ( | unsigned | OpCode | ) | [inline, static] |
Definition at line 97 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 388 of file Instruction.cpp.
References llvm::dyn_cast(), getParent(), I, and llvm::Value::uses().
bool llvm::Instruction::mayHaveSideEffects | ( | ) | const [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 362 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 408 of file Instruction.cpp.
References llvm::Call, getOpcode(), llvm::SPII::Load, llvm::SPII::Store, and llvm::VAArg.
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().
bool llvm::Instruction::mayReadOrWriteMemory | ( | ) | const [inline] |
mayReadOrWriteMemory - Return true if this instruction may read or write memory.
Definition at line 337 of file Instruction.h.
References mayReadFromMemory(), and mayWriteToMemory().
Referenced by llvm::AliasSetTracker::addUnknown(), llvm::AliasSet::aliasesUnknownInst(), CloneAliasScopeMetadata(), llvm::AliasSetTracker::deleteValue(), llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(), 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 467 of file Instruction.cpp.
Referenced by mayHaveSideEffects().
bool Instruction::mayThrow | ( | ) | const |
mayThrow - Return true if this instruction may throw an exception.
Definition at line 461 of file Instruction.cpp.
Referenced by mayHaveSideEffects().
bool Instruction::mayWriteToMemory | ( | ) | const |
mayWriteToMemory - Return true if this instruction may modify memory.
Definition at line 428 of file Instruction.cpp.
References llvm::Call, getOpcode(), llvm::SPII::Load, llvm::SPII::Store, and llvm::VAArg.
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 95 of file Instruction.cpp.
References llvm::BasicBlock::getInstList(), getParent(), and llvm::iplist< NodeTy, Traits >::splice().
Referenced by hoistBeforePos(), 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 72 of file Instruction.cpp.
References llvm::BasicBlock::getInstList(), getParent(), and llvm::iplist< NodeTy, Traits >::remove().
void Instruction::setAAMetadata | ( | const AAMDNodes & | N | ) |
setAAMetadata - Sets the metadata on this instruction from the AAMDNodes structure.
Definition at line 725 of file Metadata.cpp.
References llvm::LLVMContext::MD_alias_scope, llvm::LLVMContext::MD_noalias, llvm::LLVMContext::MD_tbaa, llvm::AAMDNodes::NoAlias, llvm::AAMDNodes::Scope, setMetadata(), and llvm::AAMDNodes::TBAA.
Referenced by speculatePHINodeLoads(), speculateSelectInstLoads(), and tryToMakeAllocaBePromotable().
void llvm::Instruction::setDebugLoc | ( | const DebugLoc & | Loc | ) | [inline] |
setDebugLoc - Set the debug location information for this instruction.
Definition at line 203 of file Instruction.h.
Referenced by clone(), llvm::ConvertDebugDeclareToDebugValue(), ConvertShiftToMul(), createAndInstr(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), llvm::InlineFunction(), llvm::InstCombiner::InsertNewInstWith(), llvm::InsertPreheaderForLoop(), LowerNegateToMultiply(), llvm::IRBuilderBase::SetInstDebugLocation(), llvm::SplitBlockAndInsertIfThen(), and llvm::SplitBlockAndInsertIfThenElse().
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.
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 141 of file Instruction.cpp.
Referenced by ClearSubclassDataAfterReassociation(), CreateAdd(), CreateMul(), CreateNeg(), llvm::InstCombiner::visitFDiv(), and llvm::InstCombiner::visitSelectInst().
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 133 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 117 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 110 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 125 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 103 of file Instruction.cpp.
void llvm::Instruction::setInstructionSubclassData | ( | unsigned short | D | ) | [inline, protected] |
Definition at line 474 of file Instruction.h.
Referenced by llvm::CmpInst::setPredicate().
void Instruction::setMetadata | ( | unsigned | KindID, |
MDNode * | Node | ||
) |
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 669 of file Metadata.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::count(), llvm::SmallVectorBase::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::erase(), llvm::Value::getContext(), llvm::DebugLoc::getFromDILocation(), hasMetadata(), llvm::LLVMContext::MD_dbg, llvm::LLVMContextImpl::MetadataStore, Node, P, llvm::LLVMContext::pImpl, llvm::SmallVectorTemplateBase< T, isPodLike >::pop_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by AddAliasScopeMetadata(), clone(), CloneAliasScopeMetadata(), llvm::combineMetadata(), llvm::ConstantFoldTerminator(), llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), EliminateDeadSwitchCases(), llvm::FoldBranchToCommonDest(), llvm::RemapInstruction(), setAAMetadata(), llvm::Loop::setLoopID(), setMetadata(), SimplifyCondBranchToCondBranch(), SimplifyTerminatorOnSelect(), llvm::SplitBlockAndInsertIfThen(), llvm::SplitBlockAndInsertIfThenElse(), llvm::BranchInst::swapSuccessors(), TryToSimplifyUncondBranchWithICmpInIt(), TurnSwitchRangeIntoICmp(), llvm::UpgradeInstWithTBAATag(), and llvm::UpgradeIntrinsicCall().
void Instruction::setMetadata | ( | StringRef | Kind, |
MDNode * | Node | ||
) |
Definition at line 613 of file Metadata.cpp.
References llvm::Value::getContext(), hasMetadata(), and setMetadata().
Instruction* llvm::Instruction::user_back | ( | ) | [inline] |
user_back - Specialize the methods defined in Value, as we know that an instruction can only be used by other instructions.
Reimplemented from llvm::Value.
Definition at line 51 of file Instruction.h.
References llvm::Value::user_begin().
Referenced by DeadPHICycle(), llvm::DemoteRegToStack(), OptimizeGlobalAddressOfMalloc(), promoteSingleBlockAlloca(), ShouldBreakUpSubtract(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), speculatePHINodeLoads(), speculateSelectInstLoads(), llvm::FastISel::tryToFoldLoad(), tryToMakeAllocaBePromotable(), TryToSimplifyUncondBranchWithICmpInIt(), llvm::InstCombiner::visitInsertElementInst(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitSExt(), and llvm::InstCombiner::visitZExt().
const Instruction* llvm::Instruction::user_back | ( | ) | const [inline] |
Reimplemented from llvm::Value.
Definition at line 52 of file Instruction.h.
References llvm::Value::user_begin().
friend class SymbolTableListTraits< Instruction, BasicBlock > [friend] |
Definition at line 467 of file Instruction.h.