LLVM API Documentation
#include <Instructions.h>


Public Member Functions | |
| AllocaInst (Type *Ty, Value *ArraySize=0, const Twine &Name="", Instruction *InsertBefore=0) | |
| AllocaInst (Type *Ty, Value *ArraySize, const Twine &Name, BasicBlock *InsertAtEnd) | |
| AllocaInst (Type *Ty, const Twine &Name, Instruction *InsertBefore=0) | |
| AllocaInst (Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd) | |
| AllocaInst (Type *Ty, Value *ArraySize, unsigned Align, const Twine &Name="", Instruction *InsertBefore=0) | |
| AllocaInst (Type *Ty, Value *ArraySize, unsigned Align, const Twine &Name, BasicBlock *InsertAtEnd) | |
| virtual | ~AllocaInst () |
| bool | isArrayAllocation () const |
| const Value * | getArraySize () const |
| Value * | getArraySize () |
| PointerType * | getType () const |
| Type * | getAllocatedType () const |
| unsigned | getAlignment () const |
| void | setAlignment (unsigned Align) |
| bool | isStaticAlloca () const |
Static Public Member Functions | |
| static bool | classof (const Instruction *I) |
| static bool | classof (const Value *V) |
| Methods for support type inquiry through isa, cast, and dyn_cast: | |
Protected Member Functions | |
| virtual AllocaInst * | clone_impl () const |
AllocaInst - an instruction to allocate memory on the stack
Definition at line 60 of file Instructions.h.
| AllocaInst::AllocaInst | ( | Type * | Ty, |
| Value * | ArraySize = 0, |
||
| const Twine & | Name = "", |
||
| Instruction * | InsertBefore = 0 |
||
| ) | [explicit] |
Definition at line 834 of file Instructions.cpp.
References llvm::Type::isVoidTy(), setAlignment(), and llvm::Value::setName().
Referenced by clone_impl().
| AllocaInst::AllocaInst | ( | Type * | Ty, |
| Value * | ArraySize, | ||
| const Twine & | Name, | ||
| BasicBlock * | InsertAtEnd | ||
| ) |
Definition at line 843 of file Instructions.cpp.
References llvm::Type::isVoidTy(), setAlignment(), and llvm::Value::setName().
| AllocaInst::AllocaInst | ( | Type * | Ty, |
| const Twine & | Name, | ||
| Instruction * | InsertBefore = 0 |
||
| ) |
Definition at line 852 of file Instructions.cpp.
References llvm::Type::isVoidTy(), setAlignment(), and llvm::Value::setName().
| AllocaInst::AllocaInst | ( | Type * | Ty, |
| const Twine & | Name, | ||
| BasicBlock * | InsertAtEnd | ||
| ) |
Definition at line 861 of file Instructions.cpp.
References llvm::Type::isVoidTy(), setAlignment(), and llvm::Value::setName().
| AllocaInst::AllocaInst | ( | Type * | Ty, |
| Value * | ArraySize, | ||
| unsigned | Align, | ||
| const Twine & | Name = "", |
||
| Instruction * | InsertBefore = 0 |
||
| ) |
Definition at line 870 of file Instructions.cpp.
References llvm::Type::isVoidTy(), setAlignment(), and llvm::Value::setName().
| AllocaInst::AllocaInst | ( | Type * | Ty, |
| Value * | ArraySize, | ||
| unsigned | Align, | ||
| const Twine & | Name, | ||
| BasicBlock * | InsertAtEnd | ||
| ) |
Definition at line 879 of file Instructions.cpp.
References llvm::Type::isVoidTy(), setAlignment(), and llvm::Value::setName().
| AllocaInst::~AllocaInst | ( | ) | [virtual] |
Definition at line 889 of file Instructions.cpp.
| static bool llvm::AllocaInst::classof | ( | const Instruction * | I | ) | [inline, static] |
Reimplemented from llvm::UnaryInstruction.
Definition at line 116 of file Instructions.h.
References llvm::Alloca, and llvm::Instruction::getOpcode().
Referenced by classof().
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::UnaryInstruction.
Definition at line 119 of file Instructions.h.
References classof().
| AllocaInst * AllocaInst::clone_impl | ( | ) | const [protected, virtual] |
Implements llvm::Instruction.
Definition at line 3408 of file Instructions.cpp.
References AllocaInst(), getAlignment(), getAllocatedType(), and llvm::User::getOperand().
| unsigned llvm::AllocaInst::getAlignment | ( | ) | const [inline] |
getAlignment - Return the alignment of the memory that is being allocated by the instruction.
Definition at line 105 of file Instructions.h.
References llvm::Instruction::getSubclassDataFromInstruction().
Referenced by clone_impl(), llvm::ComputeMaskedBits(), setAlignment(), llvm::ObjectSizeOffsetVisitor::visitAllocaInst(), and llvm::InstCombiner::visitAllocaInst().
| Type * AllocaInst::getAllocatedType | ( | ) | const |
getAllocatedType - Return the type that is being allocated by the instruction.
Definition at line 906 of file Instructions.cpp.
References llvm::SequentialType::getElementType(), and getType().
Referenced by clone_impl(), llvm::AMDGPUFrameLowering::getFrameIndexOffset(), InlineCallIfPossible(), llvm::InlineFunction(), llvm::ObjectSizeOffsetVisitor::visitAllocaInst(), llvm::InstCombiner::visitAllocaInst(), and llvm::ObjectSizeOffsetEvaluator::visitAllocaInst().
| const Value* llvm::AllocaInst::getArraySize | ( | ) | const [inline] |
getArraySize - Get the number of elements allocated. For a simple allocation of a single element, this will return a constant 1 value.
Definition at line 88 of file Instructions.h.
References llvm::User::getOperand().
Referenced by llvm::InlineFunction(), isStaticAlloca(), llvm::NVPTXAllocaHoisting::runOnFunction(), llvm::ObjectSizeOffsetVisitor::visitAllocaInst(), llvm::InstCombiner::visitAllocaInst(), and llvm::ObjectSizeOffsetEvaluator::visitAllocaInst().
| Value* llvm::AllocaInst::getArraySize | ( | ) | [inline] |
Definition at line 89 of file Instructions.h.
References llvm::User::getOperand().
| PointerType* llvm::AllocaInst::getType | ( | ) | const [inline] |
getType - Overload to return most specific pointer type
Reimplemented from llvm::Value.
Definition at line 93 of file Instructions.h.
Referenced by llvm::ComputeMaskedBits(), getAllocatedType(), hasLifetimeMarkers(), llvm::Interpreter::visitAllocaInst(), and llvm::InstCombiner::visitAllocaInst().
| bool AllocaInst::isArrayAllocation | ( | ) | const |
isArrayAllocation - Return true if there is an allocation size parameter to the allocation instruction that is not 1.
Definition at line 900 of file Instructions.cpp.
References llvm::User::getOperand().
Referenced by InlineCallIfPossible(), llvm::ObjectSizeOffsetVisitor::visitAllocaInst(), llvm::InstCombiner::visitAllocaInst(), and llvm::ObjectSizeOffsetEvaluator::visitAllocaInst().
| bool AllocaInst::isStaticAlloca | ( | ) | const |
isStaticAlloca - Return true if this alloca is in the entry block of the function and is a constant size. If so, the code generator will fold it into the prolog/epilog code, so it is basically free.
Definition at line 913 of file Instructions.cpp.
References llvm::Function::front(), getArraySize(), llvm::Instruction::getParent(), and llvm::BasicBlock::getParent().
| void AllocaInst::setAlignment | ( | unsigned | Align | ) |
Definition at line 892 of file Instructions.cpp.
References getAlignment(), and llvm::Log2_32().
Referenced by AllocaInst(), and llvm::InstCombiner::visitAllocaInst().