diff options
author | Dale Johannesen <dalej@apple.com> | 2009-03-03 21:26:39 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-03-03 21:26:39 +0000 |
commit | 77456b7ab47d13cdcbf169f5d068debfc34ae66f (patch) | |
tree | 7d211f64c299f85e8b8118abd6a9bbc9df166f48 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 27ed6f67668ae605a2441f5193c5921a95ceff3b (diff) | |
download | bcm5719-llvm-77456b7ab47d13cdcbf169f5d068debfc34ae66f.tar.gz bcm5719-llvm-77456b7ab47d13cdcbf169f5d068debfc34ae66f.zip |
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
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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<DbgStopPointInst>(BBI)) { - DbgStopPointInst *newDSPI = - reinterpret_cast<DbgStopPointInst*>(DSPI->clone()); + CallInst *newDSPI = DSPI->clone(); newDSPI->insertBefore(InsertPos); } } |