diff options
-rw-r--r-- | include/llvm/Transforms/Utils/Local.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h index 05db3b1255..6df8da3de5 100644 --- a/include/llvm/Transforms/Utils/Local.h +++ b/include/llvm/Transforms/Utils/Local.h @@ -21,6 +21,7 @@ namespace llvm { class Pass; class PHINode; +class AllocaInst; //===----------------------------------------------------------------------===// // Local constant propagation... @@ -87,6 +88,14 @@ Value *hasConstantValue(PHINode *PN); /// bool SimplifyCFG(BasicBlock *BB); +/// DemoteRegToStack - This function takes a virtual register computed by an +/// Instruction& X 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. +/// +AllocaInst *DemoteRegToStack(Instruction &X); + } // End llvm namespace #endif |