From a024e8cedab928403818ac79e899cdae2a356c56 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Sun, 21 Oct 2007 23:05:16 +0000 Subject: Reg2Mem cleanup and optimizations: - enable phi instructions demotion to stack - create alloca instructions in the entry block git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43208 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/Utils/Local.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h index c2b95dbdf7..2b2ca56ae8 100644 --- a/include/llvm/Transforms/Utils/Local.h +++ b/include/llvm/Transforms/Utils/Local.h @@ -78,12 +78,13 @@ bool SimplifyCFG(BasicBlock *BB); /// 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, bool VolatileLoads = false); +AllocaInst *DemoteRegToStack(Instruction &X, bool VolatileLoads = false, + Instruction *AllocaPoint = NULL); /// DemotePHIToStack - 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. -AllocaInst *DemotePHIToStack(PHINode *P); +AllocaInst *DemotePHIToStack(PHINode *P, Instruction *AllocaPoint = NULL); } // End llvm namespace -- cgit v1.2.3-70-g09d2