LLVM API Documentation
#include <Instructions.h>
Definition at line 2156 of file Instructions.h.
| SwitchInst::~SwitchInst | ( | ) |
Definition at line 2776 of file Instructions.cpp.
References llvm::User::dropHungoffUses(), and llvm::User::OperandList.
| static SwitchInst* llvm::SwitchInst::Create | ( | Value * | Value, | |
| BasicBlock * | Default, | |||
| unsigned | NumCases, | |||
| Instruction * | InsertBefore = 0 | |||
| ) | [inline, static] |
Definition at line 2184 of file Instructions.h.
Referenced by llvm::IRBuilder< true, llvm::TargetFolder >::CreateSwitch(), and llvm::SimplifyCFG().
| static SwitchInst* llvm::SwitchInst::Create | ( | Value * | Value, | |
| BasicBlock * | Default, | |||
| unsigned | NumCases, | |||
| BasicBlock * | InsertAtEnd | |||
| ) | [inline, static] |
Definition at line 2188 of file Instructions.h.
| llvm::SwitchInst::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Value | ) |
Provide fast operand accessors.
| Value* llvm::SwitchInst::getCondition | ( | ) | const [inline] |
Definition at line 2198 of file Instructions.h.
Referenced by AddReachableCodeToWorklist(), and llvm::MSILWriter::printSwitchInstruction().
| void llvm::SwitchInst::setCondition | ( | Value * | V | ) | [inline] |
Definition at line 2199 of file Instructions.h.
| BasicBlock* llvm::SwitchInst::getDefaultDest | ( | ) | const [inline] |
Definition at line 2201 of file Instructions.h.
Referenced by llvm::MSILWriter::printSwitchInstruction(), and llvm::Interpreter::visitSwitchInst().
| unsigned llvm::SwitchInst::getNumCases | ( | ) | const [inline] |
getNumCases - return the number of 'cases' in this switch instruction. Note that case #0 is always the default case.
Definition at line 2207 of file Instructions.h.
Referenced by llvm::MSILWriter::printSwitchInstruction(), and SimplifyEqualityComparisonWithOnlyPredecessor().
| ConstantInt* llvm::SwitchInst::getCaseValue | ( | unsigned | i | ) | [inline] |
getCaseValue - Return the specified case value. Note that case #0, the default destination, does not have a case value.
Definition at line 2213 of file Instructions.h.
Referenced by AddReachableCodeToWorklist(), llvm::MSILWriter::printSwitchInstruction(), and SimplifyEqualityComparisonWithOnlyPredecessor().
| const ConstantInt* llvm::SwitchInst::getCaseValue | ( | unsigned | i | ) | const [inline] |
getCaseValue - Return the specified case value. Note that case #0, the default destination, does not have a case value.
Definition at line 2220 of file Instructions.h.
| unsigned llvm::SwitchInst::findCaseValue | ( | const ConstantInt * | C | ) | const [inline] |
findCaseValue - Search all of the case values for the specified constant. If it is explicitly handled, return the case number of it, otherwise return 0 to indicate that it is handled by the default handler.
Definition at line 2228 of file Instructions.h.
| ConstantInt* llvm::SwitchInst::findCaseDest | ( | BasicBlock * | BB | ) | [inline] |
findCaseDest - Finds the unique case value for a given successor. Returns null if the successor is not found, not unique, or is the default case.
Definition at line 2237 of file Instructions.h.
| void SwitchInst::addCase | ( | ConstantInt * | OnVal, | |
| BasicBlock * | Dest | |||
| ) |
addCase - Add an entry to the switch instruction...
Definition at line 2783 of file Instructions.cpp.
References llvm::User::NumOperands, and llvm::User::OperandList.
Referenced by FoldValueComparisonIntoPredecessors(), and llvm::SimplifyCFG().
| void SwitchInst::removeCase | ( | unsigned | idx | ) |
removeCase - This method removes the specified successor from the switch instruction. Note that this cannot be used to remove the default destination (successor #0).
removeCase - This method removes the specified successor from the switch instruction. Note that this cannot be used to remove the default destination (successor #0).
Definition at line 2798 of file Instructions.cpp.
References llvm::User::getNumOperands(), llvm::User::NumOperands, llvm::User::OperandList, and llvm::Use::set().
Referenced by SimplifyEqualityComparisonWithOnlyPredecessor().
| SwitchInst * SwitchInst::clone | ( | LLVMContext & | Context | ) | 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::TerminatorInst.
Definition at line 3070 of file Instructions.cpp.
References llvm::Value::SubclassOptionalData.
| unsigned llvm::SwitchInst::getNumSuccessors | ( | ) | const [inline] |
getNumSuccessors - Return the number of successors that this terminator has.
Reimplemented from llvm::TerminatorInst.
Definition at line 2262 of file Instructions.h.
Referenced by AddReachableCodeToWorklist(), and FoldValueComparisonIntoPredecessors().
| BasicBlock* llvm::SwitchInst::getSuccessor | ( | unsigned | idx | ) | const [inline] |
getSuccessor - Return the specified successor.
Reimplemented from llvm::TerminatorInst.
Definition at line 2263 of file Instructions.h.
Referenced by AddReachableCodeToWorklist(), FoldValueComparisonIntoPredecessors(), llvm::MSILWriter::printSwitchInstruction(), and SimplifyEqualityComparisonWithOnlyPredecessor().
| void llvm::SwitchInst::setSuccessor | ( | unsigned | idx, | |
| BasicBlock * | B | |||
| ) | [inline] |
setSuccessor - Update the specified successor to point at the provided block.
Reimplemented from llvm::TerminatorInst.
Definition at line 2267 of file Instructions.h.
Referenced by FoldValueComparisonIntoPredecessors().
| ConstantInt* llvm::SwitchInst::getSuccessorValue | ( | unsigned | idx | ) | const [inline] |
Definition at line 2274 of file Instructions.h.
| static bool llvm::SwitchInst::classof | ( | const SwitchInst * | ) | [inline, static] |
Definition at line 2280 of file Instructions.h.
| static bool llvm::SwitchInst::classof | ( | const Instruction * | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:.
Reimplemented from llvm::TerminatorInst.
Definition at line 2281 of file Instructions.h.
References llvm::Instruction::getOpcode().