class AllocaInst
Declaration
class AllocaInst : public UnaryInstruction { /* full declaration omitted */ };
Description
an instruction to allocate memory on the stack
Declared at: llvm/include/llvm/IR/Instructions.h:59
Inherits from: UnaryInstruction
Member Variables
- private llvm::Type* AllocatedType
Inherited from Value:
- protected SubclassOptionalData
- protected NumUserOperands
- protected IsUsedByMD
- protected HasName
- protected HasMetadata
- protected HasHungOffUses
- protected HasDescriptor
- public static MaxAlignmentExponent = 32
- public static MaximumAlignment = 1ULL << MaxAlignmentExponent
Method Overview
- public AllocaInst(llvm::Type * Ty, unsigned int AddrSpace, llvm::Value * ArraySize, const llvm::Twine & Name, llvm::Instruction * InsertBefore)
- public AllocaInst(llvm::Type * Ty, unsigned int AddrSpace, llvm::Value * ArraySize, const llvm::Twine & Name, llvm::BasicBlock * InsertAtEnd)
- public AllocaInst(llvm::Type * Ty, unsigned int AddrSpace, const llvm::Twine & Name, llvm::Instruction * InsertBefore)
- public AllocaInst(llvm::Type * Ty, unsigned int AddrSpace, const llvm::Twine & Name, llvm::BasicBlock * InsertAtEnd)
- public AllocaInst(llvm::Type * Ty, unsigned int AddrSpace, llvm::Value * ArraySize, llvm::Align Align, const llvm::Twine & Name = "", llvm::Instruction * InsertBefore = nullptr)
- public AllocaInst(llvm::Type * Ty, unsigned int AddrSpace, llvm::Value * ArraySize, llvm::Align Align, const llvm::Twine & Name, llvm::BasicBlock * InsertAtEnd)
- public static bool classof(const llvm::Value * V)
- public static bool classof(const llvm::Instruction * I)
- protected llvm::AllocaInst * cloneImpl() const
- public unsigned int getAddressSpace() const
- public llvm::Align getAlign() const
- public llvm::Type * getAllocatedType() const
- public Optional<llvm::TypeSize> getAllocationSizeInBits(const llvm::DataLayout & DL) const
- public llvm::Value * getArraySize()
- public const llvm::Value * getArraySize() const
- public llvm::PointerType * getType() const
- public bool isArrayAllocation() const
- public bool isStaticAlloca() const
- public bool isSwiftError() const
- public bool isUsedWithInAlloca() const
- public void setAlignment(llvm::Align Align)
- public void setAllocatedType(llvm::Type * Ty)
- private template <typename Bitfield>void setSubclassData(typename Bitfield::Type Value)
- public void setSwiftError(bool V)
- public void setUsedWithInAlloca(bool V)
Inherited from UnaryInstruction:
Inherited from Instruction:
- public addAnnotationMetadata
- public andIRFlags
- public applyMergedLocation
- public classof
- public clone
- public comesBefore
- public copyFastMathFlags
- public copyFastMathFlags
- public copyIRFlags
- public copyMetadata
- public dropLocation
- public dropPoisonGeneratingFlags
- public dropUndefImplyingAttrsAndUnknownMetadata
- public dropUnknownNonDebugMetadata
- public dropUnknownNonDebugMetadata
- public dropUnknownNonDebugMetadata
- public dropUnknownNonDebugMetadata
- public eraseFromParent
- public extractProfMetadata
- public extractProfTotalWeight
- public getAAMetadata
- public getAllMetadata
- public getAllMetadataOtherThanDebugLoc
- public getDebugLoc
- public getFastMathFlags
- public getFunction
- public getFunction
- public getMetadata
- public getMetadata
- public getModule
- public getModule
- public getNextNonDebugInstruction
- public getNextNonDebugInstruction
- public getNumSuccessors
- public getOpcode
- public getOpcodeName
- public getOpcodeName
- public getParent
- public getParent
- public getPrevNonDebugInstruction
- public getPrevNonDebugInstruction
- protected getSubclassData
- public getSuccessor
- public hasAllowContract
- public hasAllowReassoc
- public hasAllowReciprocal
- public hasApproxFunc
- public hasAtomicLoad
- public hasAtomicStore
- public hasMetadata
- public hasMetadata
- public hasMetadata
- public hasMetadataOtherThanDebugLoc
- public hasNoInfs
- public hasNoNaNs
- public hasNoSignedWrap
- public hasNoSignedZeros
- public hasNoUnsignedWrap
- public hasPoisonGeneratingFlags
- public insertAfter
- public insertBefore
- public isArithmeticShift
- public isAssociative
- public isAssociative
- public isAtomic
- public isBinaryOp
- public isBinaryOp
- public isBitwiseLogicOp
- public isBitwiseLogicOp
- public isCast
- public isCast
- public isCommutative
- public isCommutative
- public isDebugOrPseudoInst
- public isEHPad
- public isExact
- public isExceptionalTerminator
- public isExceptionalTerminator
- public isFast
- public isFenceLike
- public isFuncletPad
- public isFuncletPad
- public isIdempotent
- public isIdempotent
- public isIdenticalTo
- public isIdenticalToWhenDefined
- public isIntDivRem
- public isIntDivRem
- public isLaunderOrStripInvariantGroup
- public isLifetimeStartOrEnd
- public isLogicalShift
- public isNilpotent
- public isNilpotent
- public isOnlyUserOfAnyOperand
- public isSafeToRemove
- public isSameOperationAs
- public isShift
- public isShift
- public isTerminator
- public isTerminator
- public isUnaryOp
- public isUnaryOp
- public isUsedOutsideOfBlock
- public isVolatile
- public mayHaveSideEffects
- public mayReadFromMemory
- public mayReadOrWriteMemory
- public mayThrow
- public mayWriteToMemory
- public moveAfter
- public moveBefore
- public moveBefore
- public removeFromParent
- public replaceSuccessorWith
- public setAAMetadata
- public setDebugLoc
- public setFast
- public setFastMathFlags
- public setHasAllowContract
- public setHasAllowReassoc
- public setHasAllowReciprocal
- public setHasApproxFunc
- public setHasNoInfs
- public setHasNoNaNs
- public setHasNoSignedWrap
- public setHasNoSignedZeros
- public setHasNoUnsignedWrap
- public setIsExact
- public setMetadata
- public setMetadata
- protected setSubclassData
- public setSuccessor
- public swapProfMetadata
- public updateLocationAfterHoist
- public user_back
- public user_back
- public willReturn
Inherited from User:
- protected Op
- protected Op
- protected OpFrom
- protected allocHungoffUses
- public classof
- public dropAllReferences
- public getDescriptor
- public getDescriptor
- public getNumOperands
- public getOperand
- public getOperandList
- public getOperandList
- public getOperandUse
- public getOperandUse
- protected growHungoffUses
- public isDroppable
- public op_begin
- public op_begin
- public op_end
- public op_end
- public operand_values
- public operand_values
- public operands
- public operands
- public replaceUsesOfWith
- public setGlobalVariableNumOperands
- public setNumHungOffUseOperands
- public setOperand
- public value_op_begin
- public value_op_begin
- public value_op_end
- public value_op_end
Inherited from Value:
- public DoPHITranslation
- public DoPHITranslation
- protected addMetadata
- protected addMetadata
- public addUse
- public assertModuleIsMaterialized
- public assertModuleIsMaterializedImpl
- public canBeFreed
- protected clearMetadata
- public clearSubclassOptionalData
- public deleteValue
- public dropDroppableUse
- public dropDroppableUses
- public dropDroppableUsesIn
- public dump
- protected eraseMetadata
- protected getAllMetadata
- public getContext
- protected getMetadata
- protected getMetadata
- protected getMetadata
- protected getMetadata
- public getName
- public getNameOrAsOperand
- public getNumUses
- public getPointerAlignment
- public getPointerDereferenceableBytes
- public getRawSubclassOptionalData
- public getSingleUndroppableUse
- public getSingleUndroppableUse
- protected getSubclassDataFromValue
- public getType
- public getUniqueUndroppableUser
- public getUniqueUndroppableUser
- public getValueID
- public getValueName
- protected hasMetadata
- protected hasMetadata
- protected hasMetadata
- public hasNUndroppableUses
- public hasNUndroppableUsesOrMore
- public hasNUses
- public hasNUsesOrMore
- public hasName
- public hasOneUse
- public hasOneUser
- public hasSameSubclassOptionalData
- public hasValueHandle
- public isSwiftError
- public isTransitiveUsedByMetadataOnly
- public isUsedByMetadata
- public isUsedInBasicBlock
- public materialized_use_begin
- public materialized_use_begin
- public materialized_use_empty
- public materialized_user_begin
- public materialized_user_begin
- public materialized_users
- public materialized_users
- public materialized_uses
- public materialized_uses
- public mutateType
- public print
- public print
- public printAsOperand
- public printAsOperand
- public replaceAllUsesWith
- public replaceNonMetadataUsesWith
- public replaceUsesOutsideBlock
- public replaceUsesWithIf
- public reverseUseList
- protected setMetadata
- protected setMetadata
- public setName
- public setValueName
- protected setValueSubclassData
- public sortUseList
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripAndAccumulateInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsConstantOffsets
- public stripInBoundsOffsets
- public stripInBoundsOffsets
- public stripPointerCasts
- public stripPointerCasts
- public stripPointerCastsAndAliases
- public stripPointerCastsAndAliases
- public stripPointerCastsForAliasAnalysis
- public stripPointerCastsForAliasAnalysis
- public stripPointerCastsSameRepresentation
- public stripPointerCastsSameRepresentation
- public takeName
- public use_begin
- public use_begin
- public use_empty
- public use_end
- public use_end
- public user_back
- public user_back
- public user_begin
- public user_begin
- public user_empty
- public user_end
- public user_end
- public users
- public users
- public uses
- public uses
Methods
¶AllocaInst(llvm::Type* Ty,
unsigned int AddrSpace,
llvm::Value* ArraySize,
const llvm::Twine& Name,
llvm::Instruction* InsertBefore)
AllocaInst(llvm::Type* Ty,
unsigned int AddrSpace,
llvm::Value* ArraySize,
const llvm::Twine& Name,
llvm::Instruction* InsertBefore)
Declared at: llvm/include/llvm/IR/Instructions.h:76
Parameters
- llvm::Type* Ty
- unsigned int AddrSpace
- llvm::Value* ArraySize
- const llvm::Twine& Name
- llvm::Instruction* InsertBefore
¶AllocaInst(llvm::Type* Ty,
unsigned int AddrSpace,
llvm::Value* ArraySize,
const llvm::Twine& Name,
llvm::BasicBlock* InsertAtEnd)
AllocaInst(llvm::Type* Ty,
unsigned int AddrSpace,
llvm::Value* ArraySize,
const llvm::Twine& Name,
llvm::BasicBlock* InsertAtEnd)
Declared at: llvm/include/llvm/IR/Instructions.h:78
Parameters
- llvm::Type* Ty
- unsigned int AddrSpace
- llvm::Value* ArraySize
- const llvm::Twine& Name
- llvm::BasicBlock* InsertAtEnd
¶AllocaInst(llvm::Type* Ty,
unsigned int AddrSpace,
const llvm::Twine& Name,
llvm::Instruction* InsertBefore)
AllocaInst(llvm::Type* Ty,
unsigned int AddrSpace,
const llvm::Twine& Name,
llvm::Instruction* InsertBefore)
Declared at: llvm/include/llvm/IR/Instructions.h:81
Parameters
- llvm::Type* Ty
- unsigned int AddrSpace
- const llvm::Twine& Name
- llvm::Instruction* InsertBefore
¶AllocaInst(llvm::Type* Ty,
unsigned int AddrSpace,
const llvm::Twine& Name,
llvm::BasicBlock* InsertAtEnd)
AllocaInst(llvm::Type* Ty,
unsigned int AddrSpace,
const llvm::Twine& Name,
llvm::BasicBlock* InsertAtEnd)
Declared at: llvm/include/llvm/IR/Instructions.h:83
Parameters
- llvm::Type* Ty
- unsigned int AddrSpace
- const llvm::Twine& Name
- llvm::BasicBlock* InsertAtEnd
¶AllocaInst(
llvm::Type* Ty,
unsigned int AddrSpace,
llvm::Value* ArraySize,
llvm::Align Align,
const llvm::Twine& Name = "",
llvm::Instruction* InsertBefore = nullptr)
AllocaInst(
llvm::Type* Ty,
unsigned int AddrSpace,
llvm::Value* ArraySize,
llvm::Align Align,
const llvm::Twine& Name = "",
llvm::Instruction* InsertBefore = nullptr)
Declared at: llvm/include/llvm/IR/Instructions.h:86
Parameters
- llvm::Type* Ty
- unsigned int AddrSpace
- llvm::Value* ArraySize
- llvm::Align Align
- const llvm::Twine& Name = ""
- llvm::Instruction* InsertBefore = nullptr
¶AllocaInst(llvm::Type* Ty,
unsigned int AddrSpace,
llvm::Value* ArraySize,
llvm::Align Align,
const llvm::Twine& Name,
llvm::BasicBlock* InsertAtEnd)
AllocaInst(llvm::Type* Ty,
unsigned int AddrSpace,
llvm::Value* ArraySize,
llvm::Align Align,
const llvm::Twine& Name,
llvm::BasicBlock* InsertAtEnd)
Declared at: llvm/include/llvm/IR/Instructions.h:88
Parameters
- llvm::Type* Ty
- unsigned int AddrSpace
- llvm::Value* ArraySize
- llvm::Align Align
- const llvm::Twine& Name
- llvm::BasicBlock* InsertAtEnd
¶static bool classof(const llvm::Value* V)
static bool classof(const llvm::Value* V)
Declared at: llvm/include/llvm/IR/Instructions.h:155
Parameters
- const llvm::Value* V
¶static bool classof(const llvm::Instruction* I)
static bool classof(const llvm::Instruction* I)
Declared at: llvm/include/llvm/IR/Instructions.h:152
Parameters
- const llvm::Instruction* I
¶llvm::AllocaInst* cloneImpl() const
llvm::AllocaInst* cloneImpl() const
Declared at: llvm/include/llvm/IR/Instructions.h:73
¶unsigned int getAddressSpace() const
unsigned int getAddressSpace() const
Description
Return the address space for the allocation.
Declared at: llvm/include/llvm/IR/Instructions.h:106
¶llvm::Align getAlign() const
llvm::Align getAlign() const
Description
Return the alignment of the memory that is being allocated by the instruction.
Declared at: llvm/include/llvm/IR/Instructions.h:122
¶llvm::Type* getAllocatedType() const
llvm::Type* getAllocatedType() const
Description
Return the type that is being allocated by the instruction.
Declared at: llvm/include/llvm/IR/Instructions.h:115
¶Optional<llvm::TypeSize> getAllocationSizeInBits(
const llvm::DataLayout& DL) const
Optional<llvm::TypeSize> getAllocationSizeInBits(
const llvm::DataLayout& DL) const
Description
Get allocation size in bits. Returns None if size can't be determined, e.g. in case of a VLA.
Declared at: llvm/include/llvm/IR/Instructions.h:112
Parameters
- const llvm::DataLayout& DL
¶llvm::Value* getArraySize()
llvm::Value* getArraySize()
Declared at: llvm/include/llvm/IR/Instructions.h:98
¶const llvm::Value* getArraySize() const
const llvm::Value* getArraySize() const
Description
Get the number of elements allocated. For a simple allocation of a single element, this will return a constant 1 value.
Declared at: llvm/include/llvm/IR/Instructions.h:97
¶llvm::PointerType* getType() const
llvm::PointerType* getType() const
Description
Overload to return most specific pointer type.
Declared at: llvm/include/llvm/IR/Instructions.h:101
¶bool isArrayAllocation() const
bool isArrayAllocation() const
Description
Return true if there is an allocation size parameter to the allocation instruction that is not 1.
Declared at: llvm/include/llvm/IR/Instructions.h:93
¶bool isStaticAlloca() const
bool isStaticAlloca() const
Description
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.
Declared at: llvm/include/llvm/IR/Instructions.h:133
¶bool isSwiftError() const
bool isSwiftError() const
Description
Return true if this alloca is used as a swifterror argument to a call.
Declared at: llvm/include/llvm/IR/Instructions.h:147
¶bool isUsedWithInAlloca() const
bool isUsedWithInAlloca() const
Description
Return true if this alloca is used as an inalloca argument to a call. Such allocas are never considered static even if they are in the entry block.
Declared at: llvm/include/llvm/IR/Instructions.h:137
¶void setAlignment(llvm::Align Align)
void setAlignment(llvm::Align Align)
Declared at: llvm/include/llvm/IR/Instructions.h:126
Parameters
- llvm::Align Align
¶void setAllocatedType(llvm::Type* Ty)
void setAllocatedType(llvm::Type* Ty)
Description
for use only in special circumstances that need to generically transform a whole instruction (eg: IR linking and vectorization).
Declared at: llvm/include/llvm/IR/Instructions.h:118
Parameters
- llvm::Type* Ty
¶template <typename Bitfield>
void setSubclassData(
typename Bitfield::Type Value)
template <typename Bitfield>
void setSubclassData(
typename Bitfield::Type Value)
Declared at: llvm/include/llvm/IR/Instructions.h:163
Templates
- Bitfield
Parameters
- typename Bitfield::Type Value
¶void setSwiftError(bool V)
void setSwiftError(bool V)
Description
Specify whether this alloca is used to represent a swifterror.
Declared at: llvm/include/llvm/IR/Instructions.h:149
Parameters
- bool V
¶void setUsedWithInAlloca(bool V)
void setUsedWithInAlloca(bool V)
Description
Specify whether this alloca is used to represent the arguments to a call.
Declared at: llvm/include/llvm/IR/Instructions.h:142
Parameters
- bool V