From 77456b7ab47d13cdcbf169f5d068debfc34ae66f Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Tue, 3 Mar 2009 21:26:39 +0000 Subject: When removing a store to an alloca that has only one use, check also for the case where it has two uses, the other being a llvm.dbg.declare. This is needed so debug info doesn't affect codegen. llvm-svn: 65970 --- llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp') diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp index 5f9a8b5c421..2887bdc46b5 100644 --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -540,8 +540,7 @@ void llvm::CopyPrecedingStopPoint(Instruction *I, if (I != I->getParent()->begin()) { BasicBlock::iterator BBI = I; --BBI; if (DbgStopPointInst *DSPI = dyn_cast(BBI)) { - DbgStopPointInst *newDSPI = - reinterpret_cast(DSPI->clone()); + CallInst *newDSPI = DSPI->clone(); newDSPI->insertBefore(InsertPos); } } -- cgit v1.2.3