[llvm-commits] [llvm] r131481 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Devang Patel
dpatel at apple.com
Tue May 17 12:43:38 PDT 2011
Author: dpatel
Date: Tue May 17 14:43:38 2011
New Revision: 131481
URL: http://llvm.org/viewvc/llvm-project?rev=131481&view=rev
Log:
Set debug loc for new load instruction.
Modified:
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=131481&r1=131480&r2=131481&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue May 17 14:43:38 2011
@@ -1576,6 +1576,9 @@
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));
More information about the llvm-commits
mailing list