LLVM API Documentation
#include <Instructions.h>


Definition at line 1972 of file Instructions.h.
| typedef BasicBlock** llvm::PHINode::block_iterator |
Definition at line 2024 of file Instructions.h.
| typedef BasicBlock* const* llvm::PHINode::const_block_iterator |
Definition at line 2025 of file Instructions.h.
| PHINode::~PHINode | ( | ) |
Definition at line 96 of file Instructions.cpp.
References llvm::User::dropHungoffUses().
| void llvm::PHINode::addIncoming | ( | Value * | V, |
| BasicBlock * | BB | ||
| ) | [inline] |
addIncoming - Add an incoming value to the end of the PHI list
Definition at line 2094 of file Instructions.h.
References getType(), and llvm::Value::getType().
Referenced by AddPHINodeEntriesForMappedBlock(), llvm::SSAUpdaterTraits< SSAUpdater >::AddPHIOperand(), AddPredecessorToBlock(), ConnectProlog(), convertMemSetToLoop(), convertTransferToLoop(), createPHIsForSplitLoopExit(), generateUnsignedDivisionCode(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), llvm::InlineFunction(), insertFastDiv(), LLVMAddIncoming(), mergeEmptyReturnBlocks(), PerformHeapAllocSRoA(), SimplifyBranchOnICmpChain(), SimplifyCondBranchToCondBranch(), SinkThenElseCodeToEnd(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SplitLandingPadPredecessors(), tryToMakeAllocaBePromotable(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), TryToSimplifyUncondBranchWithICmpInIt(), llvm::UnrollLoop(), UpdatePHINodes(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().
Reimplemented from llvm::User.
Definition at line 100 of file Instructions.cpp.
References llvm::Use::initTags().
| block_iterator llvm::PHINode::block_begin | ( | ) | [inline] |
Definition at line 2027 of file Instructions.h.
Referenced by llvm::EliminateDuplicatePHINodes(), and removeIncomingValue().
| const_block_iterator llvm::PHINode::block_begin | ( | ) | const [inline] |
Definition at line 2033 of file Instructions.h.
| block_iterator llvm::PHINode::block_end | ( | ) | [inline] |
Definition at line 2039 of file Instructions.h.
Referenced by llvm::EliminateDuplicatePHINodes(), and removeIncomingValue().
| const_block_iterator llvm::PHINode::block_end | ( | ) | const [inline] |
Definition at line 2043 of file Instructions.h.
| static bool llvm::PHINode::classof | ( | const Instruction * | I | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 2144 of file Instructions.h.
References llvm::Instruction::getOpcode(), and llvm::PHI.
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::Instruction.
Definition at line 2147 of file Instructions.h.
| PHINode * PHINode::clone_impl | ( | ) | const [protected, virtual] |
Implements llvm::Instruction.
Definition at line 3517 of file Instructions.cpp.
| static PHINode* llvm::PHINode::Create | ( | Type * | Ty, |
| unsigned | NumReservedValues, | ||
| const Twine & | NameStr = "", |
||
| Instruction * | InsertBefore = 0 |
||
| ) | [inline, static] |
Constructors - NumReservedValues is a hint for the number of incoming edges that this phi node will have (use 0 if you really have no idea).
Definition at line 2007 of file Instructions.h.
Referenced by ConnectProlog(), llvm::SSAUpdaterTraits< SSAUpdater >::CreateEmptyPHI(), llvm::IRBuilder< true, TargetFolder >::CreatePHI(), createPHIsForSplitLoopExit(), GetHeapSROAValue(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), llvm::InlineFunction(), mergeEmptyReturnBlocks(), llvm::UnifyFunctionExitNodes::runOnFunction(), SimplifyCondBranchToCondBranch(), SinkThenElseCodeToEnd(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SplitLandingPadPredecessors(), tryToMakeAllocaBePromotable(), and UpdatePHINodes().
| static PHINode* llvm::PHINode::Create | ( | Type * | Ty, |
| unsigned | NumReservedValues, | ||
| const Twine & | NameStr, | ||
| BasicBlock * | InsertAtEnd | ||
| ) | [inline, static] |
Definition at line 2012 of file Instructions.h.
| llvm::PHINode::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
Provide fast operand accessors.
| int llvm::PHINode::getBasicBlockIndex | ( | const BasicBlock * | BB | ) | const [inline] |
getBasicBlockIndex - Return the first index of the specified basic block in the value list for this PHI. Returns -1 if no instance.
Definition at line 2126 of file Instructions.h.
Referenced by AlmostDeadIV(), CloneLoopBlocks(), ConnectProlog(), createPHIsForSplitLoopExit(), FindLoopCounter(), needsLFTR(), llvm::BasicBlock::replaceSuccessorsPhiUsesWith(), RewriteUsesOfClonedInstructions(), SpeculativelyExecuteBB(), llvm::BasicBlock::splitBasicBlock(), llvm::SplitCriticalEdge(), and llvm::InstCombiner::visitPHINode().
| BasicBlock* llvm::PHINode::getIncomingBlock | ( | unsigned | i | ) | const [inline] |
getIncomingBlock - Return incoming basic block number i.
Definition at line 2068 of file Instructions.h.
Referenced by CanPropagatePredecessorsForPHIs(), llvm::CloneAndPruneFunctionInto(), llvm::DemotePHIToStack(), llvm::InstCombiner::DoOneIteration(), llvm::CodeExtractor::extractCodeRegion(), FindPhiPredForUseInBlock(), FindPHIToPartitionLoops(), FoldCondBranchOnPHI(), FoldTwoEntryPHINode(), GetIfCondition(), getInsertPointForUses(), HoistThenElseCodeToIf(), IsEquivalentPHI(), llvm::Instruction::isIdenticalToWhenDefined(), isSafePHIToSpeculate(), llvm::Instruction::isUsedOutsideOfBlock(), IVUseShouldUsePostIncValue(), OptimizeNoopCopyExpression(), PerformHeapAllocSRoA(), llvm::BasicBlock::removePredecessor(), removeUndefIntroducingPredecessor(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SplitCriticalEdge(), SplitCriticalSideEffectEdges(), tryToMakeAllocaBePromotable(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::InstCombiner::visitPHINode(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), and WriteInstruction().
| BasicBlock* llvm::PHINode::getIncomingBlock | ( | const Use & | U | ) | const [inline] |
getIncomingBlock - Return incoming basic block corresponding to an operand of the PHI.
Definition at line 2075 of file Instructions.h.
References llvm::Use::getUser().
| BasicBlock* llvm::PHINode::getIncomingBlock | ( | value_use_iterator< U > | I | ) | const [inline] |
getIncomingBlock - Return incoming basic block corresponding to value use iterator.
Definition at line 2084 of file Instructions.h.
References llvm::value_use_iterator< UserTy >::getUse().
getIncomingValue - Return incoming value number x
Definition at line 2053 of file Instructions.h.
Referenced by AllGlobalLoadUsesSimpleEnoughForHeapSRA(), AlmostDeadIV(), CanEvaluateSExtd(), CanEvaluateShifted(), CanEvaluateTruncated(), CanEvaluateZExtd(), CanPropagatePredecessorsForPHIs(), llvm::CloneAndPruneFunctionInto(), CloneLoopBlocks(), llvm::ComputeMaskedBits(), llvm::ComputeNumSignBits(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), createPHIsForSplitLoopExit(), llvm::DemotePHIToStack(), FindLoopCounter(), FindPHIToPartitionLoops(), FoldCondBranchOnPHI(), FoldTwoEntryPHINode(), getInsertPointForUses(), GetShiftedValue(), hasConstantValue(), IsEquivalentPHI(), isSafePHIToSpeculate(), IVUseShouldUsePostIncValue(), needsLFTR(), PerformHeapAllocSRoA(), PHIsEqualValue(), removeIncomingValue(), removeUndefIntroducingPredecessor(), SimplifyPHINode(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), SpeculativelyExecuteBB(), SplitCriticalSideEffectEdges(), ThreadBinOpOverPHI(), ThreadCmpOverPHI(), tryToMakeAllocaBePromotable(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::InstCombiner::visitPHINode(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), and WriteInstruction().
| Value* llvm::PHINode::getIncomingValueForBlock | ( | const BasicBlock * | BB | ) | const [inline] |
Definition at line 2133 of file Instructions.h.
Referenced by AddPHINodeEntriesForMappedBlock(), AddPredecessorToBlock(), CanPropagatePredecessorsForPHIs(), CloneLoopBlocks(), ConnectProlog(), llvm::Value::DoPHITranslation(), FoldCondBranchOnPHI(), genLoopLimit(), llvm::Loop::getCanonicalInductionVariable(), HoistThenElseCodeToIf(), isProfitableToFoldUnconditional(), isSafeToHoistInvoke(), llvm::SCEVExpander::replaceCongruentIVs(), SafeToMergeTerminators(), SimplifyBranchOnICmpChain(), SimplifyCondBranchToCondBranch(), SpeculativelyExecuteBB(), llvm::UnrollLoop(), and UpdatePHINodes().
Definition at line 2062 of file Instructions.h.
Referenced by llvm::IVUsers::AddUsersImpl().
| unsigned llvm::PHINode::getNumIncomingValues | ( | ) | const [inline] |
getNumIncomingValues - Return the number of incoming edges
Definition at line 2049 of file Instructions.h.
Referenced by AllGlobalLoadUsesSimpleEnoughForHeapSRA(), CanEvaluateSExtd(), CanEvaluateShifted(), CanEvaluateTruncated(), CanEvaluateZExtd(), CanPropagatePredecessorsForPHIs(), llvm::CloneAndPruneFunctionInto(), llvm::ComputeMaskedBits(), llvm::ComputeNumSignBits(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), ConstructSSAForLoadSet(), llvm::DemotePHIToStack(), llvm::CodeExtractor::extractCodeRegion(), FindPHIToPartitionLoops(), FoldCondBranchOnPHI(), GetIfCondition(), getInsertPointForUses(), GetShiftedValue(), hasConstantValue(), HoistThenElseCodeToIf(), IsEquivalentPHI(), isSafePHIToSpeculate(), IVUseShouldUsePostIncValue(), PerformHeapAllocSRoA(), PHIsEqualValue(), llvm::BasicBlock::removePredecessor(), removeUndefIntroducingPredecessor(), SimplifyPHINode(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), SplitCriticalSideEffectEdges(), ThreadBinOpOverPHI(), ThreadCmpOverPHI(), tryToMakeAllocaBePromotable(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::SSAUpdaterTraits< SSAUpdater >::ValueIsNewPHI(), llvm::InstCombiner::visitPHINode(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), and WriteInstruction().
Definition at line 2059 of file Instructions.h.
Referenced by ConstructSSAForLoadSet().
| Value * PHINode::hasConstantValue | ( | ) | const |
hasConstantValue - If the specified PHI node always merges together the same value, return the value, otherwise return null.
Definition at line 161 of file Instructions.cpp.
References llvm::UndefValue::get(), getIncomingValue(), getNumIncomingValues(), and llvm::Value::getType().
Referenced by llvm::ComputeMaskedBits(), llvm::BasicBlock::removePredecessor(), llvm::SCEVExpander::replaceCongruentIVs(), and llvm::ObjectSizeOffsetEvaluator::visitPHINode().
removeIncomingValue - Remove an incoming value. This is useful if a predecessor basic block is deleted. The value removed is returned.
If the last incoming value for a PHI node is removed (and DeletePHIIfEmpty is true), the PHI node is destroyed and any uses of it are replaced with dummy values. The only time there should be zero incoming values to a PHI node is when the block is dead, so this strategy is sound.
Definition at line 114 of file Instructions.cpp.
References block_begin(), block_end(), llvm::Instruction::eraseFromParent(), llvm::UndefValue::get(), getIncomingValue(), llvm::User::getNumOperands(), llvm::Value::getType(), llvm::User::NumOperands, llvm::User::Op(), llvm::User::op_begin(), llvm::User::op_end(), and llvm::Value::replaceAllUsesWith().
Referenced by llvm::CloneAndPruneFunctionInto(), llvm::CodeExtractor::extractCodeRegion(), llvm::BasicBlock::removePredecessor(), RewriteUsesOfClonedInstructions(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::UnrollLoop(), and UpdatePHINodes().
| Value* llvm::PHINode::removeIncomingValue | ( | const BasicBlock * | BB, |
| bool | DeletePHIIfEmpty = true |
||
| ) | [inline] |
Definition at line 2117 of file Instructions.h.
| void llvm::PHINode::setIncomingBlock | ( | unsigned | i, |
| BasicBlock * | BB | ||
| ) | [inline] |
Definition at line 2088 of file Instructions.h.
Referenced by llvm::CloneAndPruneFunctionInto(), CloneLoopBlocks(), llvm::CodeExtractor::extractCodeRegion(), llvm::BasicBlock::replaceSuccessorsPhiUsesWith(), llvm::BasicBlock::splitBasicBlock(), llvm::SplitCriticalEdge(), and llvm::InstCombiner::visitPHINode().
Definition at line 2056 of file Instructions.h.
Referenced by llvm::CloneAndPruneFunctionInto(), CloneLoopBlocks(), ConnectProlog(), createPHIsForSplitLoopExit(), ForwardSwitchConditionToPHI(), GetShiftedValue(), HoistThenElseCodeToIf(), SpeculativelyExecuteBB(), and llvm::InstCombiner::visitPHINode().