diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-05-24 03:10:43 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-05-24 03:10:43 +0000 |
commit | c827939046670a9800659b83e2048f1d3a79a531 (patch) | |
tree | 6e93cbf3cf2b669154f8e12e884fa01c6e3a2afe /lib/Transforms/Scalar/LICM.cpp | |
parent | e6657980977ed63df8bbd2604c9fefe513ac4126 (diff) | |
download | external_llvm-c827939046670a9800659b83e2048f1d3a79a531.zip external_llvm-c827939046670a9800659b83e2048f1d3a79a531.tar.gz external_llvm-c827939046670a9800659b83e2048f1d3a79a531.tar.bz2 |
Make LoadAndStorePromoter preserve debug info and create llvm.dbg.values when
promoting allocas to SSA variables. Fixes <rdar://problem/9479036>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LICM.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LICM.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 93de9cf..f706cc2 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -602,13 +602,14 @@ namespace { SmallPtrSet<Value*, 4> &PointerMustAliases; SmallVectorImpl<BasicBlock*> &LoopExitBlocks; AliasSetTracker &AST; + DIBuilder *DIB; // Only passed to LoadAndStorePromoter. public: LoopPromoter(Value *SP, const SmallVectorImpl<Instruction*> &Insts, SSAUpdater &S, SmallPtrSet<Value*, 4> &PMA, SmallVectorImpl<BasicBlock*> &LEB, AliasSetTracker &ast) - : LoadAndStorePromoter(Insts, S), SomePtr(SP), PointerMustAliases(PMA), - LoopExitBlocks(LEB), AST(ast) {} + : LoadAndStorePromoter(Insts, S, 0, DIB), SomePtr(SP), + PointerMustAliases(PMA), LoopExitBlocks(LEB), AST(ast) {} virtual bool isInstInList(Instruction *I, const SmallVectorImpl<Instruction*> &) const { |