LLVM API Documentation
#include <Instructions.h>
Inheritance diagram for llvm::PHINode:
Public Member Functions | |
PHINode (const Type *Ty, const std::string &Name="", Instruction *InsertBefore=0) | |
PHINode (const Type *Ty, const std::string &Name, BasicBlock *InsertAtEnd) | |
virtual PHINode * | clone () const |
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 |
Static Public Member Functions | |
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 700 of file Instructions.h.
|
Definition at line 703 of file Instructions.h. |
|
Definition at line 708 of file Instructions.h. |
|
addIncoming - Add an incoming value to the end of the PHI list Definition at line 748 of file Instructions.h. References llvm::Value::getType(), and llvm::User::Operands. Referenced by AddPredecessorToBlock(), llvm::ConvertExpressionToType(), ConvertOperandToType(), llvm::InlineFunction(), llvm::insertBB(), llvm::BytecodeReader::ParseInstruction(), PropagatePredecessorsForPHIs(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::SimplifyCFG(), and llvm::SplitCriticalEdge(). |
|
Reimplemented from llvm::Instruction. Definition at line 789 of file Instructions.h. References classof(). |
|
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::Instruction. Definition at line 786 of file Instructions.h. References llvm::Instruction::getOpcode(), and llvm::Instruction::PHI. |
|
Methods for support type inquiry through isa, cast, and dyn_cast:.
Definition at line 785 of file Instructions.h. Referenced by classof(). |
|
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 816 of file Instructions.cpp. |
|
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 774 of file Instructions.h. References getIncomingBlock(), and llvm::User::Operands. Referenced by getIncomingValueForBlock(), llvm::insertBB(), PropagatePredecessorsForPHIs(), removeIncomingValue(), and llvm::BasicBlock::splitBasicBlock(). |
|
getIncomingBlock - Return incoming basic block x Definition at line 734 of file Instructions.h. References llvm::User::Operands. Referenced by llvm::ConvertExpressionToType(), ConvertOperandToType(), FindPHIToPartitionLoops(), getBasicBlockIndex(), llvm::Loop::getTripCount(), HoistThenElseCodeToIf(), PropagatePredecessorsForPHIs(), and llvm::BasicBlock::removePredecessor(). |
|
getIncomingValue - Return incoming value x Definition at line 720 of file Instructions.h. References llvm::User::Operands. Referenced by llvm::ConvertExpressionToType(), ConvertOperandToType(), llvm::ExpressionConvertibleToType(), FindPHIToPartitionLoops(), getIncomingValueForBlock(), llvm::hasConstantValue(), llvm::insertBB(), OperandConvertibleToType(), PropagatePredecessorsForPHIs(), and llvm::SimplifyCFG(). |
|
Definition at line 780 of file Instructions.h. References getBasicBlockIndex(), and getIncomingValue(). Referenced by AddPredecessorToBlock(), llvm::CloneTrace(), llvm::Loop::getCanonicalInductionVariable(), HoistThenElseCodeToIf(), llvm::InlineFunction(), SafeToMergeTerminators(), and llvm::SimplifyCFG(). |
|
getNumIncomingValues - Return the number of incoming edges Definition at line 716 of file Instructions.h. References llvm::User::Operands. Referenced by llvm::ExpressionConvertibleToType(), FindPHIToPartitionLoops(), llvm::hasConstantValue(), HoistThenElseCodeToIf(), OperandConvertibleToType(), PropagatePredecessorsForPHIs(), and llvm::BasicBlock::removePredecessor(). |
|
Definition at line 742 of file Instructions.h. |
|
Definition at line 728 of file Instructions.h. |
|
Definition at line 765 of file Instructions.h. References getBasicBlockIndex(), and removeIncomingValue(). |
|
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 51 of file InstrTypes.cpp. References llvm::BasicBlock::getInstList(), llvm::Constant::getNullValue(), llvm::User::getNumOperands(), llvm::Instruction::getParent(), llvm::Value::getType(), llvm::User::Operands, and llvm::Value::replaceAllUsesWith(). Referenced by llvm::ConvertExpressionToType(), ConvertOperandToType(), PropagatePredecessorsForPHIs(), removeIncomingValue(), llvm::BasicBlock::removePredecessor(), and llvm::SplitCriticalEdge(). |
|
Definition at line 738 of file Instructions.h. References llvm::User::Operands. Referenced by llvm::insertBB(), and llvm::BasicBlock::splitBasicBlock(). |
|
Definition at line 724 of file Instructions.h. References llvm::User::Operands. Referenced by HoistThenElseCodeToIf(). |