From: Devang Patel Date: Tue, 17 May 2011 19:43:38 +0000 (+0000) Subject: Set debug loc for new load instruction. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d9b4996637a85e0bb42e7d763c7656c063a6ec83;p=oota-llvm.git Set debug loc for new load instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131481 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index c47fae1825a..cbb030e5606 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -1576,6 +1576,9 @@ bool GVN::processNonLocalLoad(LoadInst *LI) { if (MDNode *Tag = LI->getMetadata(LLVMContext::MD_tbaa)) NewLoad->setMetadata(LLVMContext::MD_tbaa, Tag); + // Transfer DebugLoc. + NewLoad->setDebugLoc(LI->getDebugLoc()); + // Add the newly created load. ValuesPerBlock.push_back(AvailableValueInBlock::get(UnavailablePred, NewLoad));