ΒΆllvm::AllocaInst* DemoteRegToStack(
llvm::Instruction& X,
bool VolatileLoads = false,
llvm::Instruction* AllocaPoint = nullptr)
llvm::AllocaInst* DemoteRegToStack(
llvm::Instruction& X,
bool VolatileLoads = false,
llvm::Instruction* AllocaPoint = nullptr)
Description
This function takes a virtual register computed by an Instruction and replaces it with a slot in the stack frame, allocated via alloca. This allows the CFG to be changed around without fear of invalidating the SSA information for the value. It returns the pointer to the alloca inserted to create a stack slot for X.
Declared at: llvm/include/llvm/Transforms/Utils/Local.h:242
Parameters
- llvm::Instruction& X
- bool VolatileLoads = false
- llvm::Instruction* AllocaPoint = nullptr