llvm::CodeExtractor::allocateVar

Allocate an intermediate variable at the specified point.

Synopsis

Declared in <llvm/Transforms/Utils/CodeExtractor.h>

virtual
Instruction*
allocateVar(
    IRBuilder<>::InsertPoint AllocaIP,
    Type* VarType,
    Twine const& Name = Twine(""),
    AddrSpaceCastInst** CastedAlloc = nullptr);

Return Value

The allocated variable instruction.

Parameters

NameDescription
AllocaIPInsertion point for the allocation.
VarTypeType of the variable to allocate.
NameOptional name for the allocated value.
CastedAllocOptional out-parameter set to any addrspace cast of the allocation.