ΒΆllvm::AllocaInst* DemotePHIToStack(
    llvm::PHINode* P,
    llvm::Instruction* AllocaPoint = nullptr)

Description

This function takes a virtual register computed by a phi node and replaces it with a slot in the stack frame, allocated via alloca. The phi node is deleted and it returns the pointer to the alloca inserted.

Declared at: llvm/include/llvm/Transforms/Utils/Local.h:249

Parameters

llvm::PHINode* P
llvm::Instruction* AllocaPoint = nullptr