diff options
author | Devang Patel <dpatel@apple.com> | 2011-05-04 23:58:50 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-05-04 23:58:50 +0000 |
commit | ffb798c1c6aba35d390bf278cd65bed31c7f9537 (patch) | |
tree | 4fb5913ea08cfca546e1aa7afb890610e7be6c43 /llvm/lib/Transforms | |
parent | ac794d46bfb6670d3a3f7421f6e7c2ed806d5ea1 (diff) | |
download | bcm5719-llvm-ffb798c1c6aba35d390bf278cd65bed31c7f9537.tar.gz bcm5719-llvm-ffb798c1c6aba35d390bf278cd65bed31c7f9537.zip |
Set debug loc for new instructions.
llvm-svn: 130895
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index efecb97de77..c47fae1825a 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/lib/Transforms/Scalar/GVN.cpp @@ -952,12 +952,12 @@ static Value *GetLoadValueForLoad(LoadInst *SrcVal, unsigned Offset, IntegerType::get(LoadTy->getContext(), NewLoadSize*8); DestPTy = PointerType::get(DestPTy, cast<PointerType>(PtrVal->getType())->getAddressSpace()); - + Builder.SetCurrentDebugLocation(SrcVal->getDebugLoc()); PtrVal = Builder.CreateBitCast(PtrVal, DestPTy); LoadInst *NewLoad = Builder.CreateLoad(PtrVal); NewLoad->takeName(SrcVal); NewLoad->setAlignment(SrcVal->getAlignment()); - + DEBUG(dbgs() << "GVN WIDENED LOAD: " << *SrcVal << "\n"); DEBUG(dbgs() << "TO: " << *NewLoad << "\n"); @@ -2118,7 +2118,7 @@ bool GVN::performPRE(Function &F) { VN.add(Phi, ValNo); addToLeaderTable(ValNo, Phi, CurrentBlock); - + Phi->setDebugLoc(CurInst->getDebugLoc()); CurInst->replaceAllUsesWith(Phi); if (Phi->getType()->isPointerTy()) { // Because we have added a PHI-use of the pointer value, it has now |