LLVM API Documentation
#include <Instructions.h>


Public Member Functions | |
| ~PHINode () | |
| void | reserveOperandSpace (unsigned NumValues) |
| virtual PHINode * | clone () const |
| DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value) | |
| Provide fast operand accessors. | |
| unsigned | getNumIncomingValues () const |
| Value * | getIncomingValue (unsigned i) const |
| void | setIncomingValue (unsigned i, Value *V) |
| unsigned | getOperandNumForIncomingValue (unsigned i) |
| BasicBlock * | getIncomingBlock (unsigned i) const |
| void | setIncomingBlock (unsigned i, BasicBlock *BB) |
| unsigned | getOperandNumForIncomingBlock (unsigned i) |
| void | addIncoming (Value *V, BasicBlock *BB) |
| Value * | removeIncomingValue (unsigned Idx, bool DeletePHIIfEmpty=true) |
| Value * | removeIncomingValue (const BasicBlock *BB, bool DeletePHIIfEmpty=true) |
| int | getBasicBlockIndex (const BasicBlock *BB) const |
| Value * | getIncomingValueForBlock (const BasicBlock *BB) const |
| Value * | hasConstantValue (bool AllowNonDominatingInstruction=false) const |
Static Public Member Functions | |
| static PHINode * | Create (const Type *Ty, const std::string &NameStr="", Instruction *InsertBefore=0) |
| static PHINode * | Create (const Type *Ty, const std::string &NameStr, BasicBlock *InsertAtEnd) |
| static bool | classof (const PHINode *) |
| Methods for support type inquiry through isa, cast, and dyn_cast:. | |
| static bool | classof (const Instruction *I) |
| Methods for support type inquiry through isa, cast, and dyn_cast:. | |
| static bool | classof (const Value *V) |
Definition at line 1875 of file Instructions.h.
| PHINode::~PHINode | ( | ) |
Definition at line 183 of file Instructions.cpp.
References llvm::User::dropHungoffUses(), and llvm::User::OperandList.
| static PHINode* llvm::PHINode::Create | ( | const Type * | Ty, | |
| const std::string & | NameStr = "", |
|||
| Instruction * | InsertBefore = 0 | |||
| ) | [inline, static] |
Definition at line 1898 of file Instructions.h.
Referenced by llvm::IRBuilder< preserveNames, T >::CreatePHI(), GetHeapSROAValue(), llvm::InlineFunction(), LowerPartSelect(), LowerPartSet(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::SplitBlockPredecessors(), and llvm::SCEVExpander::visitAddRecExpr().
| static PHINode* llvm::PHINode::Create | ( | const Type * | Ty, | |
| const std::string & | NameStr, | |||
| BasicBlock * | InsertAtEnd | |||
| ) | [inline, static] |
Definition at line 1902 of file Instructions.h.
| void llvm::PHINode::reserveOperandSpace | ( | unsigned | NumValues | ) | [inline] |
reserveOperandSpace - This method can be used to avoid repeated reallocation of PHI operand lists by reserving space for the correct number of operands before adding them. Unlike normal vector reserves, this method can also be used to trim the operand space.
Definition at line 1912 of file Instructions.h.
Referenced by LowerPartSelect(), and LowerPartSet().
| PHINode * PHINode::clone | ( | ) | const [virtual] |
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
Implements llvm::Instruction.
Definition at line 2945 of file Instructions.cpp.
| llvm::PHINode::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
Provide fast operand accessors.
| unsigned llvm::PHINode::getNumIncomingValues | ( | ) | const [inline] |
getNumIncomingValues - Return the number of incoming edges
Definition at line 1923 of file Instructions.h.
Referenced by AllGlobalLoadUsesSimpleEnoughForHeapSRA(), llvm::CloneAndPruneFunctionInto(), llvm::ComputeMaskedBits(), llvm::DemotePHIToStack(), FindPHIToPartitionLoops(), FoldCondBranchOnPHI(), hasConstantValue(), HoistThenElseCodeToIf(), IVUseShouldUsePostIncValue(), PerformHeapAllocSRoA(), PHIsEqualValue(), llvm::BasicBlock::removePredecessor(), SpeculativelyExecuteBB(), and TryToSimplifyUncondBranchFromEmptyBlock().
getIncomingValue - Return incoming value number x
Definition at line 1927 of file Instructions.h.
Referenced by AllGlobalLoadUsesSimpleEnoughForHeapSRA(), llvm::CloneAndPruneFunctionInto(), llvm::ComputeMaskedBits(), llvm::DemotePHIToStack(), FindPHIToPartitionLoops(), FoldCondBranchOnPHI(), FoldTwoEntryPHINode(), hasConstantValue(), IVUseShouldUsePostIncValue(), PerformHeapAllocSRoA(), PHIsEqualValue(), SimplifyCondBranchToCondBranch(), and TryToSimplifyUncondBranchFromEmptyBlock().
Definition at line 1931 of file Instructions.h.
Referenced by llvm::CloneAndPruneFunctionInto(), HoistThenElseCodeToIf(), SimplifyCondBranchToCondBranch(), and SpeculativelyExecuteBB().
Definition at line 1935 of file Instructions.h.
| BasicBlock* llvm::PHINode::getIncomingBlock | ( | unsigned | i | ) | const [inline] |
getIncomingBlock - Return incoming basic block number x
Definition at line 1941 of file Instructions.h.
Referenced by llvm::CloneAndPruneFunctionInto(), llvm::DemotePHIToStack(), FindPHIToPartitionLoops(), FoldCondBranchOnPHI(), FoldTwoEntryPHINode(), llvm::LoopBase< BlockT >::getTripCount(), HoistThenElseCodeToIf(), llvm::Instruction::isUsedOutsideOfBlock(), IVUseShouldUsePostIncValue(), OptimizeNoopCopyExpression(), PerformHeapAllocSRoA(), llvm::BasicBlock::removePredecessor(), SpeculativelyExecuteBB(), and TryToSimplifyUncondBranchFromEmptyBlock().
| void llvm::PHINode::setIncomingBlock | ( | unsigned | i, | |
| BasicBlock * | BB | |||
| ) | [inline] |
Definition at line 1944 of file Instructions.h.
Referenced by llvm::CloneAndPruneFunctionInto(), llvm::BasicBlock::splitBasicBlock(), and llvm::SplitCriticalEdge().
Definition at line 1947 of file Instructions.h.
| void llvm::PHINode::addIncoming | ( | Value * | V, | |
| BasicBlock * | BB | |||
| ) | [inline] |
addIncoming - Add an incoming value to the end of the PHI list
Definition at line 1953 of file Instructions.h.
References llvm::Value::getType(), and llvm::Intrinsic::getType().
Referenced by AddPredecessorToBlock(), FoldCondBranchOnPHI(), HandleInlinedInvoke(), llvm::InlineFunction(), LLVMAddIncoming(), LowerPartSelect(), LowerPartSet(), PerformHeapAllocSRoA(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::SimplifyCFG(), SimplifyCondBranchToCondBranch(), llvm::SplitBlockPredecessors(), TryToSimplifyUncondBranchFromEmptyBlock(), llvm::UnrollLoop(), and llvm::SCEVExpander::visitAddRecExpr().
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 190 of file Instructions.cpp.
References llvm::Instruction::eraseFromParent(), llvm::UndefValue::get(), llvm::User::getNumOperands(), llvm::Value::getType(), llvm::User::NumOperands, llvm::User::OperandList, llvm::Value::replaceAllUsesWith(), and llvm::Use::set().
Referenced by llvm::CloneAndPruneFunctionInto(), llvm::BasicBlock::removePredecessor(), llvm::SplitBlockPredecessors(), TryToSimplifyUncondBranchFromEmptyBlock(), and llvm::UnrollLoop().
| Value* llvm::PHINode::removeIncomingValue | ( | const BasicBlock * | BB, | |
| bool | DeletePHIIfEmpty = true | |||
| ) | [inline] |
| 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 1986 of file Instructions.h.
Referenced by SimplifyCondBranchToCondBranch(), llvm::BasicBlock::splitBasicBlock(), and llvm::SplitCriticalEdge().
| Value* llvm::PHINode::getIncomingValueForBlock | ( | const BasicBlock * | BB | ) | const [inline] |
Definition at line 1993 of file Instructions.h.
Referenced by AddPredecessorToBlock(), CanPropagatePredecessorsForPHIs(), llvm::CloneTrace(), llvm::Value::DoPHITranslation(), EvaluateFunction(), FoldCondBranchOnPHI(), llvm::LoopBase< BlockT >::getCanonicalInductionVariable(), HandleInlinedInvoke(), HoistThenElseCodeToIf(), SafeToMergeTerminators(), llvm::SimplifyCFG(), SimplifyCondBranchToCondBranch(), SpeculativelyExecuteBB(), llvm::SplitBlockPredecessors(), SplitEdgeNicely(), and llvm::UnrollLoop().
| Value * PHINode::hasConstantValue | ( | bool | AllowNonDominatingInstruction = false |
) | const |
hasConstantValue - If the specified PHI node always merges together the same value, return the value, otherwise return null.
hasConstantValue - If the specified PHI node always merges together the same value, return the value, otherwise return null.
Definition at line 252 of file Instructions.cpp.
References llvm::UndefValue::get(), getIncomingValue(), getNumIncomingValues(), and llvm::Value::getType().
Referenced by FindPHIToPartitionLoops(), llvm::BasicBlock::removePredecessor(), and llvm::SplitBlockPredecessors().
| static bool llvm::PHINode::classof | ( | const PHINode * | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Definition at line 2003 of file Instructions.h.
| static bool llvm::PHINode::classof | ( | const Instruction * | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::Instruction.
Definition at line 2004 of file Instructions.h.
References llvm::Instruction::getOpcode(), and PHI.
| static bool llvm::PHINode::classof | ( | const Value * | V | ) | [inline, static] |
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.